6. THE PROCESS OF MIGRATING
A WORDPRESS WEBSITE
Transfer your WordPress files
Transfer your Database
Reconfigure WordPress
Test the migration
Point your domain to the new server
10. STEP 1: TRANSFER YOUR FILES
Compress files before transfer
Download directly to the new server
Request a site archive from your old hosting provider
Request this file to be downloaded from your new host
11. STEP 2.1: EXPORT DATABASE
Check in wp-config.php which DB you’re using:
define('DB_NAME', ‘user_wrdp1’);
Or export the database using phpMyAdmin
Or use SSH to export your database:
mysqldump -uUSER -pPASS user_wrdp1 > db-backp.sql
Compress the .sql file
Download from the new server
Ask your old hosting provider for a DB dump file
Ask your new hosting provider to download that file
12. STEP 2.2: IMPORT DATABASE
Make a new MySQL Database & Username
Grant permissions for that DB to the MySQL user
Or use phpMyAdmin to import it
Or use SSH to do this:
mysql -uNEWUSER -pNEWPASS user_newdb < db-backup.sql
Ask the hosting support to import the .sql file into that DB
13. STEP 3: RECONFIGURE WP
Connect to the new DB editting wp-config.php:
define('DB_NAME', 'user_newdb');
define('DB_USER', 'user_newuser');
define('DB_PASSWORD', ‘newpassword’);
Managed hosting companies often add lines to your wp-config.
php file:
$varnish=array ( 0 => 'pod-1191', );
$memcached_servers=array (155.2.4.1 );
define( ‘ROOT_FOLDER', '/nas/wp' );
14. STEP 4: TEST THE TRANSFER
Use a hosts file to test the transfer:
Linux & Mac: /etc/hosts
Windows: c:/Windows/System32/drivers/etc/hosts
181.224.135.19 domain.com www.domain.com
15. STEP 5: POINT YOUR DOMAIN
Change the nameservers to your new server ones
17. PLAN THE TRANSFER
Use Google Analytics to detect when your site is least visited
18. SETUP A MAINTENANCE PAGE
Install a maintenance plugin on your old hosting account
http://goo.gl/8p778d
19. USE REMOTE MYSQL
CONNECTION
Connect your OLD server WordPress to your new database
Edit wp-config.php and change:
define('DB_HOST', ‘localhost');
to:
define('DB_HOST', '184.154.235.13');
20. COMMUNICATE WITH YOUR
HOST
Transfer from one cPanel account to another is very easy
Import/export of databases and zipping archives can be
done easier by the hosting provider support