WordPress MU, BuddyPress, and bbPress on Local Machine

Was recently able to install and integrate three neat products based on Automattic code:

  1. WordPress µ 2.8.1 (a.k.a. WPµ, WordPress MU… Platform for multi-user blogs and Content Management System).
  2. BuddyPress 1.0.2 (A social network system based on WordPress µ).
  3. bbPress 1.0.1 (A forum system based on WordPress).

Did this after attending WordCamp Montreal. The fact that the large majority of WordPress and WordPress µ are merging motivated me, in part, to try it out. I currently serve as webguru for the Society for Linguistic Anthropology.

This is all on a local machine, a Mac mini running Mac OS X 10.5 Leopard.

It took me several attempts so it might not be as obvious as one would think.

I wrote as detailed a walkthrough as I could. Not exactly for the faint of heart. And, as IANAC, some things aren’t completely clear to me. I wish I could say I’m able to troubleshoot other people’s problems with these systems, but it’s really not the case. I ended up working out diverse issues, but it took me time and concentration.

A few resources I’ve used:

  1. Andy Peatling’s tutorial on BuddyPress (and WordPress µ) on a Mac.
  2. Sam Bauers’s screencast on integrating WordPress and bbPress. (Not µ or BuddyPress. Requires WordPress.org login.)
  3. Trent Adams’s tutorial on BuddyPress/bbPress integration.
  4. This file: <WPinstall>/wp-content/plugins/buddypress/bp-forums/installation-readme.txt (also available here).

I’ve used many other resources, but they turned out to be confusing, partly because of changes in versions. In fact, the last file was the most useful one. It’s a very different method from the other ones, but it worked. It’s actually much simpler than the other methods and it still gave me what I needed. I now have a working installation of a complete platform which integrates blogging, social networking, and forums. In a way, it’s like having simple versions of Drupal and Ning in the same install. Perfect for tests.

Some conventions.

<dbname> commondb
<name> common
<username> alexandre
<bbname> forums
<adminpass> (generated) 5e6aee85e6d4
<blogname> uethnographer
<blogpass> (generated) 601a6100
<confkey> (generated)
  1. [T] refers to things done in Terminal.app
  2. [B] refers to things done in the browser (Safari.app in my case)
  3. Brackets serve to refer to installation-specific items. I could have used variables.
    1. <dbname> is the database name in MySQL (can be anything)
    2. <name> is the name used for the WordPress install (domain/<name>; can be anything)
    3. <username> is the abbreviated username on the local machine. ~<username> would be the user’s home directory. Determined in Mac OS X.
    4. <bbname> is the name for the bbPress install  (domain/<name>/<bbname>; can be anything)
    5. <adminpass> is the password for the WordPress admin (generated)
    6. <blogname> is the main username for a blog administrator (can be anything)
    7. <blogpass> is the password for that blog administrator (generated)
    8. <confkey> is a confirmation key upon creating that blog administrator (generated)

