Moving your WordPress website to a new hosting service or onto a self-hosted server requires careful planning. You’ll want to avoid the possibility of data loss and minimize the length of website downtime to reduce the negative impacts this can have on your business and your customers’ experience.
Today, we’ll give you step-by-step instructions on how to move a WordPress site to a new host so you can start planning your move!
How Does Migrating WordPress to a New Host Work?
Website hosts have servers where they store website files and data. The servers also power the experience that your customers have when they visit your website. The structured data files make up the design, images, and text that you see displayed by your website browser.
HTML, CSS and other types of website codes make all of this possible. You’ll need to download these files in the exact format and place them in the same folder location that they exist within your current hosting service.
Then, you’ll upload those files and data into your new hosting service so that your website visitors get the same experience. The only real difference is that the hosting service will be different and you’ll get to host your site on the server of your choice.
Pros & Cons of Migrating WordPress to a New Host
When you move WordPress to a new host, you will experience many great benefits. But keep in mind the fact that there will be some minor risks as well. Here’s a look at the pros and cons of moving your WordPress site to a new host.
- Lower hosting fees
- Better customer service
- Greater bandwidth
- Simpler administration and management
- Improved security
- The option for a managed WordPress account
- Temporary SEO implications due to a change in server location
- Downtime during the migration
- Risk of missing links or structural changes
- Database corruption
- Loss of data if not handled properly
Ultimately, if you complete the migration process correctly, the pros far outweigh the cons of moving your WordPress site to a new hosting service. The key is ensuring that you choose a good hosting partner and follow the migration steps carefully. Read on to learn exactly which steps you must follow when moving your WordPress site to a new host.
7 Steps To Move WordPress to a New Host
If you prepare a plan for transferring your WordPress site to a new hosting service plan, everything should go smoothly. Plus, you can even take steps to reduce potential downtime.
Below, you’ll find a step-by-step outline of what you can expect to do when migrating your WordPress website to a new host.
Step 1: Back up your website files.
Before you change anything about your website, you should perform a complete backup of all of your files. The easiest way to do this is with the help of an FTP tool. If you want to use a free tool, try FileZilla, but you can use any FTP tool that works well for you.
Once you have an FTP in place, go to your WordPress root folder. This folder contains all of the files related to your website. The root folder is generally named “public_html,” “www” or the name of your company.
Right-click on your root folder and select “Download” from the options. You’ll then have a copy of your root folder on your computer. Depending on the breadth of your website, this process might take some time. If it does, start it before you go to bed and let it run overnight.
Another way to handle this step is to download a plugin that is designed for backups. Choose one that will allow you to back up and restore your website with ease.
Backing up your website is always good, but the option to restore the site is even better. This option makes it possible for you to bring your site back to life in case something goes wrong during the migration process.
Step 2: Export the WordPress database.
In the previous step, you downloaded a copy of all of your website files. Now you need to download the full WordPress database. The database contains more than just images, videos, and other files for your site. It’s focused on the technical side so it contains data regarding users, site content, and more.
For this step, you’ll need to log into your control panel, which is also known as the cPanel in many hosting plans. Within the control panel, you should see an option called “Databases.” The specific database you’re looking for is labeled phpMyAdmin.
Once you’re inside the database, select the “Export” option. You can go with the quick option, but it’s best to download a copy of your site’s database in SQL format.
Step 3: Create the WordPress database on a new server.
Now that you have downloaded the necessary files from your existing host, you can start moving them over to the new hosting service. To start that process, you need to create a brand new database on the new website hosting server.
In the control panel of your new hosting provider, look for the “Databases” option and select “MySQLDatabases.” Give your database a name. From there, you should be able to see your new database under the “Current Databases” tab.
Add a user to the database using the user list box. Grant that user permission or assign it to all privileges. Click “Done” or “Make Changes” to finalize your user permissions and finish adding the user to the new database.
Step 4: Edit wp-config.php file.
Before you can start importing your database and all of the relevant files, you need to update the wp-config.php file that you downloaded from your initial host. It should now be stored locally on your computer.
This configuration file will connect your WordPress site to the database. You probably never had to do this with your old host because this file generates itself automatically when you initially create a new WordPress website with a hosting service.
To update your wp-config.php file, you’ll need 4 crucial pieces of information:
- Database name
To make these updates, navigate to the files on your local computer that you had downloaded earlier. Before editing your wp-config.php file, make a copy just in case anything goes wrong during the editing process. Open the file in a text editor and update these strings.
- The database name will be in a string that looks like this: define(‘DM_NAME’, ‘db_name’); and you’ll want to replace db_name with your new database name.
- The username will be in a string that looks like this: define(‘DM_USER’, ‘db_user’); and you’ll need to replace db_user with your new username.
- The password will be in a string that looks like this: define(‘DM_PASSWORD’, ‘db_password’); and you should replace db_password with the new password for the user that you created in the previous step.
Step 5: Import the database.
At this point in the process, you’re finally ready to import your database. From your new hosting service’s control panel, scroll to the “Databases” heading. In this section, select phpMyAdmin. This will open a new window.
From the left, select the database that you’d like to import your old files into. Click “Import.” After you do that, you’ll want to select the database files that are hosted locally on your computer. Select the file folder and upload it to your database.
Step 6: Upload the WordPress files.
Now that your database is in place, you’re ready to upload the WordPress files that you backed up on your computer in Step 1. Connect your FTP program to your new website hosting service. Select the folder where you plan to store your WordPress website.
Upload the files directly from your computer to the folder. You must include the updated wp-config.php file. However, make sure you take the copy out of the folder before importing it to ensure that you don’t encounter any issues.
Don’t delete your files from your computer just yet. You’ll want to keep them stored locally until your website has officially gone live via the new host.
Step 7: Change the domain name and the DNS.
Now that your database and files are in place, you’re ready to take the final step towards getting set up with the new website host. You’ll need to change the settings of your domain name system (DNS). Failing to do this will result in your DNS pointing to your old host’s IP address instead of the new one.
Change the settings of your DNS via the domain name registrar or the place where you initially purchased your domain name. This process can take up to 48 hours to complete. During this time, you should not make changes to your website because you’ll end up making alterations to the old version of your site rather than the new one.
Once this process is complete, you can delete the database and WordPress files from your old hosting service. This will finalize the process with absolute certainty because the transfer of your old WordPress site to the new host has successfully occurred.
Improved Website Functionality with a New Host
While the process might seem daunting at first, migrating a WordPress website to a new host is not that challenging, especially when you follow the steps carefully. In the end, you will be able to better manage your website. Plus, your website visitors will have a better experience overall if you’ve carefully researched the new website hosting service.
Recommended lecture: HOW TO DISABLE COMMENTS IN WORDPRESS