Integrate bbPress 1.0 with WordPress 2.8

wordpress-bbpress-integration

I was away so didn’t get a chance to write this tutorial but now I am back on track and here it is.

This tutorial is for people starting with fresh installations of WordPress 2.8 or 2.9 & bbPress 1.0. There is also a tutorial for upgrading existing integrated installations of WordPress & bbPress. And if by any chance you want to integrate WordPress 2.6 or 2.7 with bbPress with 0.9, then head over to this tutorial.

If you want to have a look at the benefits of integrating WordPress with bbPress, then take a look at my previous tutorial.

INSTALL WORDPRESS FIRST

I have gone a little more to enhance the security of WordPress by changing the default table prefix, however you can skip it but there is no reason why would you do so.

  • In your wp-config.php file, change the WP prefix table from β€œ$table_prefixΒ  = wp_’;” to something else like β€œ$table_prefixΒ  = β€˜rocking_’;”
  • Use WP secret key service to generate yourself authentication unique keys : https://api.wordpress.org/secret-key/1.1/ and paste them in wp-config.php
  • Open this URL : http://example.org/wp-admin/options.php in your browser and copy the values from here when asked during the bbPress installation.

Now proceed to install bbPress.

INSTALL BBPRESS NOW

Make a sub folder in your WordPress directory so as to have the forums in the sub-directory. For example: Main site URL is http://example.org/ and forums URL is http://example.org/forums

  • Change the bbPress table prefix from β€œ$bb_table_prefixΒ  = β€˜bb_’;” to something else like β€œ$bb_table_prefixΒ  = β€˜life_’;” in bb-config.php
  • Install bbPress by opening http://example.org/forums/ and at the integration step, fill all the details. Some are available under wp-config.php and some are in http://example.org/wp-admin/options.php page.

Fill all the details asked. Just click on the question icon on right and details will appear which will tell form where you can get that value.

WordPress “secure auth” cookie salt can be left blank if not found.

Now, In User Database integration settings, specify the wordpress table prefix, if you have changed it to β€œrocking_”or something else.

Leave the WordPress MU option blank (the reasons are obvious, you are using regular WordPress installation).

Now, under Advance Database settings, fill all the details that you fill in config files like database name, database user & password, database host, character set (utf8) & character collation (utf8_unicode_ci).

Fill the custom user tables too. Default ones are wp_users and wp_usermeta. Change them to rocking_users & rocking_usermeta or whatever your WP table prefix is.

Final Step

ensure that the following constants are equivalent in WordPress’ and bbPress’ respective config files.

WORDPRESS <=> BBPRESS

AUTH_KEY <=> BB_AUTH_KEY

SECURE_AUTH_KEY <=> BB_SECURE_AUTH_KEY

LOGGED_IN_KEY <=> BB_LOGGED_IN_KEY

Now you have got WordPress 2.8.1 & bbPress 1.0.1 integrated. If you didn’t achieve integration, then follow the steps again as I have tested this on multiple installations. Tried? Still need help? Leave a comment here and I will try to help and yes, you can hire me too if you want me to do it for you.

I will be writing a post to upgrade your existing integrated installations too, so subscribe to my feeds or email updates if you don’t want to miss it.


Comments

