Are you planning to change hosting companies or servers for your WordPress site? In the process of switching web hosts or migrating a website to a new server, the biggest risk is data loss and downtime.
Many people have had enough of their current provider and are looking for a new one. Nevertheless, many people are hesitant to move to a more reliable host for fear of making errors and damaging their website.
It can be overwhelming and stressful to move your website to a new host, but it doesn’t have to be.
Let’s relax! Migrating your website is nothing to worry about if you spend a little time preparing it yourself. If approached correctly, migrating WordPress can be a very easy and straightforward process.
With this tutorial, you will learn how to migrate safely to a new host without experiencing any downtime.
Furthermore, we will answer the most commonly asked questions about moving a WordPress site to a new hosting provider, so that you can avoid making some common mistakes.
Let’s get started!
Table of contents
It’s important not to make the same mistake twice.
If your current WordPress hosting provider is slow and if you are experiencing downtime, you might want to choose a reliable hosting provider.
The most important criteria when selecting a WordPress hosting provider are uptime, performance and support reactivity.
You can sign up for a trial and monitor uptime and performance with WP Umbrella’s application, without committing to a new host.
If you want to skip with this process, here’s who we recommend:
Before you migrate, make sure you have backed up all of your site’s data and files. Performing this step is good practice before making any major changes to your WordPress websites, but when it comes to migration, it’s mandatory.
You can use WP Umbrella to backup your website in one click. Go to WP umbrella’s application, connect your website and click on the backup tab.
From here, just click on backup now and download the backup of your website and database when it is available.
If you prefer, you can go the manual route. You will need a file transfer tool (FTP) to access your website files.
Once you have installed, you will need to connect to your website’s server using SFTP credentials.
As soon as you have connected, select all the files under your website’s directory and download them. You need to include the hidden .htaccess file as well.
You also need save and export your website database.
It is easy to export your database. Open the phpMyAdmin application in your cPanel account. In the left hand sidebar, choose the database containing your WordPress installation, and once selected, click the Export button on the navigation bar.
We first need to create a WordPress installation environment before we can migrate to the new web host. You must first create a database into which your SQL data can be imported.
Connect to the cPanel software of your new web host using the credentials they have given you and go to your MySQL database in order to create a new database for your website.
Then, create a new MySQL user. Add the user to the new database and give it all permissions.
Put the new MySQL username, password, and database name somewhere safe. They will come in handy shortly.
Navigate to the folder where you downloaded the backup (on your computer). The wp-config.php file controls the connection between WordPress and the database.
Ensure that you copy this file and store it in another folder on your computer. We need to do this to restore the changes we are about to make in case anything goes wrong afterwards. This is an important step, please do not skip it!
Now, let’s open the original version of the wp-config.php file and make some editing.
You need to change the database name, user and password.
define('DB_NAME', 'db_name'); define('DB_USER', 'db_user'); define('DB_PASSWORD', 'db_pass');
Save the file.
The process of importing data can begin now that you have a new database.
Select the new database from the left-hand sidebar of phpMyAdmin from your cPanel software. Then, click the Import tab.
Select the SQL file you exported earlier.
Uncheck the Partial Import check box, make sure the format is set to SQL, and then click Go. Importing the database will begin at this point.
Your database size determines the length of time it takes to import.
You have completed the preparation of the new database and the reconfiguration of the wp-config.php file. Now, it is time to upload the website files.
Use your FTP client to connect to the new web host and browse to the folder where your website will be stored. When this is the primary or only site on this web server, the files should usually be uploaded to the public_html folder or at the root of the www folder.
Be sure not to delete these files once they have been uploaded.
Now that your WordPress database and files are on your new hosting server, your domain still points to your old hosting account.
You must update your domain’s DNS nameservers to update your domain’s name.
Your new web host needs to provide you with the DNS name server information. There are typically a few URLs like this:
I will not detail the process here since it’s different for every domain register. However, the basic concept is the same.
You need to look for the domain management area and then, the nameservers section. You can update your DNS from there.
It can take up to 48 hours for DNS changes to propagate to all users.
Due to the fact that you are using the same content on both hosts, your users will not see any difference. Your WordPress migration will run smoothly without any interruptions.
As a precaution, we recommend you to keep your old hosting for at least a week.
You can ask your web host for assistance if you need assistance updating your DNS.
This depends both on the old and the new hosting setup. Your WordPress website size is also a factor. However, most of WordPress migration can be achieved within 48hours.
Of course. It is simply a matter of downloading the WordPress files and database from the old web host and uploading it to the new web host. The whole process is detailed in this article.
Everything you need to know about the wp-config.php file in WordPress.
Ultimate guide about Google Core Web Vitals for WordPress users.
Because we do pretty much everything online these days, more and more people are getting […]