So you changed your domain name. Then you tried to view your WordPress blog.
You see your blog. If the stylesheets are not in cache anymore, you see a plain blog without any styles. You try to access your admin interface. And it routes you to the old domain name and gives an error. You are now stuck out of your blog. You start to freak out. You think you really should have backed up the data. How important is the data after all? What will happen to your entries? Will you need to start anew? Somebody, think of children!
First of all – calm down, woman! That’s right, I said woman. This would never happen to guys…. Ok, just kidding. I’m a guy and this just happened to me. WordPress stores the URL of your blog in its database. That’s how it makes all the category links, sublinks and inter-post links. This allows you to change your URL and still rely on WordPress to generate all the category links, post links, comments, tags correctly. You simply need to change this value in the database.
Ideally, you should change the site URL in the WordPress settings page before requesting a URL name change from your ISP. But if it’s already done, no big deal.
Log in to your ISP interface. Find the option where it allows you to access your database. Open the panel and look for databases. If you have multiple blogs, you will see multiple database. The database you need to open should be numbered in the order which your blog in question was started. Open the database and find the table ‘wp_options’. Open this table and find the column ‘siteurl’. Change the value of this field from the old URL to the new URL. Hit ‘Save’, ‘Go’, or whatever else your interface provides. Now you should be able to login to your WordPress blog and change all the other settings from within by going to the Settings page.
So if you can’t login to your blog after a domain change, do not worry. Simply, change the URL in the database.