[wp-hackers] Multiple versions of same install independently running on same server
robin niemeyer
robin.niemeyer at gmx.net
Mon Mar 12 14:18:38 UTC 2012
> Even with serialized data?
> Seems like most people are saying that it won't work out because of how wp
> stores data
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...)
-Robin
Am 12.03.2012 14:46, schrieb Kokarn:
>> Same approach here, never have faced any problems in years.
>
> Even with serialized data?
> Seems like most people are saying that it won't work out because of how wp
> stores data but i'm not having any problems at all with that exact approach.
>
> On 12 March 2012 14:41, robin niemeyer <robin.niemeyer at gmx.net> wrote:
>
>>
>>
>> Am 12.03.2012 10:11, schrieb Hydrostarr:
>>> Update: am wondering if the following /etc/wordpress/wp-config.php file
>>> (which we just discovered) might be contributing to these probs.
>>
>> Dunno, but I'm pretty sure it ain't that helpful.
>>
>> As was said earlier (I think), it's best to follow the standard
>> installation procedure, with one config file per site sitting in the
>> site's root dir etc.
>>
>>> mysqldump -u youruser -p yourdatabase > database-2012-3-12.sql
>>>
>>> sed -i 's/olddomain\.com/newdomain\.com/g' database-2012-3-12.sql
>>>
>>> mysql -u youruser -p yourdatabase < database-2012-3-12.sql
>>
>> Same approach here, never have faced any problems in years.
>>
>> -Robin
>>
>> 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.
>>>
>>> <code=start>
>>>
>>> <?php
>>> /***
>>> * WordPress's Debianised default master config file
>>> * Please do NOT edit and learn how the configuration works in
>>> * /usr/share/doc/wordpress/README.Debian
>>> ***/
>>>
>>> /* Look up a host-specific config file in
>>> * /etc/wordpress/config-<host>.php or /etc/wordpress/config-<domain>.php
>>> */
>>> $debian_server = preg_replace('/:.*/', "", $_SERVER['HTTP_HOST']);
>>> $debian_server = preg_replace("/[^a-zA-Z0-9.\-]/", "", $debian_server);
>>> $debian_file =
>> '/etc/wordpress/config-'.strtolower($debian_server).'.php';
>>> /* Main site in case of multisite with subdomains */
>>> $debian_main_server = preg_replace("/^[^.]*\./", "", $debian_server);
>>> $debian_main_file =
>>> '/etc/wordpress/config-'.strtolower($debian_main_server).'.php';
>>>
>>> if (file_exists($debian_file)) {
>>> require_once($debian_file);
>>> define('DEBIAN_FILE', $debian_file);
>>> } elseif (file_exists($debian_main_file)) {
>>> require_once($debian_main_file);
>>> define('DEBIAN_FILE', $debian_main_file);
>>> } elseif (file_exists("/etc/wordpress/config-default.php")) {
>>> require_once("/etc/wordpress/config-default.php");
>>> define('DEBIAN_FILE', "/etc/wordpress/config-default.php");
>>> } else {
>>> header("HTTP/1.0 404 Not Found");
>>> echo "Neither <b>$debian_file</b> nor <b>$debian_main_file</b> could be
>>> found. <br/> Ensure one of them exists, is readable by the webserver and
>>> contains the right password/username.";
>>> exit(1);
>>> }
>>>
>>> /* Default value for some constants if they have not yet been set
>>> by the host-specific config files */
>>> define('ABSPATH', '/usr/share/wordpress/');
>>> define('WP_CORE_UPDATE', false);
>>> define('WP_ALLOW_MULTISITE', true);
>>> define('DB_NAME', 'wordpress');
>>> define('DB_USER', 'wordpress');
>>> define('DB_HOST', 'localhost');
>>>
>>> /* Default value for the table_prefix variable so that it doesn't need to
>>> be put in every host-specific config file */
>>> if (!isset($table_prefix)) {
>>> $table_prefix = 'wp_';
>>> }
>>>
>>> require_once(ABSPATH . 'wp-settings.php');
>>> ?>
>>>
>>> </code>
>>>
>>>
>>> On 3/11/12 3:57 PM, Hydrostarr wrote:
>>>> Thanks Mike. Good to know WP -can- support multiple, independent
>>>> installs on same server. Now just need to figure out how to do it.
>>>>
>>>> Re: the "relative to root" debate: interesting. Good to know, and thx
>>>> for the executive summary, saves significant research time.
>>>>
>>>> Re: stock Ubuntu install: fwiw, we don't use the actual /var/www code
>>>> from 'apt-get install wordpress'. We simply "re-clone" (via 'git
>>>> clone' with some database changes as perviously mentioned) our working
>>>> code set from various dev servers/platforms (including Windows) and
>>>> are running WP 3.3.x. We employ 'apt-get install wordpress' primarily
>>>> to auto-install all the dependencies that WP uses (Apache, mysql, php,
>>>> etc) easily. Appropriate?
>>>>
>>>>
>>>> Mike Little writes:
>>>>> On Sun, Mar 11, 2012 at 16:54, Hydrostarr <
>>>>> lists.automattic.com--wp-hackers at hydrostarr.com> wrote:
>>>>>
>>>>>> WP just doesn't "work relative to a root" like most all other
>>>> web-server apps
>>>>>> that's we've employed previously.
>>>>>>
>>>>> Please search for many long and often heated discussions about this
>>>> subject
>>>>> in the mailing list archives
>>>>> http://lists.automattic.com/pipermail/wp-hackers/
>>>>> Executive summary - agree or disagree, it isn't going to change anytime
>>>>> soon.
>>>>>
>>>>>
>>>>>> Ubuntu 11.04.
>>>>>> Stock WP install with 'apt-get install wordpress' (maybe the latter
>> is
>>>>>> a/the problem)?
>>>>>>
>>>>>
>>>>> Don't do that! It looks like it will install WordPress 2.9.2 which is
>>>> very,
>>>>> very, old. Just download WordPress as normal
>>>> (http://wordpress.org/download/)
>>>>> and install it in as many vhost document roots as you like.
>>>>>
>>>>> I have more than 200 WordPress install across my three servers
>>>> (including
>>>>> local dev server) all using Apache vhosts, most have separate
>>>> installs and
>>>>> databases, a few are multisite with from 3 to 50 subsites.
>>>>
>>> _______________________________________________
>>> 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