[wp-hackers] Site Address during development

Mike Schinkel mikeschinkel at newclarity.net
Fri Sep 3 16:38:35 UTC 2010

On Sep 3, 2010, at 10:51 AM, Jeremy Clarke wrote:
> To summarize the (simplest) plugin that I think would be ideal based on all
> this discussion:
>   - Offer a way to define a development URL to override the one in the db
>   (in conjunction with the wp-config constants)
>   - Filter all post data being *saved* to the db to use the original 'live'
>   url from the wp_options table
>   - Filter all *displayed* post data to str_replace the dev url with the
>   live one
> Reasons:
>   - Ensures that the hardcoded urls in the database will work on live.
>   - During dev the two levels of filtering (during save and during display)
>   might waste resources but once the site is launched all URLs will work
>   without filtering.
>   - It basically allows for the hosts file trick but without needing you to
>   manage hosts files, I think it could all be done with a plugin.
> IMHO this would be a great candidate for a Canonical/Core plugin. Lots of
> people need it but having it in core would be very confusing for the
> majority of WP users.

This does the defining of the development URL (and other needed info) and it does the filtering:


I mentioned in earlier in the thread and asked for feedback:



More information about the wp-hackers mailing list