Changing the Domain of your WordPress Site

June 14, 2010 – 9:00 am |

If you are not changing the domain of your WordPress site, please check out our article called “Moving Your WordPress Site to a New Server”.


We will cover both scenarios of what to do if you need to change your WordPress domain name, the first being the “right” way to do this, and the second being the more likely “oh, crap!” way to do it.

ALWAYS ALWAYS ALWAYS backup your database before you make a major change with WordPress. Always.

The right way to change your WordPress domain

The thing that makes this the right way to move your WordPress blog, is that you are doing these steps before you move the scripts or change your domain.

Note: You will NOT be able to access your blog once you make this change, until you move it to the new domain.

Simply go to your Settings >> General administration area of your blog.

a Settings General Changing the Domain of your WordPress Site

You will see a page that has your Blog’s URL on it twice, change the URL to the right one for where your blog is going, then click save.

b change domain 1024x222 Changing the Domain of your WordPress Site

Now you can move the database and the scripts to your new server, or just switch the domain around!

The “other” way to move your WordPress blog to a new domain

I referred to this as the “oh, crap!” way of handling this transition above, because most times if you have to resort to this, then you made a mistake or skipped steps.

This is pretty simple to do as well, but there are a few more steps involved.  You will need to get into the database to make some changes there, as the domain that the WordPress files (scripts) on your server are associated with is stored in the database.

The first step is to get to your wp_options table in your database.  The screenshots we use are of phpMyAdmin which is a great database tool that most hosts provide for MySQL/PHP.  You can always do this manually via SSH if your host allows that sort of activity.

Sometimes your wp_options table will be named something like wp_abcsde_options, but you will always be able to find it from the “_options” at the end of the table name.

1 wp optionstable Changing the Domain of your WordPress Site

Once you have opened the link for the _options table, just click the “Search” link. this will help you build the request you need so that you can change the right data.

2 Search Form Changing the Domain of your WordPress Site

The Search tab will show you a form like the image below, just type in your old domain into the option_value, and choose the “Like %…%” option. When you press “Go”, phpMyAdmin will generate the query and show you the matching results.

3 Set up the query Changing the Domain of your WordPress Site

The results will show in similar fashion to the next image, you will want to click the “Check All” link, then the “Edit” button. The Edit button is a little pencil.

4 Click to edit 1024x316 Changing the Domain of your WordPress Site

Once you click “Edit” you will see a screen with a box like the below image for EACH of the items that you checked the boxes for on the previous screen.  Find every instance of your old domain and replace it with the new one.  Using Ctrl + F in the browser to find these strings makes things very easy.

5 replace old with new Changing the Domain of your WordPress Site

You will notice that some of the boxes have more than just a single string of a URL.  In these cases, it is important to make sure you find ALL of the places where your old domain was, and replace them with the new one.

6 replace all of the old domains Changing the Domain of your WordPress Site

When you are all done, just click “Go” and your information will be saved. If your site is already on the new domain, you should be able to use your blog immediately.  If not, you can move your site after these steps.

pixel Changing the Domain of your WordPress Site

Tagged: , , , , , , , , , , ,