Skip to:
Content
Pages
Categories
Search
Top
Bottom

WP and BBpress in 2 separate dbs?

  • Has anyone tried to do a WordPress / BBPress integration using 2 separate databases?

    Is it possible? Any caveats?

    Doug

Viewing 6 replies - 1 through 6 (of 6 total)
  • I don’t know. I doubt it, because bbdb (the object used to do any database stuff) is hardcoded all over the place and you need a new bbdb object for every database you connect to, as far as I’m aware. So integration – which consists of sharing the users and usermeta table I think – would be impossible, unless you changed all references to the user tables to use your second bbdb object.

    Why do you want to?

    My dbs are limited to 100MB and I’ve watched a spam attack add 20-40MB in a heartbeat on WordPress alone. Granted part of the solution is having SpamKarma purge more frequently.

    I was concerned that if I added bbpress to the same database, and if it received any significant traffic, that I would find myself faced with running out of space in my database.

    Naturally, the solution seems to be to have wordpress and bbpress use two separate databases but pull user information from the wordpress db. (Or find a hosting provider that doesn’t limit the db size to 100mb)

    How’d I overlook this?!

    From https://bbpress.org/documentation/integration-with-wordpress/

    If you would like to pull user information from a different database, define USER_BBDB_NAME, USER_BBDB_USER, USER_BBDB_PASSWORD, and USER_BBDB_HOST.

    I actually have done this and those definitions will work, but it sometimes takes some working with your host to get the proper syntax for being able to connect!

    Trent

    i dont understand what “define USER_BBDB_NAME, USER_BBDB_USER, USER_BBDB_PASSWORD, and USER_BBDB_HOST” means..

    here is my config.php file. please let me know if this is correct.

    <?php

    // ** MySQL settings ** //

    define(‘USER_BBDB_NAME’, ‘XXXXX’); // The name of the database

    define(‘USER_BBDB_USER’, ‘XXXXX’); // Your MySQL username

    define(‘USER_BBDB_PASSWORD’, ‘XXXXXX’); // …and password

    define(‘USER_BBDB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value

    define(‘BBDB_NAME’, ‘XXXXX’); // The name of the database

    define(‘BBDB_USER’, ‘XXXXXX’); // Your MySQL username

    define(‘BBDB_PASSWORD’, ‘XXXXXX’); // …and password

    define(‘BBDB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value

    // Change the prefix if you want to have multiple forums in a single database.

    $bb_table_prefix = ‘bb_’; // Only letters, numbers and underscores please!

    // The full URL of your bbPress install

    $bb->uri = ‘http://richardfleigh.com/richardfleigh/bbpress/&#8217;;

    // What are you going to call me?

    $bb->name = ‘Richards new bbpress site’;

    // This must be set before you run the install script.

    $bb->admin_email = ‘richard@mediosone.com’;

    // Set to true if you want pretty permalinks, set to ‘slugs’ if you want to use slug based pretty permalinks.

    $bb->mod_rewrite = true;

    // The number of topics that show on each page.

    $bb->page_topics = 30;

    // A user can edit a post for this many minutes after submitting.

    $bb->edit_lock = 60;

    // Your timezone offset. Example: -7 for Pacific Daylight Time.

    $bb->gmt_offset = -5;

    // Change this to localize bbPress. A corresponding MO file for the

    // chosen language must be installed to bb-includes/languages.

    // For example, install de.mo to bb-includes/languages and set BBLANG to ‘de’

    // to enable German language support.

    define(‘BBLANG’, ”);

    // Your Akismet Key. You do not need a key to run bbPress, but if you want to take advantage

    // of Akismet’s powerful spam blocking, you’ll need one. You can get an Akismet key at

    // http://wordpress.com/api-keys/

    $bb->akismet_key = ”; // Example: ‘0123456789ab’

    // The rest is only useful if you are integrating bbPress with WordPress.

    // If you’re not, just leave it as it is.

    $bb->wp_table_prefix = ‘wp_’; // WordPress table prefix. Example: ‘wp_’;

    $bb->wp_home = ‘http://blog.richardfleigh.com/&#8217;; // WordPress – Options->General: Blog address (URL) // Example: ‘http://example.com&#8217;

    $bb->wp_siteurl = ‘http://blog.richardfleigh.com/&#8217;; // WordPress – Options->General: WordPress address (URL) // Example: ‘http://example.com&#8217;

    /* Stop editing */

    if ( !defined(‘BBPATH’) )

    define(‘BBPATH’, dirname(__FILE__) . ‘/’ );

    require_once( BBPATH . ‘bb-settings.php’ );

    ?>

    This is a little off-topic, but iif you are getting that much spam, you may consider looking at Bad Behavior

    It blocks spambots before they can add content to the database.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Skip to toolbar