How to Move Your WordPress Client to a New Server Correctly

Total
0
Shares
How to Move Your Wordpress Client to a New Server Correctly

Moving a client to a new server is a part of the job that can come up from time to time. There have been a surprising number of clients that I have met who were hosting with their web developers. This was an old way to make a lot of money with a client ā€“ the whole idea is you would build a website for them for letā€™s say $1,000 ā€“ then you would charge them $50p/m for hosting ā€“ but the hosting would literally be a server in your garage that cost you $100p/m to maintain and you could have 100 clients on there.

The problem is ā€“ anytime I get one of these clients ā€“ I know right away when the developer has screwed them over on hosting.

You see as a cost-benefit analysis goes itā€™s just much better to go with a reputable hosting company. What ends up happening is these clients have bad support for their host and an inferior product ā€“ not to mention getting overcharged. It would make sense as to why a client would want to move away from their previous developerā€™s hosting once they make a switch to a new web developer.

Moving to a new host is not always straightforward though ā€“ so I wanted to show you how I do it and some mistakes you could make.

Step 1: Install WordPress On New Host

There hasnā€™t been a single cPanel Iā€™ve used that didnā€™t allow installation of WordPress. Simply go to cPanel and youā€™ll see an option somewhere to install WordPress. Youā€™ll go through the standard Installatron/Softalicious installation.

cPanel Migration

Here ā€“ everything is straightforward

Installatron/Softalicious installation

The only thing you need to be concerned with is installing WordPress on the root domain and not in a subdomain (sometimes it sets the directory to be ā€˜wpā€™ by default or something like that).

Donā€™t worry too much about what the Site Title and other options like this would be because youā€™ll be overwriting the database.

Step 2: Make a Backup of the wp-content and Move Over

What you need to do now is go to the old host and make a backup of the wp-content folder (which Iā€™ll show you how to do in a sec) ā€“ and the database. With the wp-content folder simply go to the public_html folder and right-click on ā€˜wp-contentā€™ in the File Manager and click on Compress

image 3

Youā€™ll have a zip file ready once this is done (if you donā€™t see it go into another folder and then go back because it may need to refresh the file list). Right-click on this file and click ā€˜Downloadā€™ ā€“ then go to the File Manager of your new host and completely delete the wp-content folder in the root, upload the wp-content zip file, extract it and youā€™re halfway done. Now we need to get the backup of the database.

Step 3: Make a Backup of the Database and Move Over

Transferring the database is a little more tricky ā€“ what you need to do is go to phpMyAdmin ā€“ select the database from the left and then click Export.

image 4

Lucky you ā€“ thereā€™s nothing really that complicated here ā€“ just click the ā€˜Goā€™ button without changing any of the options. Now we need to import the database.

This is going to be a little tricky because you need to not only add the new database and import it but you also need to change some settings in a file called wp-config.php but Iā€™ll guide you through it.

So first things first go into phpMyAdmin ā€“ select all the tables in the database and then scroll down to the drop-down and select ā€˜Dropā€™

image 5

Once you do that all the database tables will be deleted. But donā€™t worry ā€“ just go to ā€˜Importā€™ at the top ā€“ select the file export of the database (it should be a .sql file) and then click ā€˜Importā€™ to import the new database.

image 6

After that, all you need to do is take a note of the wp_ prefix. For example below is the standard ā€˜wp_ā€™ prefix behind every database name:

image 7

But Iā€™ve seen everything from wpx1_ or anything like that ā€“ basically you could have any prefix you want.

Now go into wp-config.php and make sure you change the prefix to whatever is in the database (there should be a constant for it).

Then all you need to do is redirect the name servers to your new domain!

Step 4: Donā€™t Forget the Mail!

One thing is you donā€™t want to be receiving SMS messages like this once you transfer the name servers of the domain

SMS messages

Make sure you replicate the name servers from the old cPanel

You can find the MX records in the Zone Editor:

image 8

Make sure they are replicated over from the previous cPanel.

Then if youā€™ve done correctly voila! You have the new site live!

Note: to test if the new site is indeed correct I upload a file called testme.php in the root directory that just echoes out ā€œThis is the new siteā€ ā€“ then I go myclientdomain.com.au/testme.php to confirm the site has moved over.

Good luck!

Leave a Reply

Your email address will not be published. Required fields are marked *

Sign Up for Our Newsletters

Get notified of the best deals on our WordPress themes.

You May Also Like