[wp-hackers] Site Address during development

Philip M. Hofer (Frumph) philip at frumph.net
Thu Sep 2 13:19:50 UTC 2010


I'm sorry vid, they're talking about the urls embedded in posts, when you 
embed media in posts.


----- Original Message ----- 
From: "Vid Luther" <vid at zippykid.com>
To: <wp-hackers at lists.automattic.com>
Sent: Thursday, September 02, 2010 6:15 AM
Subject: Re: [wp-hackers] Site Address during development


> Simplest thing would be to define it in the wp-config.php.
>
>
> define('WP_SITEURL', "http://example.com");
> define('WP_HOME', "http://example.com");
>
> You can get creative if you have the ability to set environment variables 
> within Apache,
> we do a SetEnv zippy_environment dev|stage|production.
>
> Then in the wp-config, you can do a case($_SERVER['zippy_environment']) {
>
> ...
>
> }
>
> I'm also playing with an idea of a plugin that is aware of this, so I 
> don't need to change the SQL, but it it filters any references to urls 
> through it..
> this is just an idea, I have no clue how sane it is, and if it's going to 
> bring the site to a screeching halt or not.
>
> The defines() above work though.
>
>
>
>
> Vid Luther
> CEO and Founder
> ZippyKid
> Managed Wordpress Hosting
> http://zippykid.com/
> 210-370-7475
>
>
>
>
> On Sep 2, 2010, at 8:08 AM, Philip M. Hofer (Frumph) wrote:
>
>> +1 to the gripe list on this one, I would like to see it auto generate 
>> the urls to the proper location in the post
>>
>>
>> ----- Original Message ----- From: "Gavin Pearce" 
>> <Gavin.Pearce at 3seven9.com>
>> To: <wp-hackers at lists.automattic.com>
>> Sent: Thursday, September 02, 2010 6:06 AM
>> Subject: Re: [wp-hackers] Site Address during development
>>
>>
>>> Hi Michael,
>>>
>>> This is one of my main gripes with WordPress - having to do a SQL
>>> find-and-replace between development and live URLs.
>>>
>>> I especially hate how the "new" menu feature, for the Home button
>>> creates a 'custom' link to the hard-coded URL of the current site.
>>>
>>> Changing the site URLs in either wp-config.php or in the back-end won't
>>> update these.
>>>
>>> If anyone knows a better way to run a dev and live version of a site,
>>> with easy database syncing, would be interested to know it also.
>>>
>>> Cheers,
>>> Gav
>>>
>>>
>>> -----Original Message-----
>>> From: wp-hackers-bounces at lists.automattic.com
>>> [mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of Michael
>>> Clark
>>> Sent: 02 September 2010 13:36
>>> To: wp-hackers at lists.automattic.com
>>> Subject: [wp-hackers] Site Address during development
>>>
>>> Good morning,
>>>
>>> I'm developing a site for a client, and they are finally able to
>>> start adding their info, posts and pages, both with a lot of photos.
>>> I have the WordPress address (URL) and Site address (URL) (set under
>>> http://www.example.com/wp-admin/options-general.php ) defined to be
>>> the temporary subdomain of their domain name. But when they embed
>>> photos or PDFs into a post or page, the temporary domain name is
>>> embedded into the post. Once we go live this weekend is there an easy
>>> way to change those details into the new, permanent domain name? I
>>> don't want to have to maintain the development URL forever.
>>>
>>> Actually, it seems silly to embed the domain name into the posts and
>>> pages at all. It's adding a bit to the page, plus possible delaying
>>> the loading of pages by fractions of a second as the page requests
>>> have to hit DNS. Shouldn't everything embedded be relative to the
>>> root directory of WordPress? Thanks, Mike
>>>
>>>
>>>
>>> -- 
>>>
>>> Michael Clark
>>> http://www.PlanetMike.com
>>>
>>> "Injustice anywhere is a threat to justice everywhere."
>>> - Martin Luther King Jr.
>>> _______________________________________________
>>> 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
>
> _______________________________________________
> 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