[wp-hackers] Site Address during development

Mike Little wordpress at zed1.com
Fri Sep 3 12:25:04 UTC 2010


On 3 September 2010 12:23, Bjorn Wijers <burobjorn at gmail.com> wrote:

>
> 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?
>
>
Here is my take on it.

What is being proposed is to enforce the calculation of the absolute URL on
every single WordPress installation feed (and any other way the content may
be accessed out of context of the web), to solve a problem that manifests
itself *at the point someone moves a site to a different domain*.

This 'solution' is 'fixing' a problem that doesn't exist.

The problem that does need fixing is "how to change all the absolute URLs
when I move my site."

So, how about approaching it from the other end?

Here is my proposal: A "development mode" plugin, that:

1) Has filters to prevent the URLs from being saved as absolute during
development and testing. Code to do this has already been kindly provided on
this thread.

2) Has filters to 'fix' the non-absolute URLs dynamically for feeds and
whatever else needs them during development.

3) Has a 'Go Live' button to click, which changes all the non-absolute URLs
to absolute ones when you deploy to live. Then removes all it's filters.

This would solve the real problem, with no overhead for *any* WordPress site
that isn't in development.

This could also be the basis for a number of other things that need tweaking
during development, debug mode, non-compressed css/js, no-index settings,
etc.


Mike
-- 
Mike Little
http://zed1.com/


More information about the wp-hackers mailing list