*nix Mischief: Rough outline for moving a WordPress blog to a new server…
This is here mostly for future reference and for Google’s sake. No warranty, blah blah… Comments are welcome.
Rough steps for moving a WordPress blog to a new server, while also moving the blog out of the root and into a subdirectory such as /blog/
Before starting, make sure you have the needed essential mod_rewrite skills.
1. Turn comments off on old blog
2. (Optional) Navigate to SK2.2 plug-in interface panel and flush all the spam out of your MySQL database to save a bit of space.
3. Using the backup plug-in, backup your entire WP database, and save it on the server. Include those needed SK2.2 tables in the backup
4. Download entire backup of your blog to home PC, including server backup file.
5. Create /blog/ subdirectory on new server
6. Upload files to new server
7. Uncompress your database backup and upload WP database to new server using MyPHPadmin.
8. Edit and upload (overwriting the old file) an updated /wp-config.php so that the new blog will query the proper database
9. (Assuming you don’t already have some special stuff in .htaccess), rm . (your old) htaccess;
10. Close your browser and other web tools. As root, edit your local PC’s /etc/hosts file to point to your new server. This should override worldwide DNS for just your machine.
11. Go to http://standardmischief.com/blog/wp-admin/upgrade.php and do an “upgrade” (might not be needed, but I did it)
12. Log in to blog, and go to http://standardmischief.com/blog/wp-admin/options-general.php . Update the both the WordPress address (URI) and the blog address (URL) field to http://standardmischief.com/blog/
13. Navigate to http://standardmischief.com/blog/wp-admin/options-permalink.php . Update your permalinks
14. Add “If you can read this message, the server switchover is working”, type post. Also add a test comment.
15. Do a “chmod 644 /blog/.htaccess”
16. Do whatever is needed to properly create the root .htaccess, and then also set the privileges to 644.
17. Test blog, test mod_rewrite. Make sure your feeds are properly redirecting with the proper 301 code.
18. Once you are convinced things are working, edit your DNS records on your domain to point to your new blog
19. Remove that line in your /etc/hosts file (/etc/host is the file in Linux, it’s different for different OS).