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.

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”.

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

update_option('siteurl','http://www.new-site-address.com');
update_option('home','http://www.new-site-address.com');

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.




43.1 - 865,090
DreamHost

Scroll down for Comments
0 0 votes
Article Rating
Subscribe
Notify of

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

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x