[wp-hackers] Site Address during development

Scot Hacker shacker at birdhouse.org
Fri Sep 3 15:54:43 UTC 2010


> I'm pretty certain we can fix this in such a way that content still is 
> addressable by one url (as explained by Otto) by making use of the 
> already existing WP_SITEURL and WP_HOME constants.
> 
> Instead of writing the absolute url to the database we can assemble the 
> absolute url on-the-fly and thus make sure all content will have an 
> absolute url (for feeds and other purposes).
> 
> It seems so easy and I'm probably not the first proposing this. So why 
> hasn't this been done yet? Am I missing something?
> 
> If so please enlighten me :)

Huge +1 on this from me. Those 11 million WP users who never move their sites may not notice, but a lot of those 11 million sites are created FOR the users on development boxes or staging servers and have to be moved into place later, or worked on in multiple environments simultaneously. 

Even if it doesn't affect a majority of users, hard-wiring URLs is just a bad architectural choice on WP's part. I spend most of my development time doing Django and WordPress work. Django never hard-codes domains into URLs - all URLs are built on the fly. The advantages this provides in terms of working on sites in local development, staging, and production (with copies of the  same database) is significant. This aspect of WP's architecture feels hokey in comparison.

./s



More information about the wp-hackers mailing list