108 responses to “Integrate bbPress 1.0 with WordPress 2.8”

  1. […] UPDATE: If you want to integrate WordPress 2.8 with bbPress 1.0 then head over to this integration tutorial. […]

  2. […] wrote the tutorial on integrating WordPress 2.8 with bbPress 1.0 a few days back and today I am writing instructions for upgrading your integrated WordPress 2.7 […]

  3. Hi Ashish,

    I was wondering if you know about any SMPT bbpress plugin? I installed bbpress here http://touchreviews.net/forums and tried a few plugins but it didn’t work.

    When new users register they don’t get email with password. The fix I found was to install Instant Password Plugin.

    Would appreciate if you would suggest a working SMTP plugin. The website is hosted on Yahoo servers.

    Thanks!

    1. @Touch Reviews
      How about using Swiftmailer to get the job done? The post is quite old but it should be fine. Have a look at here.

      1. how to match wordpress theme and bbpress theme? confused dot com πŸ˜€
        thanks

  4. suzanne Avatar
    suzanne

    Hi,
    I have installed wordpress and bbpress as directed.The wordpress user can sign in to the bbpress with that username but the problem is,i logged in to the wordpress and i need to relogin to the bbpress..i have used the same database..but logging in twice in the same site is quite not suitable in my case..Please help me..
    thanks in advance

    1. @suzanne
      You have missed something. Try checking the secret keys and all salts if they are correct.

  5. suzanne Avatar
    suzanne

    HI,
    I checked secret key and salts.They are correct.But still the problem exists..i have also activated the bbpress-integration pliguin and the url to the forum is also correct..wat next?

    1. @suzanne
      You don’t need any plugin to integrate WP 2.8 with bbPress 1.0
      Also try flushing your browser cache or try a different browser and then come back. If nothing works, then I doubt if everything is filled correctly. I would recommend following the tutorial closely again. Some hit & trial can also help you.

  6. suzanne Avatar
    suzanne

    Thanks for ur help..It works now..but wat i need to change now is,the users in my wordpress site need to make payment to register for membership.So,the wp users can register and login to the forum but now the users should not be able to register on the forum without making any payment.

  7. suzanne Avatar
    suzanne

    wat i did is,i just removed the register link from ‘login-form.php’ and also the page register.php..i hope it doesn’t affect the other portion…is it okay?

  8. @suzanne
    The first thing that hits my mind is redirecting the logins and registrations to WordPress where it is already handled. Try asking on forums if I am unable to reply here.

  9. I have installed wordpress and bbpress as directed.The wordpress user can sign in to the bbpress with that username but the problem is,i logged in to the wordpress and i need to relogin to the bbpress..i have used the same database..but logging in twice in the same site is quite not suitable in my case..Please help me..

    1. @dox
      You havn’t done the integration correctly. Try following the tutorial closely and checking for keys & salts if they are correct. Also try flushing your Browser Cache or use a different browser.

  10. In an un-installed bbconfig folder, the file is called ‘bb-config-sample.php’. Must get renamed after install.
    However, that didn’t work.
    So, during the installation website process there is a ‘show advanced’ setting, and that toggles on a field in which you can enter ‘bbwhatever_’ as the prefix.

    Oddly, you say to “Now, under Advance Database settings, fill all the details that you fill in config files like database name, database user & password, database host, character set (utf8) & character collation (utf8_unicode_ci)” but the install dialog box says to do exactly the opposite; it says “If your bbPress and WordPress site do not share the same database, then you will need to add advanced settings.”

    ie. fill in those blanks if you want separate, which I don’t.

    Lastly, within wordpress, you need the plugin “http://wordpress.org/extend/plugins/bbpress-integration/”

    1. @Gravity
      AFAIK The config file doesn’t get renamed, a new file is created.
      Advance Database settings will help if you have a different password but filling them if they share the same database doesn’t hurt either. The tutorial is meant to cover masses πŸ˜‰
      And moreover there is no need of any plugin to integrate them. WP 2.8 integrates natively with bbPress 1.0

  11. Hi all,

    I followed all directions I have been able to find on the web but I still have a problem… logging in to BBPress logs me out of WordPress and vice versa. All settings and config files look ok.

    The site is at http://www.stereostokey.com, and the forums are at http://www.stereostokey.com/forums

    Any ideas?

    Cheers,
    Tom

  12. Hi mate, the plug in is still needed apparently to maintain cookies both ways. That’s all it does now.

    1. @Gravity
      I have integrated the setups without the use of any plugin. As I said earlier that the latest versions of WP & bbPress supports native integration.
      @Tom
      Seems like a cookie problem. Make sure you have everything right as per the tutorial. Check the values of keys and salts. You should be fine.

  13. suzanne Avatar
    suzanne

    Hi,
    I’ve integrated wordpress with bbpress..single login applies here..i mean to say the users logged in on one dont have to re-login. here the wordpress and bbpress both are using the same table.Now, there is again another table who can access the forum.actually,the forum i have is for students and there is a different login and register for students.This is maintained in a different table named tbl_student.i have made a membership plugin for the student form where they login to the students section.Now,if they are logged in with the student id from tbl_student, they must be logged in to the forum aslo,i’e,no re-login for forum..similar as that of the wp users and bbpress users..any help woul be appreciated..
    thanks

    1. @suzanne
      I got confused by what are you trying to do. As per me if you want to have login sync by using a different user table too then make sure that it generate cookies exactly the same way WP & bbPress does. Try replicate the functionality. Other than this you can add the same data to your existing table and have it a go. Wouldn’t it be better? Other than this I would suggest you asking on bbPress forums too as there are more experienced members over there. Hope that helps! πŸ™‚

  14. @ Ashfame, I was having some problems integrating bbPress 1.0 with WordPress 2.8 on one of my site but with a quick google search I was brought to your blog.

    I followed your step and it absolutely didn’t helped in my case. πŸ™

    Later on, I found that you wrote everything right but what users needs to pay attention while integrating bbPress & WordPress is just to avoid the use of default authentication keys which starts like “Your unique pharse here” & blah blah.

    Sometimes those default phrase doesn’t works even if you use the same sentence on both of your config files.

    Most users don’t set these keys and goes on using the default one which leads to problems in integration.

    I request you to recommend all users to get their authentication keys generated using https://api.wordpress.org/secret-key/1.1/

    And sometimes that plugin for WordPress needs to be there too, so it’s a also a must have for all installation.

    Thanks! πŸ™‚

    1. @Atin
      I have already told about using the WP key generator and I can always run integrated setups without that plugin so I can’t believe the fact that sometimes it is required. Doesn’t make sense to me, after all its just a code and will execute the same.

      @Mark

      Try redirecting bbPress logins to the WP login page and it will redirect it back to the calling page. This way you will have WP login screen for the whole site.

  15. Ashfame – I have got the integration sorted, but i was hoping to take it one step further than that – at the moment i can login via wp, and it logs in to both, or I can login via bbp, and login to both, but the two login processes are obviously very different in style and character. i would like there to be one login/registration process across the whole site. At the moment I am hacking it clumsily by including the bbpress login in the bbp header and then importing it as an iframe over the wp header, but I would like a more integrated solution. Any suggestions?

  16. […] Now you can proceed ahead just like the regular installations. If you want to integrate with WordPress, you can read the WordPress bbPress integration guide. […]

  17. I swear I got everything right. Then I poked around your post and saw Atin Gupta’s Comment.

    I went ahead and REGENERATE the 4 keys with https://api.wordpress.org/secret-key/1.1/. Apply the changes over to my wp-config.php and bb-config.php. AND THE COOKIE SHARING, IT WORKS! Thanks a lot man! =D

  18. @Hong
    Yeah! I got Atin’s point now. I misunderstood. Mah bad!

  19. Thanks for the great tips @Ashfame.

  20. Hi,
    I followed the steps, on one server the installation is running superb, on the other (with a little more filled up wordpress) I can logg in with both users in both, wordpress and bbpress, but I am always logged off on the other one.. seems to be a Cookie problem, ain’t?
    But my bb-config and my wp-config files share the same auth-keys (I copied them), and salts are identical, too.. what else could be the problem?

    1. @Lasse
      Make sure that values of all the three keys are identical (they will have different names ofcourse) and then try flushing your browser’s cache. You can also try a different browser which doesn’t have any cookies set.

  21. @Ashfame
    They are the same, as I copied the keys from one file to the other via copy&paste. Same with salts..
    I tried to log in with Mozilla Firefox, all cookies cleared.. same problem, everytime I logg on to wordpress I get logged of bbPress and vice versa..
    It’s really strange, basically it’s almost the same files as in the other install on the other server where it functions correctly, however, this wordpress is installed in /wordpress/ und the bbpres in wordpress/bbpress/ so the COOKIEPATH that I define in wp-config.php (due to the plugin for bbpressintergration) is /wordpress/ and not ”/
    Ist that maybe part of the problem?

  22. @Lasse
    I’ve got exactly the same problem on http://www.stereostokey.com. So far nobody has been able to help…

  23. @Lasse
    I haven’t tried integrating setups with WP in /wordpress/ and bbP in /wordpress/bbpress/
    I would say ditch the instructions from the plugin and follow each step of the tutorial again. I have integrated several setups and the very same instructions are on this tutorial.
    @Tom
    You didn’t ask again.

    There’s no point of saying that it doesn’t work as you may have unknowingly missed out something or did something wrong.

  24. @Ashfame
    Hey, I’m not complaining, just thought I’d mention it to Lasse… I did follow everything to the letter but still no joy. I have a feeling it might have to do with me fiddling with the templates…

  25. @Tom
    Neither I am buddy!
    I am just trying to highlight the point that it is very easy to miss out something and then being rigid in the correctness of their methodology. After all its human.
    For those who can’t get it done should consider the option of hiring someone (even I can) for doing it.

  26. I followed the instructions in the video and it worked well. Here is the link for the video.
    http://bbpress.org/forums/topic/basic-integration-screencast
    Good luck.

  27. hey – thanks for this, any idea how (maybe there’s a tutorial somewhere that I couldn’t find) on how to get bbpress theme looking like the wordpress theme? or at least the load in BBPress the header/footer of the wordpress theme? Thanks a lot.

    1. @John
      That’s a bit complicated and is the need of the hour. It requires you to deep integrate WordPress & bbPress which is a overhead one should avoid. You can match the theme by using the WordPress header and footer css and try to replicate the same in bbPress theme. Its just the game of CSS and if you want to load bbPress within WordPress, then look more for deep integration. Get it working first and then move on to next step o embedding bbPress. I have an idea of getting them to work but I am really out of time for a week. Will try to get it covered next week probably. Keep checking in or subscribe to my feeds.

  28. Hey John,

    I followed this tutorial and it worked pretty well… http://tinsology.net/2009/05/seamless-wordpress-bbpress-integration/

    Good luck!
    Tom

  29. […] If you want to integrate with WordPress, you can read the WordPress bbPress integration guide. […]

  30. I just integrated bbPress and WordPress together and was looking for a solution to share common log-in, registration, and password-reset screens site-wide. I ended up installing the Customize Your Community plugin by Joost de Valk, and wanted to share it with readers of this post because it’s worked beautifully to-date.

  31. @Darrin
    Thanks for sharing! I would try it.

  32. Ash,

    Im follwing your tutorial. I am having trouble with this portion:

    “Now, under Advance Database settings, fill all the details that you fill in config files like database name, database user & password, database host, character set (utf8) & character collation (utf8_unicode_ci).”

    I put the same information found on my wp-config file, and gives me an error:

    “There was a problem connecting to the WordPress user database you specified. Please check the settings, then try again.”

    And highlights fields in red for “Separate User Database Settings” section.

    Much help greatly appreciated.

    Thanks

    1. @Jugg
      Leave those settings blank unless you want to connect to a different database which I think you won’t need in a regular integration.

  33. @ashfame you still need to fill in the existing database details as I was told.

  34. […] would be to mimic the functionality offered by one into another. First of all I would recommend integrating WordPress with bbPress so that they share the same database and then we can use SQL queries to fetch data from the […]

  35. […] you can play around with bbPress information, you need to integrate WordPress with bbPress. After integration you can place this code anywhere in your template and it will fetch information […]

  36. […] is the best guide for integratin bbPress 1.0 with latest versions of WordPress. Integrate bbPress 1.0 with WordPress 2.8 VN:F [1.7.7_1013]Rating: 0.0/10 (0 votes […]

  37. Federalist1 Avatar
    Federalist1

    What if you have already installed both WP and bbPress and the integration but have not changed any of the above info you suggest to do before installing bbPress?

    I also tried to change the WP table prefix but doing so broke the site.

    Can I do the integration without changing the table prefix?
    How can I change it without breaking the site?

  38. @Federalist1
    Just use the default table prefix for both of them then.
    wp_ & bb_ for WordPress & bbPress respectively.

  39. WP and bbPress do and can share the same database. No need to use a new one.

    1. @Ed
      Those things are there in case you have their tables in different databases.

  40. Federalist1 Avatar
    Federalist1

    Thanks for the help so far.

    I decided to start over and reinstall bbPress manually and set all the options per your instructions. The new install at the last step returned the error listed below:

    (actual databse name changed to *mydatabase* for public viewing)

    SQL ERROR!
    >>> Database: *mydatabse* (localhost)
    >>>>>> ALTER TABLE `wp_posts` ADD COLUMN `post_id` bigint(20) NOT NULL auto_increment;
    >>>>>> Incorrect table definition; there can be only one auto column and it must be defined as a key
    SQL ERROR!
    >>> Database: *mydatabase* (localhost)
    >>>>>> ALTER TABLE `wp_posts` ADD PRIMARY KEY (`post_id`);
    >>>>>> Key column ‘post_id’ doesn’t exist in table

    Everything seems to work though.
    Any major problems to expect from this?

    I also TRIED to restore my old posts and forums from a backup of the first bbPress install.
    It almost worked.
    I got the forum topics in, AND it says there are posts
    but no posts and no authors of the posts show up.

  41. Federalist1 Avatar
    Federalist1

    If importing an old bbPress database with the prefix ‘bbp’ is it necessary to change the table prefix for everything in the SQL file to the new shared prefix ‘wp_’ ?

    1. You are doing something terribly wrong here. wp_ tables are that of WordPress. You should have a different prefix for bbPress. Try to understand the tutorial and follow it with care. If you find it hard to integrate, then you can hire me to do it for you.

  42. If you follow the tutorial it is pretty simple. I had a little problem in the beginning and found this blog on Google and it worked well.

  43. thanks for the tutorial. i got stuck with key/salt thing, before i figured out in this video tutorial http://dotsub.com/view/7cb6fb61-2fa0-4d6d-a090-257b0be87a50, which was which.

    After all steps are done, there’s still a problem with logging in wp and getting into admin page of bbpress, because after logging in in wp, cookie for bbpress is not being made.. i did install bbpress integrations plugin and that one solved the problem.

    wp version: 2.8.6
    bbpress version: 1.0.2

    1. @banesto, not sure why the cookie for bbpress was not made. Did you follow the video exactly like ashfame explained?

  44. This tutorial works with WordPress 2.8.6 and bbpress 1 if you do everything except the table prefixes.

    1. The same tutorial works well even when you change table prefixes πŸ™‚

      1. Why do you need to change table prefixes?
        Thanks.

        1. It improves security. Automatic scripts attacking would attack on table prefixes as bb_ but when one has changed the table prefixes, it makes those scripts harmless. πŸ˜‰

          1. Thanks for all your help. Keep up the good work.

  45. can u make tutorial on how to match wordpress theme and bbpress theme? thanks

    1. One way is to design the themes exactly but people tend to do it via deep integration. I will have a look at it.

      1. Will copying the CSS from your WP into bbPress work also? Or there might be a conflict?
        Thank you.

        1. Copy the CSS of the header and footer and make sure the name of the DIVs in both WordPress and bbPress are same. Simply copying the CSS file won’t do.

          1. Thanks for the help Ash. I thought of the divs too. Cannot be simpler than that.

            1. You are welcome! πŸ™‚

  46. Thanks Ash for coming up with such a simplified tutorial.I have almost lost hope of integrating WordPress with bbpress , when I happen to see your post.!

    1. I am sure all of us in here at some point decided to give up on it until we came across Ash and this site. Keep up the good work Ash.

      1. Thanks for the kind words! πŸ™‚

    2. Good to hear that! πŸ™‚

      1. Thanks for all you do for the WP community at large.

        1. You are welcome! πŸ™‚

  47. Hi Ashish,
    Hope you can help! I have installed bbPress at http://planit.kbbdesigner.com/forum/ and there seems a few problems. I would like to know the costs for you to put it right.
    Thanks
    Kevin

    1. I have sent you an email! Lets discuss over there.

    2. @Kevin, I would recommend Ash hands down. Not only is he an expert in what he does, probably the best, but his rates are down to earth too. He helped me with my bbPress installation too. Did a great job. Here is the link to it http://invictatrader.com/bbpress if you are interested.
      Good Luck with your site.

      1. Oops. Forgot my own link. Sorry, here is the correct one http://invictatrader.com/bbpress FYI.

        1. Thanks for your comments, your forum looks great.

      2. Thanks for the recommendation! πŸ™‚

        1. Hey Ash. Can you correct the link above for my forums? I had it as /forums rather than /bbpress.
          Thank you.

            1. Thanks Ash. Hey Ash, have you thought about breaking down this page or similar pages when they get so long? Is it possible in WP and bbPress?
              Thank you.

              1. Do you mean by comments?
                WordPress has paginated comments and bbPress itself generates pages for larger lists.

              2. Yes. This page is getting long and was wondering how do you manage such long pages.
                Thank you.

              3. I do nothing as of now.

              4. Gene53 Avatar
                Gene53

                LOL, wouldn’t it be easier to answer all these questions on an integrated bbPress forum? πŸ™‚

  48. […] up for e-mail updates or subscribe to my RSS feeds. Thanks for visiting!I have written tutorials to simple integrate bbPress with WordPress but Deep integration tends to take it to the next […]

  49. Gene53 Avatar
    Gene53

    Hi Ashfame, great tutorial but before I go ahead and install & integrate bbPress using your method, is it really necessary to change the DB prefixes? I have an existing blog which uses the standard prefix and simply want to add bbPress to it.

    Thanks,
    Gene

    1. Gene53 Avatar
      Gene53

      Oops, I just read that this wasn’t necessary, sorry…

      Cheers,
      Gene

      p.s. I still can’t wait for the canonical bbPress plugin for WP, it should make life easier for everyone.

      1. Glad that you helped yourself. πŸ™‚
        And yes I do have plans for forums. Lets see how things turn out.

        1. Would be nice to have a forum for sure.

          1. Any suggestions?

  50. I hope you still read this.. (long time after last post)

    I would like to know if you can use the same content/code for those.. ?

    β€œ$table_prefix = same2010_’;” (wordpress) and β€œ$bb_table_prefix = β€˜same2010_’;” (bbpress)

    Is that okay or will this cost trouble?

    1. Having a different bbPress would be issue less and doesn’t cost you anything. Having the same preifx will then collide with users, usermeta, term_taxonomy, term_relationships table.
      What do you mean by this? → I hope you still read this.. (long time after last post)

  51. The last comment before me, was a few months old and on most blogging websites the topics don’t get any support anymore..
    But you kept them active, good job.

    1. OK! You meant the last comment. Yeah! Things are surely different here πŸ˜‰

  52. Thanks a lot man for this helpful guide, i’ll be integrating my site this weekend @Ashfame

    1. Sure! Let me know if you face any issues or want me to hire up to do it for you. πŸ™‚

  53. Hi,
    I know it’s a dumb question, but how do you create a sub-directory? And also what do I need to do if I’m not installing WordPress fresh? I just want to set up a forum on a sub-directory?
    Any help will be appreciated. Thanks!

    1. In your FTP or file manager, create a folder/directory. Thats it. Place your bbPress files in there and install it.

  54. […] you read through these issues, you will see that a number of times, users are instructed to visit this blog, since it has step by step instructions. And while this is true (thank you author for being so […]

  55. I’m using bbPress 2.0 and WordPress 3.2.1. Do I still need to integrate them, or are they automatically integrated? I installed WordPress first, and then installed bbPress as a part of BuddyPress. Thanks!

    1. They already are. You only need to integrate if you are using the standalone version of bbPress

      1. Thought so. Just wanted to be sure. Thanks!