[wp-hackers] Site Address during development

Gavin Pearce Gavin.Pearce at 3seven9.com
Thu Sep 2 15:08:13 UTC 2010


Rather than having to bodge a solution, what's the odds of WordPress
core using relative URLs? 

Is there a reason why it doesn't?

Gav


-----Original Message-----
From: wp-hackers-bounces at lists.automattic.com
[mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of Otto
Sent: 02 September 2010 15:52
To: wp-hackers at lists.automattic.com
Subject: Re: [wp-hackers] Site Address during development

If you need a URL that can be run on a live box without editing, then
sure, editing hosts files is not an option there.

In that case, I'd create a plugin to dynamically change those URLs as
they passed through the_content and such.

But in the database, I'd always want the URLs to be the real deal.
This gives the best of all worlds:
a) no URL munging necessary when moving to production
b) local setups can be easily run with host file changes

Sure, you need a plugin to run an on-the-net demo box, but that's the
only case.

-Otto



On Thu, Sep 2, 2010 at 9:36 AM, Vid Luther <vid at zippykid.com> wrote:
>
>
>
> On Sep 2, 2010, at 9:30 AM, Otto wrote:
>
>> Edit your hosts file, and add a line like this:
>> 127.0.0.1 example.com
>>
>> Then set up WordPress on your local machine using the example.com
URL.
>>
>
> Only thing is, sometimes the client wants to approve the changes, so
there's a staging server in place.
> Most of our clients don't know how to edit their hosts file, don't use
firefox, and having them use a
> proxy where we can manipulate dns (we used to do this at network
solutions internally) is also not possible.
>
>
>> When you're ready to move it to the live server, delete the line from
>> the hosts file and just move the whole thing over. All the URLs will
>> still say example.com in them, it's just not pointing to your local
>> machine any more.
>>
>> -Otto
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers


More information about the wp-hackers mailing list