GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Wordpress quiestion! MASS install? Heeeeeeeeeeeeelp (https://gfy.com/showthread.php?t=887646)

Antonio 02-13-2009 07:37 AM

Wordpress quiestion! MASS install? Heeeeeeeeeeeeelp
 
here's the story - I have 30 domains on the SAME host, can I install wordpress on all of them but use only ONE database?

What happens right now is I have to add database request for each one of them, then wait for the host to add the databases, then upload to each domain and so on..


I'm 99% sure that this can be done like blog one has tables with prefix 1 eg 1wp_posts, 1wp_comments, then blog 2 has a prefix 2 etc

Anyone done it?

thanks

HomerSimpson 02-13-2009 08:43 AM

you can use only one database

in wp-config.php there's a setting for table prefix
$table_prefix = 'wp_'; // Only numbers, letters, and underscores please!

all you need to do is change it
and there you go...

newbreed 02-13-2009 08:46 AM

The answer is yes, but it you use one database, you'll be limited to the plugins and template of that ONE database.

Also, you'll need to maintain one Admin section.

Content on each blog would obviously be the same as well.

Bro Media - BANNED FOR LIFE 02-13-2009 08:47 AM

Quote:

Originally Posted by newbreed (Post 15488204)
The answer is yes, but it you use one database, you'll be limited to the plugins and template of that ONE database.

Also, you'll need to maintain one Admin section.

Content on each blog would obviously be the same as well.

Fail. :1orglaugh

Quote:

Originally Posted by HomerSimpson (Post 15488195)
you can use only one database

in wp-config.php there's a setting for table prefix
$table_prefix = 'wp_'; // Only numbers, letters, and underscores please!

all you need to do is change it
and there you go...


Antonio 02-13-2009 08:54 AM

Quote:

Originally Posted by HomerSimpson (Post 15488195)
you can use only one database

in wp-config.php there's a setting for table prefix
$table_prefix = 'wp_'; // Only numbers, letters, and underscores please!

all you need to do is change it
and there you go...


Thanks! :thumbsup:thumbsup:thumbsup

fris 02-13-2009 09:01 AM

http://www.optiniche.com/blog/392/mu...ngle-database/

http://sitening.com/blog/how-to-easi...one-code-base/

candyflip 02-13-2009 09:24 AM

Quote:

Originally Posted by newbreed (Post 15488204)
The answer is yes, but it you use one database, you'll be limited to the plugins and template of that ONE database.

Also, you'll need to maintain one Admin section.

Content on each blog would obviously be the same as well.

Sorry man, but you're totally off on this one. :1orglaugh

Antonio 02-13-2009 09:33 AM


thanks the second link looks like exactly what I need but that code looks a bit weird to me (don't know php)

Code:

// You can have multiple installations in one database if you give each a unique prefix
$domain_list = array();

// auto database name
$domain_list["yourdomain.com"] = ??;

$domain_name = preg_replace(?/^www\./?, ??, $_SERVER["SERVER_NAME"]);

if (array_key_exists($domain_name, $domain_list))
{
$table_prefix = $domain_list[$domain_name];
if (!$table_prefix) { $table_prefix = ?wp_? . md5($domain_name); }
}
else
{
print ?Unknown error?; exit;
}

do I add every domain HERE:
$domain_list = array();

like

$domain_list = array(mydomain.com, mydomain2.com, mydomain3.com);

??


or just use the code as it is

thanks

Bro Media - BANNED FOR LIFE 02-13-2009 09:48 AM

Quote:

Originally Posted by Antonio (Post 15488602)
thanks the second link looks like exactly what I need but that code looks a bit weird to me (don't know php)

Code:

// You can have multiple installations in one database if you give each a unique prefix
$domain_list = array();

// auto database name
$domain_list["yourdomain.com"] = ??;

$domain_name = preg_replace(?/^www\./?, ??, $_SERVER["SERVER_NAME"]);

if (array_key_exists($domain_name, $domain_list))
{
$table_prefix = $domain_list[$domain_name];
if (!$table_prefix) { $table_prefix = ?wp_? . md5($domain_name); }
}
else
{
print ?Unknown error?; exit;
}

do I add every domain HERE:
$domain_list = array();

like

$domain_list = array(mydomain.com, mydomain2.com, mydomain3.com);

??


or just use the code as it is

thanks

yeah

$domain_list = array('domain.com', 'domain2.com', 'domain3.com');

teg0 02-13-2009 10:34 AM

if you use a lot of plugins you could run into some bugs, but someone already pointed that out. If they are pretty basic installs you'll be find as long as you change the prefix.

tranza 02-13-2009 11:16 AM

Hope you can fixed your problem

Z 02-13-2009 12:15 PM

Wordpress MU...learn it, love it.


All times are GMT -7. The time now is 04:37 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc