bbPress

Simple, Fast, Elegant

bbPress support forums » Installation

WP and BBpress in 2 separate dbs?

(7 posts)
  • Started 1 year ago by djuggler
  • Latest reply from Ajd777
  • This topic is not resolved
  1. Has anyone tried to do a Wordpress / BBPress integration using 2 separate databases?

    Is it possible? Any caveats?

    Doug

    Posted 1 year ago #
  2. 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?

    Posted 1 year ago #
  3. 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)

    Posted 1 year ago #
  4. How'd I overlook this?!

    From http://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.

    Posted 1 year ago #
  5. 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

    Posted 1 year ago #
  6. rfleigh
    Member

    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/';

    // 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/'; // WordPress - Options->General: Blog address (URL) // Example: 'http://example.com'
    $bb->wp_siteurl = 'http://blog.richardfleigh.com/'; // WordPress - Options->General: WordPress address (URL) // Example: 'http://example.com'

    /* Stop editing */

    if ( !defined('BBPATH') )
    define('BBPATH', dirname(__FILE__) . '/' );
    require_once( BBPATH . 'bb-settings.php' );

    ?>

    Posted 10 months ago #
  7. Ajd777
    Member

    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.

    Posted 10 months ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.