An easy guide to WordPress migration
There are numerous good reasons to switch your WordPress site’s hosting provider. It makes sense to switch to a provider that has what you want, whether it’s better uptime, faster speeds, more affordable plans, or better customer service, but that can occasionally feel like a risky move or a lot of work.
The good news is that it’s not necessary. We’ll walk you through each step of the WordPress migration process so you can avoid any time-consuming pitfalls.
How to Migrate a WordPress Website
- Sign up to a New Host
- Back up Your Website’s Files
- Export Your Database From Your Existing Host
- Create a MySQL Database on Your New Host
- Edit the wp-config.php File on Your Website’s Files
- Import Your Saved Database Into Your New Host
- Upload Your Website’s Files to Your New Host
- Update Your DNS Settings
- How to Move a WordPress Site to a New Host: Summary
- FAQs
1: Sign up to a New Host
Prior to actually moving your WordPress website from one server to another, you must select and sign up with your new hosting company.
Which host should I transfer my WordPress site to?
It’s possible that you’ve already decided on your new hosting company; in that case, move on to the next step. However, if you’re unsure of which host to use, it’s best to decide what is most important to you before looking into service providers who are experts in that field.
For instance, if you’re unhappy with the uptime of your current provider, you might want to base your choice of a new provider on a high uptime percentage. Or, if you’re sick of paying a certain amount, you could select a less expensive host (we’ve created a guide to the least expensive WordPress hosts specifically for this purpose).
You can even pick from services that will handle your WordPress migration, which brings us to…
Which providers will move my WordPress site for me?
We thoroughly analysed a large number of hosting companies, and there are a few good choices if you want a host that will move a WordPress website for you. The three are Bluehost, DreamHost, and A2 Hosting.
We’ve provided a brief summary of each provider’s ratings below, but if you want to learn more, just click on the “Learn More” drop-down menus!
Bluehost
DreamHost
A2 Hosting
2: Back up Your Website’s Files
When you’ve decided on a new host, it’s time to start getting ready to transfer your WordPress site there.
To prevent losing any of your hard work, it is crucial to back up all of the files on your website to your local computer. This is true for everyone, even if your new hosting company is moving your website for you, since backups are always a crucial safety precaution.
These backups can be performed in one of two ways: by using a file transfer protocol or a WordPress plugin. Although using a plugin is simpler, getting to know file transfer protocols now will be useful when it comes time to upload these files to your new hosting account in step seven.
Using file transfer protocol
By creating a connection between the server and the computer, a file transfer protocol (FTP) is a tool that enables you to — you guessed it — transfer files between your old hosting account and your local computer. Mac users can use Transmit, while PC users can use FileZilla.
Once you’ve set up an FTP programme, you’ll need to connect to the server and access your files using a Secure Shell FTP (SFTP) credential from your previous hosting account. After connecting, you can choose and download any file found in the directory of your website.
Using plugins
Using plugins makes backing up your WordPress website simpler. With a few clicks, a plugin can be set up, allowing you to control which files you want to back up, how frequently backups should occur, and where your files will be stored.
There are more than 57,000 plugins available for WordPress, and many of them were made to help with backups.
There are a tonne of options, but make sure you pick a plugin that will backup and restore your site, giving you the ability to restore any previously saved versions of your WordPress website in case something goes wrong. Given that both of the plugins on the left mention restoration in their descriptions, we would choose one of those from the list above.
3: Export Your Database From Your Existing Host
The process of exporting your database is straightforward and is typically carried out using phpMyAdmin, a MySQL database administration tool.
You must first log into the control panel of your current hosting account (the one from which you want to switch). The cPanel control panel, which we’ll use in this example, is what most hosting companies use. Your current hosting provider can assist you if any of the steps differ from those listed below if you use a different control panel, such as Plesk or vDeck, though most control panels function very similarly.
Open the phpMyAdmin tool in the “Databases” section of your cPanel control panel.
Next, choose the database you want to export from the tool page’s left side. The structure of the database will be displayed on a new page that loads. Pick the “Export” tab from the menu at the top of this page. Then, you can select either the “Quick” or “Custom” export options.
A download window will then appear, allowing you to save the exported database as a file on your local computer, regardless of the export method you select.
4: Create a MySQL Database on Your New Host
It’s time to create a new location for all of those files and designate a user to be in charge of it now that you have a backup of your database saved. Go to the “Databases” section of your new hosting account’s cPanel and select “MySQL Databases” from the list of available databases.
Don’t use phpMyAdmin to create databases or database users, even though it works great for importing and exporting databases. Since phpMyAdmin doesn’t map databases, backups and restorations are hampered.
From there, you can give your new database a name, and it will then show up in your cPanel account’s “Current Databases” table. Next, under “Add User to Database,” pick the new database from the Database list box and the user you want to add from the User list box. The user can then be given particular permissions, or you can choose the “All Privileges” check box to give them full access to the database. When you’re finished, click “Make Changes,” and cPanel will add the user to the fresh database.
5: Edit the wp-config.php File on Your Website’s Files
You can import the old database files that you saved to your computer once the database has been created on your new hosting account. However, because the wp-config.php file on your local computer is in charge of establishing the link between a WordPress website and its database, it’s crucial to do so first.
The wp-config.php file was produced using that outdated information when you first configured your WordPress site with your old host. You’ll need the following information to update this information:
- Database name
- Database username
- Database password
- Database host
All of this data will be available to you following the creation of the database and user in the preceding step.
The folder on your computer where you downloaded your old website files in step two is where you can find the wp-config.php file. To make the following three changes, open this file in a text editor.
Change the database name
Find the following line in the file:
The database name of your old web host will be set in the db_name section of this line; you must change it to the name of your new database.
Change the database username
Next, locate the following sentence:
And replace the username of your old host with the new username you created in the db_user section.
Change the database user password
Lastly, find the following phrase in the text:
Add the new user password you created in step 4 to the db_pass section.
6: Import Your Saved Database Into Your New Host
Use phpMyAdmin or the mysql command line programme to import your database. The phpMyAdmin option will be discussed because it is simpler to use.
Click phpMyAdmin from your cPanel dashboard’s “Databases” section.
A new window with the phpMyAdmin administration page will open. Choose the database you want to import the old file into on the admin page’s left side, then click “Import.” Click “Browse” and choose the exported database file from your local computer under “File to Import.”
7: Upload Your Website’s Files to Your New Host
The old files that you saved in step two need to be uploaded now that your new database has been imported.
Connect to your new host using your FTP programme, and then look for the folder where your WordPress website will be stored. You can then upload your local computer’s files, including the updated wp-config.php file, from there.
8: Update Your DNS Settings
Congratulations on completing the process! You must update your domain’s Domain Name System (DNS) settings to point to the new server IP address once your files have been uploaded to your new host. If you don’t do this, your old host will still be listed in the DNS settings.
You can complete this step with the help of your domain name registrar, but keep in mind that it might take up to 48 hours for your domain to propagate completely. During this time, avoid making any website changes because they will be applied to the outdated version of the site.
You can delete your files and database from your old web host after this 48-hour window has passed, but keep everything on your local computer just in case.
9: How to Move a WordPress Site to a New Host: Summary
Allowing your new host to move your WordPress site for you is the quickest and simplest option. This reduces the eight-step WordPress migration process to just two steps: picking a host and making a backup of your files. You can save time and money by choosing Bluehost, DreamHost, or A2 Hosting to migrate your website because they will do it at no cost to you.
However, if you’d prefer to move your WordPress site yourself, let’s go over the procedure in case you don’t want to take the hands-off approach:
- Sign up to a new host – Choose your new provider based on what’s important to you.
- Back up your website’s files – Use a plugin or an FTP protocol to save your files.
- Export your database from your existing host – Begin the transferring process from the control panel of your old host.
- Create a MySQL database on your new host – Create a new home for your old files.
- Edit the wp-config.php file on your website’s files – Make sure the database information is up-to-date.
- Import your saved database into your new host – Upload your database.
- Upload your website’s files to your new host – Upload your files from your local computer.
- Update your DNS settings – Make sure your domain’s settings point to the new server IP address.
This procedure isn’t too challenging once it’s been broken down; just remember to keep saving everything as you go!
FAQs
Do I need to transfer my domain name to my new host?
Although it is not required, you can transfer your domain to your new host if you so choose. By using the same dashboard, it will be simpler to manage and renew both your hosting account and your domain name.
How do I check if my website is hosted on my new host?
After you’ve migrated your website, you can check which host is hosting it using a number of free online tools.
How long should I keep my old hosting account active?
Once your DNS settings have been updated, you can cancel your old web hosting account. Check the provider’s refund policy carefully to see if you’re eligible for any money back if you’re cancelling your account before the end of a prepaid term.