So, here’s what I did.

  1. Switched to a user with administrative rights on my Mac. I usually work with a non-admin user and grant admin privileges when needed. Quite cumbersome in this case.
  2. Opened Terminal.app
  3. Installed and configured MAMP
    1. Downloaded http://downloads.sourceforge.net/mamp/MAMP_1.7.2.dmg.zip and copied the MAMP folder to /Applications
    2. Opened MAMP.app
    3. Changed MAMP preferences
      1. Preferences
      2. Ports: “Default Apache and MySQL ports”
      3. Apache: Choose: /Users/<username>/Sites
      4. Clicked Ok
  4. Clicked “Open home page” in MAMP
  5. Went to phpMyAdmin
  6. Created a database in phpMyAdmin with <dbname> as the name
  7. Edited /etc/hosts to add: 127.0.0.1 localhost.localdomain
  8. Downloaded WordPress µ through Subversion: [T] svn co http://svn.automattic.com/wordpress-mu/branches/2.8 /Users/<username>/Sites/<name>
  9. Went to my local WordPress µ home: [B] http://localhost.localdomain/<name>
  10. Filled in the necessary information
    1. “Use subdirectories” (subdomains would be a huge hassle)
    2. Database name: <dbname>
    3. User Name: root
    4. Password: root (changing it is a huge hassle)
    5. Title (title for the main WPµ install, can be anything)
    6. Email (valid email for the WPµ admin)
    7. Saved changes
  11. Noted <adminpass> for later use (generated and displayed)
  12. Changed file ownership: [T] chmod 755  /Users/<username>/Sites/<name> /Users/<username>/Sites/<name>/wp-content/
  13. Logged into WPµ admin: [B] http://localhost.localdomain/<name>/wp-admin/
    1. User: admin
    2. Password: <adminpass>
  14. Changed plugin options: [B] http://localhost.localdomain/<name>/wp-admin/wpmu-options.php#menu
    1. Plugins: check
    2. “Allow new registrations”: “Enabled. Blogs and user accounts can be created.”
    3. “Add New Users”: Yes
    4. “Upload media button”: Checked Images/Videos/Music
    5. “Blog upload space”: 100MB
    6. Clicked “Update Options”
  15. Installed BuddyPress directly
    1. [B] http://localhost.localdomain/<name>/wp-admin/plugin-install.php?tab=plugin-information&plugin=buddypress&TB_iframe=true&width=640&height=542
    2. Clicked “Install”
    3. Clicked “Activate”
    4. Moved BP themes to the right location: [T] mv /Users/<username>/Sites/<name>/wp-content/plugins/buddypress/bp-themes /Users/<username>/Sites/<name>/wp-content/
    5. Moved the BP Default Home theme to the right location: [T] mv /Users/<username>/Sites/<name>/wp-content/bp-themes/bphome/ /Users/<username>/Sites/<name>/wp-content/themes/
    6. Activated the BP Default Home theme: [B] http://localhost.localdomain/<name>/wp-admin/wpmu-themes.php
      1. Clicked yes on “BuddyPress Default Home Theme”
      2. Clicked Update Themes
    7. Activated the BP theme
      1. [B] http://localhost.localdomain/<name>/wp-admin/themes.php
      2. Clicked “Activate” on “BuddyPress Default Home”
    8. Added widgets to the BP theme
      1. [B] http://localhost.localdomain/<name>/wp-admin/widgets.php
      2. Placed widgets through drag-and-drop
    9. Checked the BuddyPress install: [B] http://localhost.localdomain/<name>
  16. Installed and integrated bbPress
    1. Downloaded bbPress using Subversion: [T] svn co http://svn.automattic.com/bbpress/trunk/ /Users/<username>/Sites/<name>/<bbname>/
    2. Went through the install process: [B] http://localhost.localdomain/<name>/<bbname>/bb-admin/install.php
    3. Go to step 1
    4. Added the following details
      1. Database Name <dbname> (same as WPMU)
      2. Database user root
      3. Database password root
      4. Clicked Save database configuration file
    5. Check for configuration file
    6. Go to Step 2
    7. Added the following details
      1. Add integration settings
      2. Add user database integration settings (without the cookie integration)
      3. User database table prefix wp_
      4. WordPress MU primary blog ID 1
      5. Clicked “Save WordPress integration settings”
    8. Clicked “Go to step 3″
      1. Added the following details
        1. Site Name (Name of the bbPress site, can be anything)
        2. Key Master username admin
        3. First Forum Name (Name of the first forum, can be anything)
        4. Clicked “Save site settings”
    9. Complete the installation
    10. Ignored the warnings
    11. Went through the writing options: [B] http://localhost.localdomain/<name>/<bbname>/bb-admin/options-writing.php
      1. Username: admin
      2. Password: <adminpass>
      3. Clicked on XML-RPC Enable the bbPress XML-RPC publishing protocol.
      4. Clicked “Save changes”
    12. Went to the discussion options: [B] http://localhost.localdomain/<name>/<bbname>/bb-admin/options-discussion.php
      1. “Enable Pingbacks”: “Allow link notifications from other sites.”
      2. Clicked “Save Changes”
    13. Moved the BuddyPress/bbPress integration plugin to the right location: [T] mv /Users/<username>/Sites/<name>/wp-content/plugins/buddypress/bp-forums/bbpress-plugins/buddypress-enable.php /Users/<username>/Sites/<name>/<bbname>/my-plugins/
    14. Went to the bbPress plugin options: [B] http://localhost.localdomain/<name>/<bbname>/bb-admin/plugins.php
      1. Clicked “Activate” on “BuddyPress Support Plugin”
    15. Went to the WPµ site: [B] http://localhost.localdomain/<name>
    16. Clicked “Log Out”
    17. Registered a new user: [B] http://localhost.localdomain/<name>/register
      1. Username <blogname>
      2. Email address (blog administrator’s valid email)
      3. Name (full name of blog administrator, can be anything)
      4. Clicked “Next”
      5. “Blog Title” (name of the blog administrator’s main blog, can be anything)
      6. Clicked “Signup”
      7. Checked for email at blog administrator’s email address
      8. Clicked confirmation link: [B] http://localhost.localdomain/<name>/activate?key=<confkey>
      9. Noted <blogpass> (generated)
      10. Gave administrative rights to the newly created blog administrator: [B] http://localhost.localdomain/<name>/<bbname>/bb-admin/users.php
        1. Logged in with admin/<adminpass>
        2. Clicked on <blogname>: Edit
        3. Clicked on “User Type: Administrator”
        4. Clicked on “Update Profile”
      11. Edited the bbPress configuration file:
        1. [T] open -e /Users/<username>/Sites/<name>/<bbname>/bb-config.php
        2. Added the following:
          1. $bb->bb_xmlrpc_allow_user_switching = true;
          1. (say, after /**#@-*/)
        3. Saved
      12. Went to BuddyPress options: [B] http://localhost.localdomain/<name>/wp-admin/admin.php?page=buddypress/bp-forums/bp-forums-admin.php
        1. Logged in with admin/<adminpass>
        2. Added the following details
          1. bbPress URL: http://localhost.localdomain/<name>/<bbname>/
          1. bbPress username <blogname>
          1. bbPress password <blogpass>
        3. Clicked “Save Settings”
  17. That was it. Phew!

