Can anyone help?

I've been building a wordpress site in a sub directory of an umbrella 'development domain' if you will, and am ready to go live with the site.

It's a single install of wordpress.

The wordpress file location is to remain exactly as it is, and we're just repointing the DNS of the live domain to the subdirectory of the development domain.

I hope this makes sense so far.

In my general > settings section of the admin, I've set the url to be


As that is the url my development domain has allocated to it. We didn't update the DNS settings of the REAL domain prior to now as there is an existing website already up.

Bearing in mind that no wordpress files are going to be moved, can i just change the wordpress address and site address under settings to www.newlivesiteurl.com?

Any advice would be appreciated.



Ok so I've edited my config file with the details suggested below, but now when i try to log into my wordpress admin, I'm stuck in a continuous loop. It juts keeps redirecting me back to the login screen!

Any help would be greatly appreciated....

3 Answers 3


This question has been asked many many times before.

Here's the Codex: http://codex.wordpress.org/Changing_The_Site_URL

The easiest thing to do is add a couple of lines to your wp-config.php

  • Yes I appreciate that this question has been asked before - I just wanted confirmation as in this situation it's slightly different as the location of the files aren't changing. Just the domain to access the site. But thanks for confirming on the above. I figured that was the easiest method.
    – V Neal
    Commented Sep 5, 2012 at 8:33
  • Actually one more thing - if I'm adding the above to the site config file, should I delete the entries from the admin section?
    – V Neal
    Commented Sep 5, 2012 at 9:57
  • 2
    You can't - if WP sees that you've defined the constants in wp-config.php, it locks the fields in Settings. So you don't need to do anything there.
    – anu
    Commented Sep 5, 2012 at 10:06

Be aware you'll need to update all links to media in any posts you've created (or pages etc.) you can do this manually or run a find replace on your SQL dump before putting the SQL onto your live site database.

  • 1
    Hi - yes. Thanks. Was thinking of using the Velvet Blues Update URLs plugin for this part..
    – V Neal
    Commented Sep 5, 2012 at 9:58
  • Yeah, it's a good plugin. I actually have a php file on my local host to do this. I have a temp database, copy the Wordpress one to it, run the php script with a find term and a replace term, the copy the tables from the temp to live. This means I don't have someone elses plugin to rely on, but as I say that plugin is good so the choice is yours :) Commented Sep 5, 2012 at 10:00
  • Hmm - my PHP isn't that great though - still finding my way around and would hate to mess things up. Maybe in time that'll be the way forward for me.
    – V Neal
    Commented Sep 5, 2012 at 10:02

Rather bizarrely, removing the setting in the config file and changing the site's url via the admin system seems to have done the trick. Odd.

  • 1
    That's exactly as I'd expect it to work, but I think anu was suggesting it was a more efficient way to put a site live by editing the config file. I've actually got one config file for live and dev sites with a switch statement switching on the domain name, name.com or name.dev (on my localhost) which sets the URL and database settings etc based on the url of the site. Commented Sep 6, 2012 at 9:59
  • Well 'efficient or not - it broke my site! Luckily all fixed now - probably something I did wrong...
    – V Neal
    Commented Sep 7, 2012 at 10:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.