[wp-hackers] wp-hackers Digest, Vol 81, Issue 62

Gregg Tomlinson gregg at fatheaddesign.com
Sun Oct 30 18:20:50 UTC 2011


Sam said:

Regardless it seems the correct thing for me to do is start using something
like dev.example.com instead of example.com/wp but if I did this it seems
like relative urls would still save me the find and replace step.  So I'd
still be in favor of an optional constant solution.

For NEW sitebuilds the dev.example.com (as dev) and migrate to www.example.com (as live) is the methodology I've always used. Then before launch you migrate all files to your live server, run a simple find/replace on your db, edit hostfile to test, and you're done.

Is there a better way? I gotta admit I'm intrigued by Rafael's searchreplacedb.php solution, and will definitely be trying that on two sites I'm launching early this week.

--g


On Oct 30, 2011, at 11:33 AM, sam auciello wrote:

>> As I mentioned elsewhere, get your self a short domain. Create your clients
>> site on a subdomain of it (with a character count exactly the same length
>> of
>> the live domain) so that wordPress is in the root of the site.
>> 
> 
> I'm still a bit confused.  Firstly, why do I need a the domain to have the
> same length??  Since when does search and replace care about the relative
> length of the strings?
> 
> 
>> No they wouldn't: /wp/wp-content/uploads/2011/10/29/my-images.jpg still
>> needs to be changed to /wp-content/uploads/2011/10/29/my-images.jpg
>> regardless of whether it start with the domain or not.
>> 
>> 
> Right, I was getting confused by the root part of root relative there.  I
> was thinking that the images would be saved as
> /wp-content/uploads/2011/10/29/my-images.jpg
> and example.com/wp (my site address) would be prepended.  The proposal is
> that for the purposes of content not being exported this wouldn't be
> necessary.
> 
> Regardless it seems the correct thing for me to do is start using something
> like dev.example.com instead of example.com/wp but if I did this it seems
> like relative urls would still save me the find and replace step.  So I'd
> still be in favor of an optional constant solution.
> 
> Peace
> ~Sam
> 
> Aw c'mon, no offense to Mike, but that's just ridiculous, please,
>> seriously, just use this script:
>> 
>> 
>> http://www.interconnectit.com/wp-content/uploads/2011/05/searchreplacedb2.zip
>> 
>> It's an easy process:
>> 
>> 1. Change DB Connection in wp-config.php
>> 2. Upload all WP files from local to production (and searchreplacedb.php to
>> root file of wp)
>> 3. Export DB from local to production
>> 4. Run searchreplacedb.php
>> 5. Log in to WordPress -> Settings -> Save Permalinks (to regenerate)
>> 6. Profit!!!
>> 
>> 
>> Seriously, use that script!
>> 
>> Best regards,
>> 
>> Rafael Ehlers
>> 
>> 
> Search and replace is easy enough with a manual sql query but thanks.  The
> process isn't that complex but it can be confusing to someone new to it so
> I tend to think anything that make this initially daunting 16 step process
> simpler seem like a good idea to me.
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

::::  ::::  ::::

Gregg Tomlinson
Principal

fathead design, inc.
1329 W. Loyola Ave., Suite G2  |  Chicago, Illinois  60626

p: 773.338.1313  |  f: 773.236.8573  |  t: 877.309.7799

http://fatheaddesign.com  |  http://contactsolved.com
fb: http://www.facebook.com/fatheaddesign  |  twitter: http://twitter.com/fatheaddesign




More information about the wp-hackers mailing list