[wp-hackers] Multiple versions of same install independently running on same server
Ryan McCue
lists at rotorised.com
Tue Mar 13 01:46:31 UTC 2012
Hydrostarr wrote:
> Update: am wondering if the following /etc/wordpress/wp-config.php
> file (which we just discovered) might be contributing to these probs.
> To note: looks like the Ubuntu wordpress debian pkg put its stuff in
> /usr/share/wordpress/*, while our single (working) WP server is mostly
> living in /var (like /var/www) areas... fwiw.
Looks like they're adding a custom wp-config.php into the install
directory to load from one of these. I personally think that's a
horrible idea, and serves to show why you shouldn't use that package.
However, if you have your own copy of WordPress that isn't based on this
(i.e. doesn't include their wp-config.php), you should be fine.
robin niemeyer wrote:
> I can't imagine a case why it shouldn't work, I guess. Maybe a lack of
> imagination, but an array or object serialized into a string stays a
> string, so there shouldn't be a problem a regex can't handle (if this
> could be said about*life* to...)
Serialised strings include a length, so using a regex to change them
will change the length of the string and cause it to become invalid.
(This includes strings inside arrays or objects.)
If you want to apply a regex, your best bet is to unserialize the data,
map your regex to each parameter and then reserialize and save. (Might
require a recursive version of `array_map` if you want to make sure of it.)
It's a better idea to just apply it to the properties you actually want
to change (mainly, the content). You shouldn't change the GUID field
when simply moving to a new domain, as that's used for deduplication by
feed readers, and changing it will indicate that it's new content. (As
the developer of a feed reader, I hate when people do this. It's fine if
you're duplicating the blog to a new site though.)
--
Ryan McCue
<http://ryanmccue.info/>
More information about the wp-hackers
mailing list