[wp-hackers] wp-hackers Digest, Vol 81, Issue 62
sam auciello
info at samauciello.com
Sun Oct 30 16:33:32 UTC 2011
> 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.
More information about the wp-hackers
mailing list