- Put up a robots.txt on the new domain with the following contents:
User-agent: * Disallow: /
- Copy the database and files to the new domain.
- Edit wp-config.php to have the right database settings, and add the following lines, replacing example.com with the right domain:
define('WP_SITEURL', 'http://www.example.com'); define('WP_HOME', 'http://www.example.com');
- Now set up your blog install, with the same settings as on the old domain (if you have a caching plugin installed, delete your cache files)
- Install the Search and Replace plugin, and do a search and replace for your old URL’s and change them with your new URL’s.
- Once you’re done moving WordPress, and you’ve checked everything works twice:
- Remove the robots.txt file.
- On your old blog, add the following line to your apache .htaccessor vhost-config:
Redirect 301 /blog/ http://www.newdomain.com/
- Remove the old blog code and database.
- Change your FeedBurner account, if you have one, to pick up the correct feed.
The same steps should help when you simply move WordPress from one domain to the other and are not changing a directory. Be sure to omit the directory from the redirect line above.
You’ve moved WordPress to a new domain.