There are several steps that need to be performed before a proper WordPress site migration.

All steps are important so please read the whole article first and then proceed with the steps.

If you have ideas how to improve this process let us know.

Actions to be done on the existing (live) server

1. Backups (files + database)

Make sure you have several & reliable backups (files + database).

I recommend that you create multiple backups of your old site using several backup/migration plugins such as these ones just in case.

2) Brand new database

Create a brand new database for the new site from the control panel and add also create database user that has access to that database.
Some control panels have Database creation wizard which walks you through the process.

e.g. mysite_2017

Actions to be done on the staging server

Use a backup or migration plugin to package the test site.

Download the files (installer + package in case you’re using Duplicator) on your computer.

Actions to be done on the existing (live) server

Start the WordPress migration

Connect to the new/live server via FTP/SFTP.

Because servers nowadays have lots of storage space the old site can be kept for some time. We are doing this just in case the upgrade process needs to be reverted back for some reasons.  So rename the old to e.g. www => www_old_2017
After you rename the folder create another one with the same name and at the same level.

Note: the site may reside in a different folder not in www.

Maintenance Message

Because there could be visitors that intentionally or accidentally visit the site during the migration the more professional way is to show a maintenance message. The idea is to show the maintenance message to everybody except to yourself (so you can complete the migration from your browser).
The snippet below also instructs any search engines to revisit the site after 30 minutes.

To do that you need to know your IP address.  To get your current IP address visit http://ipchicken.com. You should see something like this.

get my ip

Now create an .htccess file with the following contents. Make sure you replace 11\.111\.111\.111 with your IP address.
Please note that there’s an exclamation point before the IP address. It has to stay there. Also do put a slash \ before each dot of your IP.
Add a reminder in your phone or calendar to check and remove the maintenance block because if it stays there people will continue to see the maintenance page.

###################################################################
# Maintenance block. Please remove when done.
# Works for Apache web servers only
ErrorDocument 503 "Down for maintenance"

<IfModule mod_rewrite.c>
	RewriteEngine On
	RewriteCond %{REMOTE_ADDR} !11\.111\.111\.111	
	RewriteRule .* - [R=503,L]
</ifModule>

<ifModule mod_headers.c>
	Header always set Retry-After "1800"
</ifModule>
###################################################################

When other people access the site they will see this screen.

maintenance

 

If you’re using Duplicator you’ll need upload the installer.php and the site package in the folder where the old site was.
Then visit example.com/installer.php and follow the steps. Make sure you’re using the new database.

If you’re using a different plugin check its support page or search on YouTube how to use it.

 

 

Free WordPress Sandbox

Do you want to get a free test/Sandbox WordPress site? Join Now

Feedback

If something needs correcting in this article, you have an idea or suggestion always let us know