Sunday, November 16, 2008

Changing Your Wordpress URL

Well, I was thinking about changing my blog URL to a nicer one. Added the new DNS sub domain and pointed it to my server. Created a new entry inapache configuration and moved all the files to the new document root( optional - only if you want to move it into a new location). This is enough to change the URL for a normal website. But for a CMS/blogging software that stores all the data and meta data in databases, this is not enough.

For wordpress, there are two database entries that affects the url. Both resides in the table wp_options. So need to update them as well.

mysql> update wp_options set optionvalue='http://techlog.safeer.in' where option_name='home';

mysql> update wp_options set optionvalue='http://techlog.safeer.in' where option_name='siteurl';
That is it. All set now.

No comments:

Post a Comment