Skip to:
Content
Pages
Categories
Search
Top
Bottom

Moved BBpress to new database, wont work anymore


  • Duke
    Member

    @dukessa

    Hello,

    I recently moved a WP site + BBpress to another host (but im using the same domain), so I set up whole new DB for each, and imported the old DBs.

    WP is working fine, I just had to edit the wp-config file and it connected perfectly to the new db (with the old data imported).

    The problem is BBpress now. I thought that just editing the DB info in the bb-config file with the new DB would have been enough, but it’s now giving me this: ERROR: Could not establish a database connection

    But I know that everything is correct! (i use a plugin on WP that retrieves all the topic from BBpress and it is retrieving everything from the new BBpress DB).

    I wonder if there’s more I should edit? but where?

    Could the problem be that WP and BBpress were integrated? Where can I change the WP integration info for BBpress? Maybe BBpress is trying to find the old WP db info on the old server?

    Help please :(

Viewing 10 replies - 1 through 10 (of 10 total)

  • zaerl
    Participant

    @zaerl

    Are the settings:

    define( 'BBDB_NAME', 'bbpress' );
    define( 'BBDB_USER', 'username' );
    define( 'BBDB_PASSWORD', 'password' );
    define( 'BBDB_HOST', 'localhost' );

    equal to WordPress counterparts?


    Duke
    Member

    @dukessa

    No, why would they be?

    They werent equal in the old server either… they each had one separate db.

    I set the integration with wp from the bbpress installation and backend.

    I think the problem is exactly that: i can change db info for BBpress easily now, but I cant find where to edit WP db settings for the integration (is it stored in the DB directly? ) so its causing a db connection error because bbpress is trying to connect to the old WP db?

    Suggestions?


    zaerl
    Participant

    @zaerl

    they each had one separate db

    I didn’t know this. Open phpmyadmin and check table bb_meta:

    user_bbdb_name

    user_bbdb_user

    user_bbdb_password

    user_bbdb_host

    put on the new values.


    Duke
    Member

    @dukessa

    I actually love you :)

    Thank you so much, I missed exactly this information!

    One little suggestion for the next BBpress release… this kind of info should be set in the config file, like everything else… users should not wander around in the database ;)


    zaerl
    Participant

    @zaerl

    I actually love you :)

    Whoa.

    this kind of info should be set in the config file

    As far as I know you can define USER_BBDB_NAME, USER_BBDB_USER, USER_BBDB_PASSWORD, and USER_BBDB_HOST in bb-config.php but I don’t know if it is the right way of doing things. There is no documentation.


    Duke
    Member

    @dukessa

    :D just showing my gratitude!

    Because the documentation is so.. not existent.. you were really nice in helping me out on this one :)

    I have another question though…

    Now it wont detect my login on bbpress, when Im connected already to WP.

    I changed the wp security keys in WP, and put the same auth/secure/logged_in/nonce key from wp config inside bbpress config file.

    I also added define(‘COOKIE_DOMAIN’, ‘.mydomain.com’); but it’s still not detecting that i already logged in from wp.

    When i try to access bb-admin, I fill in user and pass from wp, but i get redirected to the forum homepage.

    Maybe the auth keys (salt or else?) must be reconfigured in the db as well (because i changed the wp ones in this new server) ?


    zaerl
    Participant

    @zaerl

    All values under the cookie section of /bb-admin/options-wordpress.php must be changed according to the WordPress values.

    WordPress URL

    Blog URL

    Cookie salt “auth”

    Cookie salt “secure auth”

    Cookie salt “logged in”

    also make sure to:

    1) delete the old cookie before making your tests.

    2) check values of bbPress Integration plugin (/wp-admin/options-general.php?page=bbpress-integration-admin)

    3) change COOKIEPATH according to what the bbPress Integration plugin reports


    Duke
    Member

    @dukessa

    I have never used that plugin, it has always worked without any need for the bbPress integration plugin.

    All i had to do was set the integration through bbPress installation and backend.

    I have installed the plugin now, and added that string to the wp-config

    It looks like I cant be logged in in both at the same time though… when Im logged into wp, i must login again into bbpress… and the wp login disconnects automatically (so i would have to reconnect again).

    Is there a way to not have to login every time I change wp <-> bbpress ?

    I know some people had that problem because their server did not use php5.


    Duke
    Member

    @dukessa

    My bad.

    When I replaced the auth_key, secure_auth_key, logged_in_key and nonce_key, i pasted it directly from wp-config and didnt add the BB_ before every key.. so it was obviously not working.

    All good now!

    Thank you guys :)

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