I ended up with a nice testing platform. All plugins I’ve tried so far work quite well, are extremely easy to install, and give me ideas about the SLA’s site.

It was an involved process and I wouldn’t recommend it to anyone who’s afraid of fiddling with a bit of code. But I did try it out and it seems fairly robust as a method. I could almost create a script for this but that’d mean I might receive support requests that I just can’t handle. I could also make a screencast but that’d require software I don’t have (like Snapz Pro). Besides, I think copy paste is easier, if you remember to change the appropriate items. Obviously, anyone who wants to use this procedure as-is should replace all the bracketed items with the appropriate ones for your install. Some are generated during the process, others you can choose (such as the name of the database).

I’m not extremely clear on how secure this install is. But I’m only running it when I need to.

You can ask me questions in the comments but I really can’t guarantee that I’ll have an answer.

17 thoughts on “WordPress MU, BuddyPress, and bbPress on Local Machine”

    1. Nevermind I figured it out…

      -first turn off web sharing in system preferences under sharing
      -next change your apache port to 80

    1. Seems to me that the cookie integration isn’t necessary in this case. It’s the part which really made it hard, for me, before I read the plugin installation document.

  1. If you have WAMP you can pretty much follow the same instructions on a PC with the exception that you have to define virtual hosts by adding to Windows/system32/drivers/etc/hosts . And appending protocols to htppd.conf (conf/extra/httpd-vhosts.conf would help) also check out php documentations. Took me a while to figure this out but I got everything working fine. Thanks a lot for this guide, will definitely use MAMP on my mac now.

    1. You’re very welcome. I didn’t try this installation on Windows but it makes sense that it would be fairly close to this version. The one thing which doesn’t work so well is that some WordPress features like one-click upgrade require a later version of PHP than what MAMP has. Can you update PHP in WAMP?

      1. Yes, it lets you download the latest source and install as an addon. I configured my Mac (Tiger OSX) to run its built-in server and downloaded MySQL for the Adminstrator Panel seperately. But this was some years back. I was hoping that MAMP would make the job easier this time around.

  2. @Shauky
    MAMP does make things easier. All in all, it’s a very useful installation (to test stuff). The only snag was with the one-click update in WP. Tried several times and it didn’t work. I ended up doing it manually, which isn’t too hard to do. But one-click update seems to require a newer version of PHP than what’s in MAMP (and MAMP is difficult to change).

      1. And you need to do this from an administrator’s account. I personally use a non-admin account most of the time but I occasionally switch to the admin one for things like these or I fill in the necessary info (e.g., when I install software).
        One thing you can possibly do is type
        sudo open -e /etc/hosts
        and type your Mac password at the prompt.
        If that doesn’t work, you can use Smultron or TextWrangler. Both are free and they support access to restricted files. When you do “save” in either of these editors, it will ask you for administrator authentification. Use the username and password of an admin account you have on your Mac.
        Sorry it’s not more straightforward.

Leave a Reply