The thought of migrating your entire website to a new host may send shivers down your spine. The logistics, the data, the timeframe - how are you possibly going to pull it all off disaster-free?
Well, you’ll be pleased to know that despite the looming dread of such a task, there’s actually very little to worry about. By following a few simple, straightforward steps, your site migration can be a smooth and painless affair.
Our WordPress migration service
As part of our WordPress Hosting, we actually offer a free migration service for customers that already have a website. So if you're looking to move your WordPress site to a new host, why not let us do all the heavy lifting?
Migrate a WordPress site in ten simple steps
Migrating a WordPress site over to a new host doesn’t need to be complicated. Especially if you follow our ten steps for a painless website migration.
Step 1: Ensure PHP version compatibility with host
Before you go storming ahead, there are a couple of compatibility points that you need to read up on and factor into your choice of host. The first of which is your PHP version, because if your scripting language is incompatible or outdated, then you’re likely to Have issues with parts of your website, or in worse cases the entire website will fail to load.
Step 2: Ensure MySQL/MariaDB version compatibility
The next thing to check is your MySQL/MariaDB database version. Your database contains most of your site’s content, from blog posts to plugin information, so it’s vital that you know which version you are currently using, and that it’s compatible with your potential choice of host to avoid major issues when attempting to migrate your site.
Step 3: Choose a new host
Once you know your necessary requirements, it’s time to choose your host. So what do you need to look for?
Everyone is different, so you need to work out which features are a priority for you. An easy place to start is to assess why you decided to leave your previous host. What were you lacking before, and what are you hoping to gain? Once you’ve worked this out, you can identify which kind of hosting solution would fit you best, from shared hosting and dedicated/cloud hosting, or a managed solution.
Step 4: Back up your site using FTP
To move your website you’ll need to make a copy of your site files, it’s also very important to have a backup copy of your website just in case something doesn’t go to plan along the way. How do you do this?
- Connect to your site server via FTP
- Navigate to the folder on your server that contains your website files
- Download your backup files
- Stash it somewhere safe and secure
Step 5: Back up and export your WP database
Once you’ve made a copy of the actual site content, you need to do the same for your WordPress database. As this contains all the information about your users, content, and more, you wouldn’t really want to lose this, would you? There are a couple of ways to do this:
If your host is using cPanel
cPanel is the control panel of choice for many sites, and it provides a safe and secure way of creating a backup copy of your WordPress database. By using the ‘Download a MySQL Database Backup’ function within the control panel, A *.gz file will be downloaded to your device containing a full backup.
phpMyAdmin is a free administration tool that can be used to backup your WordPress database. It offers several different methods within the software, all with different output formats. Most hosting providers will offer the ability to use this tool.
A full breakdown of the backup process using phpMyAdmin can be found at the source of all WordPress knowledge - the WordPress website itself.
Step 6: Create a new SQL database and import old contents
You’ve got all of your old data, but where are you going to put it? It’s time to create a new SQL database within your new host where you can import your backups, and get your site up and running again.
If you want to learn more about this process, check out How to access a MySQL database using PHPMyAdmin over on our support site.
Step 7: Upload your FTP files to your new hosting provider
For this next step, you'll need to log into your new server via File Transfer Protocol (FTP). Then, you need to navigate to its root folder. Once you're there, right-click, and select Upload. Find all the files and directories within your backed up database, and start the process. This can take quite a while, particularly for larger sites.
Using FTP can be intimidating for a beginner. That's why we created a handy guide on How to use FTP over on our support site.
Step 8: Edit your wp-config.php file
Next on your list is editing your wp-config.php file. Your wp-config.php is extremely important and contains some crucial information that you need to understand and change accordingly if you want your site to actually work at all post-migration.
Find the wp-config.php file within your new root folder. Once you right-click on it, you can then select the View/Edit option which will open the file with your local text editor. You will need to make the following changes to the four lines of text you see:
Firstly, replace the lower case variables with the credentials of your new database. Then, when you save the changes and close the file, you will be able to access your new site, good as new.
Step 9: Test site using local host file
Entering a domain name into your web browser will cause your device to ask a remote DNS server where the domain is located. Once the DNS server gives your device an IP address, it will be able to locate your domain name’s content - in other words, your site can now be accessed.
If you want to test if your domain is working before making DNS changes, your host file can be used to tell your device to hook up to an IP address of your choosing. By bypassing the DNS server, you can view your website in testing, development and migration periods without changing DNS.
If you want to learn more about using host files, be sure to read How to use a host file to test your website over on our support site.
Step 10: Configure and change DNS
The last step to getting your newly migrated site up and running is to make sure that your DNS is able to connect with your new host. DNS tells your registrar where to point your URL, so if you're moving server, then you will need to change your DNS. If you’re moving everything including your domain registration, then you will need to update your nameservers, which you will be able to get from your new host. However, if it’s only web traffic that you’re pointing, then you may need to change A records so that your email remains untouched.
Bonus tip: Migrating to a different domain name
If you are migrating to a different domain name, then you need to change your site and home URL entries. This can be done within your WordPress database, or you can head to the WordPress Dashboard, where you can select ‘Settings’ and ‘General’. This will allow you to edit both fields.
Now you've completed a WordPress site migration
Whilst there's a lot to consider, you should now know more about migrating your WordPress site. If you take your time and follow these steps, the move should be swift and painless. If you're still unsure, contact our sales team, and they'll get you on the right track.
So whilst there’s a lot to consider, migrating your WordPress doesn’t need to be a headache. Follow these simple steps, and your move will be swift and painless. Why not take a look at our UK WordPress Hosting now?
Still unsure? Why not get in touch with our support team on 0333 014 2700.