Support » Requests and Feedback » WordPress URL Setting

  • Resolved Shaun


    I use wordpress a lot for work and we always tend to build the site/theme/etc on a dev server and move it to the production server upon completion.

    Having the wp blog url stored in the db leaves most of the site links broken until it is updated once the site is moved over. While not incapacitating it is slightly annoying. Recently I had to deal with trying to set up WP on a SSL host (which didnt go well at all), but the url seemed to never work (could have been a server setting redirecting).

    What I would propose is storing this variable in the wp-config.php file instead, it seems like it would be easier to update here even if you could not log into the wp-admin (yes I know you can manually do it via the db).

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Ipstenu (Mika Epstein)


    Lead Plugin Wrangler

    You can.

    define('WP_SITEURL', '');
    define('WP_HOME', '');

    Most of the time, though, you build the site out on it’s own URL and then use the tricks in moving WordPress to solve that problem. Not like WP will run without the DB anyway 😉

    when WP pulls those values from the db is is just using the php define function to set them anyway?

    If thats the case I will always add those lines to my wp-config, however, when wordpress sets them from the db is it going to give errors? because im assuming it isnt using

    @define(‘WP_SITEURL’, ‘’);

    note the “@”

    Moderator Ipstenu (Mika Epstein)


    Lead Plugin Wrangler

    No, the config file overrides the database. You should be fine, and I’ve never needed to preface it with the @ symbol.

    wow thats awesome!! thank you!! just set it up

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WordPress URL Setting’ is closed to new replies.