Sunday, March 10, 2013

Changing the URL on a WordPress Website

Issue: There are times when you’ve built your wordpress website using one URL and then need to change that URL for deployment.

This is common if you are doing an upgrade of a current website but don’t want to point the URL over to the new site until it’s complete.

This isn’t always a smooth transition. Here are some road blocks you will have to consider.

    The Domain Name will need to be associated with the new site location. (often on a different server).
    Domain association changes aren’t typically real time and if that’s the case there will be no way to know when that change will take place.
    In the WordPress Admin Panel under general setting, there are two changes that will need to be made.
    •WordPress address (URL)
    •BLOG Address (URL)

Now for the most common problem. If you follow steps 1 through 3 above and something happens where the new domain name isn’t pointing properly, the wp-admin panel won’t have the correct URL and you won’t be able to get in to fix the URL. This can also happen if you type in the URL wrong.

Don’t panic, all is not lost. You are going to need access to the mySQL database to fix this but it’s a quick fix. Because WordPress is data driven then URL addresses are kept in a table named wp_options.

Open this table and alter the values for the following meta_keys:

    siteurl
    home

Change these to the correct URL and you’re back in business.

0 comments:

Post a Comment