WordPress – How to Change the Site URL


How to Configure WordPress to work with a different URL.

If you move a WordPress Installation from a test site to a live new URL site, you will need to do some changes in the WordPress Setup.

These Adverts help to pay for this site.

I have seen many different options mentioned on doing this, and it begins to look complicated the more I read, BUT, I need to do this soon, so I want to check the best and easiest option to try first.

One site www.siteground.com says:

Wordpress LogoWordPress, however, relies on its URL settings to work correctly.

This means that if you simply move your files and database it will not work properly.

The URL settings are located in the application database. Fortunately, direct database modification can be avoided by using a nice function provided by the WordPress developers named “update_option”.

Agoda HolidaysAgoda HolidaysThese Adverts help to pay for this site.

Simply add these lines to the functions.php file of your theme:


Then simply load your site from its new location – it should work just fine.

Note that after you run your site once and you make sure it works you should delete those lines from your functions.php file. The settings are already stored in your database and should not be modified each time your site is loaded.

I may try that first.

If that does not work,

Bluehost has a video that shows how to do it: here

After that:

I will look at www.inmotionhosting.com as they show a very detailed, but complex system to do this.

10.1 - 547,786
Scroll down for Comments
0 0 vote
Article Rating
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Inline Feedbacks
View all comments