Has there been a good argument as to why WordPress includes the full TLD domain in the database?
Specifically the ‘posts’ table in the ‘guid’ column, WordPress also stores it in both the site_url option and home_url. Shouldn’t it just store “/” or “/blog” in the home_url field? Wouldn’t it be much DRYer and much more efficient to just store the TLD once and then have everything else build off of that?
For instance if I update my “WordPress address (URL)” within the settings section it doesn’t update all of the post records with the new url, it keeps it at the old one. This is only really a problem with media uploads at the moment since posts don’t really reference this value at all at the moment.
Instead of this:
Why not this?
It’s just kind of annoying when you switch a site from dev.mysite.com to mysite.com and have to update things in a few places when I think it would make a lot more sense to build off of the TLD once.
If I am missing something or someone from WordPress core can jump in that would be great, just wanted to know the thought process behind it.
- The topic ‘Discussion: Why does WordPress store the TLD/absolute URL in the database?’ is closed to new replies.