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

Mike Little wordpress at zed1.com
Sun Oct 30 20:25:01 UTC 2011


On Sun, Oct 30, 2011 at 16:33, sam auciello <info at samauciello.com> 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?
>
>
Because php serialzed data in the database (which many plugins store) that
contains the domain name will break if the length of the domain changes (as
it would with a dumb search and replace). There are several solutions out
there that claim to resolve the situation intelligently. I've not tried any
of them as I have a perfectly working solution I am comfortable with, but
many people can vouch for them.



> > 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.
>
>
Still, it's not going to happen any time soon for lots of very valid
reasons.



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


More information about the wp-hackers mailing list