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)
-   -   Sharing WP MySQL (https://gfy.com/showthread.php?t=779244)

baddog 10-24-2007 06:53 PM

Sharing WP MySQL
 
Pretty sure I read here that you can have multiple WP blogs on one MySQL database.

Can someone confirm this for me?

RawAlex 10-24-2007 07:10 PM

I wrote a little routine that I use to pull the newest post from the WP database and use it to show on another site. Yes, in theory, you can access the data and use it in more than one place.

However, because WP puts all the site information and such into the DB, it is hard to get around stuff. You would have to make a nice custom hack to use one database for the site information (which includes all the links, categories, the base URL, etc) and another to get the posts.

That would probably get ugly.

viki 10-24-2007 07:14 PM

You can setup blogs or other scripts on the same DB as long as you put a different table prefix on during the install.

jacked 10-24-2007 07:46 PM

Quote:

Originally Posted by viki (Post 13283627)
You can setup blogs or other scripts on the same DB as long as you put a different table prefix on during the install.

first time i noticed it in the wp-config the other day

Code:

// You can have multiple installations in one database if you give each a unique prefix
$table_prefix  = 'wp_';  // Only numbers, letters, and underscores please!

// Change this to localize WordPress.  A corresponding MO file for the
// chosen language must be installed to wp-content/languages.
// For example, install de.mo to wp-content/languages and set WPLANG to 'de'
// to enable German language support.
define ('WPLANG', '');

/* That's all, stop editing! Happy blogging. */

this is under the MySQL settings in the config just change the prefix to wp_1 instead of wp_ , and you should be good to go.

baddog 10-24-2007 07:47 PM

thank you, every one

Subway 10-25-2007 03:15 PM

It is possible but is it wise ?

I rather have 100 small mysql databases than 1 large database.

Much better if you want to restore

ClickBuster 10-25-2007 04:20 PM

Quote:

Originally Posted by jacked (Post 13283729)
first time i noticed it in the wp-config the other day

Code:

// You can have multiple installations in one database if you give each a unique prefix
$table_prefix  = 'wp_';  // Only numbers, letters, and underscores please!

// Change this to localize WordPress.  A corresponding MO file for the
// chosen language must be installed to wp-content/languages.
// For example, install de.mo to wp-content/languages and set WPLANG to 'de'
// to enable German language support.
define ('WPLANG', '');

/* That's all, stop editing! Happy blogging. */

this is under the MySQL settings in the config just change the prefix to wp_1 instead of wp_ , and you should be good to go.

Yeah, DON'T DO THAT! That will only change the configuration, but not the actual table names. Table prefix is configure BEFORE the tables are created :) But yeah, you can put 100s of them in 1 single db and watch it crash :)

GreyWolf 10-25-2007 06:21 PM

Quote:

Originally Posted by Subway (Post 13287591)
It is possible but is it wise ?

I rather have 100 small mysql databases than 1 large database.

Much better if you want to restore

Wot he said ^^^ :thumbsup

Keep it simple and spread the risk.

baddog 10-25-2007 06:23 PM

Quote:

Originally Posted by Subway (Post 13287591)
It is possible but is it wise ?

I rather have 100 small mysql databases than 1 large database.

Much better if you want to restore

well, the person asking only had 3 blogs, but point taken


All times are GMT -7. The time now is 01:23 PM.

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