Recently moved wordpress blog thepicky.com from dreamhost shared hosting to Media Temple Grid-Service(gs). I thought to document the host move, so that it would be helpful to someone else in the future.
Moving your sites to Media Temple (or other host ) involves some important steps, which included moving website content and databases.
Moving WordPress to Media Temple Grid-Service(gs)
1. Login to your current host (dreamhost) using SSH. Make sure you have SSH (shell access) enabled both in dreamhost and mediatemple.(SSH login credentials normally same as your FTP and only thing you have to enable it in your control panel or cPanel).
2. Transfer Content: Using SCP command you can directly copy wordpress content from your old server to the new one. This way you can safely skip the FTP download from old host and upload to new host. To do so, go to the root folder where you have your wordpress in your current host and execute the following command
scp -r * USERNAME@s#####.gridserver.com:/home/#####
Note: ##### is your grdiserver unique id and USERNAME is SSH username.
This command will transfer all of the files directly to your (gs) from the old host.
3. Backup Database: Backup your database using WordPress Database Backup plugin – WP-DB-Backup.
4. Create new database: Create a new mySQL database in your Media Temple Grid Server account.
5. Restore Database: Using import option import the .sql file into your newly created database.
If your database backupfile (.sql) is more than 10 MB, you have to import the database using command line. To do so, first upload the .sql file to /html. Use the following command in SSH and make sure you use the following command ONLY in the directory where the .sql file is.
mysql -udbUSERNAME -p -hinternal-db.s#####.gridserver.com dbDBNAME < file.sql
no space between ‘-u’ and the username
USERNAME – your db user name
DBNAME – your database name
6.Modify Configuration: Open your wp-config.php file (you will find it in root folder ), change the DB_NAME, DB_USER, DB_PASSWORD and DB_HOST as per media temple database you created.
8. Test WordPress: With the media temple unique Access Domain you can view your websites before you switch your DNS. You can access your website with the following temp url http://s#####.gridserver.com (##### being your unique server id)
7. Testing: You can test the full functionality by doing a small modification in DB(posting , editing and viewing the blog). Currently your DB entry is pointing your actual domain (yourdaomain.com), you have to do a small change in your database for testing. Update yourdaomain.com entry to temp URL http://s#####.gridserver.com (unique Access Domain) in wp_wt1npm_options (or wp_ptions ) table.
Note: Before changing the DNS from dreamhost to mediatemple, make sure to replace temp URL in the database with the actual.
8. If everything is okay, go ahead and point DNS to Media Temple nameservers.
- I don’t know why this happened, but I had to login my wordpress and update the permlink structure once (after the move), otherwise wordpress errored out when I access single page.
- Comment out WP_CACHE in wp-config.php initially, else you will see blank page when you access the site( make sure to remove the comment later)
This process worked for me. You might have other issues, which I did not experience while moving. If you have any questions let me know, will try to answer