Moving Your WordPress Blog From One Host to Another
We’ve changed URLs from WordPress.PH to WordPressPhilippines.org. So now if you’ll be visiting the old URL, you’ll end up here—hopefully instantly. It was a pretty painless process, which is one of the strong points of having a WordPress-powered site. Here are some pointers when moving your WordPress installation from one server to another:
Backup
There is not one word more important than “backup” when we talk about websites. (Computers in general, actually, but that’s another matter altogether.) You should be backing up your files regularly, but this time make one final backup before the move. Remember, you need to backup the database in which all your posts are stored and you need to backup the files which are used to run your website.
Restore
Restoring your database and files is the converse of backing up, with one difference: you have to update your account details like the database name, database user, database password, and the server path in several places for your new site to work properly.
- Create a new database which will hold your old data. It can be a new database name, database user, and database password—or not. Just remember the database details for later on.
- Import your data to the new database.
- Enter your new database details into your wp-config.php file—if you have changed them.
- Upload your site files to your new server.
Find and Replace
Because the old WordPress Philippines URL is embedded within our blog posts and comments, we had to look for every single one and change each to the new URL. Doing it manually inside a database environment is tedious and scary, depending on your expertise:
- Replace: old server path with new server path in wp_options
- Replace: old URL with new URL in wp_posts, wp_comments, wp_options, etc.
You can skip the 2nd step and do it later using the Search and Replace plugin, once your site is working properly.
Redirect
Tell Google and other search engines you’ve moved with two steps. First, edit your .htaccess file and add this:
redirect 301 / http://www.yournewsite.com/
Second, open your robots.txt (or create one if non-existent) and enter this:
User-agent: *
Disallow: /
Notify
Finally, let your friends know you’ve moved. They’ll probably notice the change of URL because of the redirect, but a letting them know won’t hurt. If you’ve submitted your site to pinging services and blog directories, be sure to change the URLs there as well.
Consider this a new opportunity to “relaunch” your blog.


