followup:
I guess I just can’t see any advantage to putting such a critical parameter in the DB. It makes changing this when moving a site a lot more painful than it should. Even with the PHP functions which are designed to do this.
ClatonJames, I’m a new WP user (and reformed PHP/MySQL coder), trying to rescue a client’s site that got hacked. Copy the DB and PHP files, install on a different server. Comes up, but all links broken, pointing at original server.
Can’t login, it redirects to the original server.
Looked for some hardwired URL in the PHP files, where I’d expect. Nope. Searched thru PHP files, found lots of use of ‘siteurl’ and ‘home’, yet couldn’t find them defined anywhere.
Finally, now that I knew the variables’ names, googled and found they’re set in the DB. Ug. Used an “UPDATE wp_options …” SQL comand to fix it. But wasted over an hour to do this. Very counter-intuitive.
Seems links should be relative, and if you have to hard code them, make it easier and more obvious, like in the same file where you give it your DB connection parameters. That’s where I’d look anyway.