Moving WordPress to a New Domain Name

Last Updated on November 28, 2014 EST by Jordan

So there are a couple of things that you’ll need to do before to ensure a successful move of your WordPress Installation to a new domain name.

1. I’m sure you know how to copy all of the WordPress Files and Database to the new location where the new domain name has been setup. I’m not going to cover this, because I think its pretty straightforward and easy to find online.

2. After the move, you might notice that you’re unable to login to the admin interface “wp-admin”. A simply edit to the wp-config.php file will resolve that quickly. Place the following in the wp-config .php file within the root of your WordPress installation.

define('WP_HOME','http://geektank.net');
define('WP_SITEURL','http://geektank.net');

The domain name ‘geektank.net’ would be the new domain name, once the file has been modified and uploaded. You should be able to login to the admin interface at “wp-admin” again.

3. The next big issue you will find is that some plugins and images will still retain the old domain name. This is something that you will need to change manually by searching for the old domain name in your database using “phpMyadmin”.

Once I find a table with 10+ entries, I run a phpMyadmin query and do a search and replace.

update [table_name] set [field_name] = replace([field_name],'[string_to_find]','[string_to_replace]');

Once you run the query, if you do another search you’ll won’t find the old domain name being referenced in those tables anymore.

Viola, you’re done. If you need more instruction on how to complete the above tasks. Post a comment and I will update this post!


Did you like this article?