Forums

Why are siteurl and home URIs stored in the database? (4 posts)

  1. atow
    Member
    Posted 3 years ago #

    Why are the URI's for siteurl and home stored in the database in the first place? Why shouldn't it be possible for WordPress to determine the hostname at runtime? Then, you could simply specify the document root-relative path to WP and the blog home.

    In this document:

    http://codex.wordpress.org/Changing_The_Site_URL

    the page goes on at length about having to muck in the SQL source to search and replace the old siteurl with the new url.

  2. atow
    Member
    Posted 3 years ago #

    Perhaps to answer my own question, I found this thread:

    http://wordpress.org/support/topic/37838

    I prefer the idea of having a clean WP installation, even if this is only a one-line change. Can a plug-in can be written to swap the siteurl and home url variables with server generated values?

  3. Sushubh
    Member
    Posted 3 years ago #

    i had recommended this sometime back. i needed to call the same database at two different positions but the link system created problems coz they were linking to one of the two locations... but i lived through it...

  4. davidchait
    Member
    Posted 3 years ago #

    yeah, I think it's pretty bad having that stuff embedded in the database. it should really be in wp-settings, generated off server vars. Would make relocations MUCH simpler too. ;)

    -d

Topic Closed

This topic has been closed to new replies.

About this Topic