One of the best things about great CMS platforms like WordPress is that it means that end user is more empowered to manage content than ever before. This step by step guide will help you learn how to migrate any website with a database including a WordPress site.
Before we get started, we always recommend that if you are unfamiliar with the technical aspects of your website that you consider working with one of our trusted web development partners who would be more than able to help you move your site, there are some circumstances where you might find yourself in a situation where want to migrate your website and don’t know where to start so we’ve made this guide to help you do so. It’s also important to note that for new clients we offer this service for FREE! with all new account signups as seen here: How Web Hosting & Email Migration Works
Make a Plan
There’s an old saying: “If you fail to plan, you plan to fail” and in our experience it’s very true! So make sure you take the time needed to and a step back to look at the big picture for a moment. What is the end goal? If you are moving the site from A to B then maybe that’s as simple as it needs to be but in most cases you will want to consider the idea of having a staging enviroment where you can make changes (in private) and then when the time is right push that site live. This type of a strategy has many benefits and is widely used in the digital marketing community as the standard approach for several reasons. It means you can make mistakes and fix them before anyone can see them, it also means that if something goes wrong you have a kind of ready-made backup of sorts to re-deploy your site in a pinch if you needed to do so.
The most common way to do this is to make a subdomain for your staging area. Now you might be tempted to use something like staging.yourdomain.ca or newsite.yourdomain.ca but before you do that consider that these can be easily guessed so you might want to be a little more creative if you are concerned about prying eyes.
Since mid 2017 When Plesk introduced the Advanced WordPress Toolkit 2.0 the best way to migrate WordPress sites is to use the free tool built right into the hosting platform to move your WordPress sites around. As opposed to back in the olden days your WordPress sites had to be manually migrated or you could use plugins like Duplicator & Updraft to get the job done.
Using File Manager(s) – In most cases this is the preferred method but it is only possible if your legacy hosting provider offers an online file manager that includes the ability to zip or “archive” or “compress” files & folders so that you can download them as one file. Here are a few examples of how it’s done on some of the hosts where you might be moving files from:
Once you have zipped up your files and have downloaded them to your local machine you will then need to upload them to your new server. Here’s a video post on our knowledge base to help you learn more about the process: How to use the web file manager built into Plesk
Alternative: Using FTP – If a site is too large or your old provider doesn’t support the above method then FTP is going to be your best option. With this method you will be doing the same thing as above but you will have to have the FTP login details for both the new and old servers as well as an FTP client such as Cyberduck that you will use to connect to the old server, download the files to a temporary location on your PC, and then upload your files to the new server.
This is where things can get a bit tricky if you have never done it before or if the old server has a very old or non-standard database manager running on it. In most cases you will be using a web based MySQL tool called phpMyAdmin. With most hosting providers it can be found as a link that looks something like this:
Once you are logged into phpMyAdmin it should look something like this:
Next you will want to click on the “Export” Tab (2) then select the default “Quick” option (3), ensure that “SQL” is selected (again it’s the default) (4), and hit “Go” (5) as seen here:
If you have multiple databases then you will have to figure out what is the correct one that is in use. For WordPress you can learn what the correct Database is by looking in the wp-config.php file located in the root directory of the site. There you should take note of the following: DB_NAME, DB_USER, DB_PASSWORD it looks like this:
You will need to repeat this process for each active database (typically most sites just have one).
Now you have to create & upload the database on the new server, here is a video found within our knowledgebase on how to do that: How to create a mysql database and DB user account
Next you will want to import the data you exported earlier into the newly created database you’ve just made. You can use phpMyAdmin to do that similar to how it was exported but Plesk has an even simpler tool built-in that you can use as well. Within the Database management area of Plesk you can simply click on the “Import Dump” Icon within the database you wish to load that looks like this:
Then click on the “Upload” > “Choose File” option that will allow you to select the zip file on your local machine that will then be imported once you click OK.
Before you do this you are going to want to double check a few things first.
Check the site with site Preview
Included in your hosting package is a great feature that allows you to preview the site before you make it live. You can do this by clicking on the “Preview” Link found within the Plesk Control panel as seen here:
This Preview Link is great for testing out what a site will look like to an end user but it’s not designed to be used for doing things like managing the WordPress admin area. You may be able to login to the admin area but due to caching and other coding related factors it will not work as you might expect it to otherwise. If you need to use the WordPress admin area as an alternative you can change your localhost file to hardcode the IP address of the new server for your domain to point at the new server directly, Here is more information on how to do that: How To Change Your Localhost File
Copy your DNS records
In order for you to seamlessly make the switch you will want to make sure your DNS records are the same on your new server as they were on your old server. For example if you are using a third party for email you will want to ensure that your MX records are changed from the default setting so that you won’t miss any emails after the switch happens. To do this you click on the DNS Settings Icon as seen here:
Your old hosting provider should have a similar area where you can find your DNS records that may look like this:
Once you have all your DNS records in place (if different from the default) you need to click on the “Update” button as seen here (click on the image to enlarge it):
This is what a correct set of DNS records look like is you are using Google as your Mail Exchange (MX) with our Nameservers and our web hosting (click on the image to enlarge it):
Note: after you click the “Update” button the yellow warning buttons will be gone. You will know when the records are updated once you see this message:
Next you will have to make a choice as to if you will be pointing your domain to use our nameservers (ns21.dynamichosting.biz & ns22..dynamichosting.biz) or if you simply want to point the traffic going to your site (via the ‘A’ Record of your DNS) to the IP address of the new server. It’s important to note that once you make these types of changes you will need to wait for DNS propagation.
Well if you made it this far and did everything right then your site should now we live on your new hosting providers server. To be sure you can use this domain lookup tool to confirm that the change has in fact taken place. If that’s not the case and at this this point you are finding this process very confusing then we strongly suggest you consider transferring your domain to us so that we can make these types of changes for you. We sell domains at cost for the convenience of our clients so that our staff who do this kind of thing every day have the ability to help you should you need to make these kinds of technical changes now and in the future. If you domain is with a 3rd party then we are unable to make domain changes.
- Ultimate Domain Whois Lookup tool (it shows domain, nameservers, DNS, hosting, & email!)
- How to transfer your domain