Thursday, September 24, 2009

How to move your WordPress blog to a new domain (the easy way)

Whether you're moving a WordPress blog to a new domain or moving a new blog from staging to live, it could be problematic especially if you don't like mucking around with the database. Here's an easy way to move your blog just by editing wp-config.php and using the Velvet Blues Update URLs plugin.

Edit wp-config.php, add the following lines at the beginning of the file (where "example.com" is the NEW location of your site):
define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');

After editing wp-config.php, you will be able to access your new blog's admin on the new domain, but images and links that are on your blog posts will still be pointing to your old domain. To fix this, download and install the Velvet Blues Update URLs plugin. Go to Settings-> Update Urls, select "Update urls AND links in page or post content: YES", enter your old URL and your new URL, and click Update URLs.

..and you're done! :)

No comments:

Post a Comment