WordPress Blog Address Change

I need to change My WordPress Blog URL two times. Once I have transferred by blog from subdomain to main domain. Then define('RELOCATE', true); in wp-config.php was enough.

Then I changed my domain completely. I got the point that using the same custom domain used on blogger (satya-weblog.com) will be far better. So, I have changed my domain name satyakaran.com to satya-weblog.com. For this I have to remove the custom setting from blogger. In this case, above relocate method did not work.

I need to add two lines on wp-config.php and two lines on fuctions.php file for WordPress address change. File wp-config.php resides in the folder where WordPress was installed and file functions.php is of theme (wp-content/themes/themeName/) to tell WordPress about blog address change.
In File wp-config.php:
// New blog address
define('WP_HOME','http://www.satya-weblog.com');
// Different only when you want different URL than where you put your wordpress
define('WP_SITEURL','http://www.satya-weblog.com');
In File functions.php:
update_option('siteurl','http://www.satya-weblog.com');
update_option('home','http://www.satya-weblog.com');

Applying this change is very easy. Even more easier is to changed in table. For mentioning the WordPress address change, Go to table wp_options, using phpmyadmin. Just change in a column (siteurl) is required. You would have find your old URL there. Just replace it with new one. In wp_options you will find very few records, possibly 30-40 records only.

You may also need to delete the cache folder- here wp-content/cache.

Here are more details of Changing The Site URL on WordPress site itself.

After adding those PHP lines in wp-admin.php and functions.php file,
Input boxes with this Label -
WordPress Address (URL) ,

Blog Address (URL)

will be disabled. Those four lines actually have changed your entry in your database (wp_options table). So, you can delete those line. At one point in the wordpress, it is recommended to do so. After you delete those four line, your disabled box will be enabled with correct values.

WordPress is flexible!

  • # 1 - by RobD

    Hey very nice blog!!….I’m an instant fan, I have bookmarked you and I’ll be checking back on a regular….See ya 🙂

  • # 2 - by RobD

    Hey very nice blog!!….I’m an instant fan, I have bookmarked you and I’ll be checking back on a regular….See ya 🙂

  • # 3 - by RobD

    I usually don’t post on Blogs but ya forced me to, great info.. excellent! … I’ll add a backlink and bookmark your site. 🙂

  • # 4 - by RobD

    I usually don’t post on Blogs but ya forced me to, great info.. excellent! … I’ll add a backlink and bookmark your site. 🙂

Comments are open for an year period. Please, write here on Facebook page.