A

Integrate bbPress 1.0 with WordPress 2.8

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 […]

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.

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!

  4. suzanne says:

    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

  5. suzanne says:

    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?

    • Ashfame says:

      @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 says:

    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 says:

    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. Ashfame says:

    @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. dox says:

    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..

    • Ashfame says:

      @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. Gravity says:

    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/”

    • Ashfame says:

      @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. Tom says:

    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. Gravity says:

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

    • Ashfame says:

      @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 says:

    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

    • Ashfame says:

      @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. Atin Gupta says:

    @ 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! 🙂

    • Ashfame says:

      @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. Mark says:

    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. Hong says:

    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. Ashfame says:

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

  19. Ed says:

    Thanks for the great tips @Ashfame.

  20. Lasse says:

    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?

    • Ashfame says:

      @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. Lasse says:

    @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. Tom says:

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

  23. Ashfame says:

    @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. Tom says:

    @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. Ashfame says:

    @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. Ed says:

    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. John says:

    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.

    • Ashfame says:

      @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. Tom says:

    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. Darrin says:

    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. Ashfame says:

    @Darrin
    Thanks for sharing! I would try it.

  32. Jugg says:

    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

    • Ashfame says:

      @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. Ed says:

    @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 says:

    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. Ashfame says:

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

  39. Ed says:

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

  40. Federalist1 says:

    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 says:

    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_’ ?

    • Ashfame says:

      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. Ed says:

    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. banesto says:

    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

    • Ed says:

      @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.

  45. ipunkbali says:

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

  46. Daya says:

    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.!

  47. Kevin says:

    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

  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 says:

    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

  50. BJ says:

    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?

    • Ashfame says:

      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. BJ says:

    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.

  52. Sahil says:

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

  53. Doe says:

    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!

  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!