Was recently able to install and integrate three neat products based on Automattic code:
- WordPress µ 2.8.1 (a.k.a. WPµ, WordPress MU… Platform for multi-user blogs and Content Management System).
- BuddyPress 1.0.2 (A social network system based on WordPress µ).
- 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:
- Andy Peatling’s tutorial on BuddyPress (and WordPress µ) on a Mac.
- Sam Bauers’s screencast on integrating WordPress and bbPress. (Not µ or BuddyPress. Requires WordPress.org login.)
- Trent Adams’s tutorial on BuddyPress/bbPress integration.
- 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.
- [T] refers to things done in Terminal.app
- [B] refers to things done in the browser (Safari.app in my case)
- Brackets serve to refer to installation-specific items. I could have used variables.
- <dbname> is the database name in MySQL (can be anything)
- <name> is the name used for the WordPress install (domain/<name>; can be anything)
- <username> is the abbreviated username on the local machine. ~<username> would be the user’s home directory. Determined in Mac OS X.
- <bbname> is the name for the bbPress install (domain/<name>/<bbname>; can be anything)
- <adminpass> is the password for the WordPress admin (generated)
- <blogname> is the main username for a blog administrator (can be anything)
- <blogpass> is the password for that blog administrator (generated)
- <confkey> is a confirmation key upon creating that blog administrator (generated)
So, here’s what I did.
- 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.
- Opened Terminal.app
- Installed and configured MAMP
- Downloaded http://downloads.sourceforge.net/mamp/MAMP_1.7.2.dmg.zip and copied the MAMP folder to /Applications
- Opened MAMP.app
- Changed MAMP preferences
- Preferences
- Ports: “Default Apache and MySQL ports”
- Apache: Choose: /Users/<username>/Sites
- Clicked Ok
- Clicked “Open home page” in MAMP
- Went to phpMyAdmin
- Created a database in phpMyAdmin with <dbname> as the name
- Edited /etc/hosts to add: 127.0.0.1 localhost.localdomain
- Downloaded WordPress µ through Subversion: [T] svn co http://svn.automattic.com/wordpress-mu/branches/2.8 /Users/<username>/Sites/<name>
- Went to my local WordPress µ home: [B] http://localhost.localdomain/<name>
- Filled in the necessary information
- “Use subdirectories” (subdomains would be a huge hassle)
- Database name: <dbname>
- User Name: root
- Password: root (changing it is a huge hassle)
- Title (title for the main WPµ install, can be anything)
- Email (valid email for the WPµ admin)
- Saved changes
- Noted <adminpass> for later use (generated and displayed)
- Changed file ownership: [T] chmod 755 /Users/<username>/Sites/<name> /Users/<username>/Sites/<name>/wp-content/
- Logged into WPµ admin: [B] http://localhost.localdomain/<name>/wp-admin/
- User: admin
- Password: <adminpass>
- Changed plugin options: [B] http://localhost.localdomain/<name>/wp-admin/wpmu-options.php#menu
- Plugins: check
- “Allow new registrations”: “Enabled. Blogs and user accounts can be created.”
- “Add New Users”: Yes
- “Upload media button”: Checked Images/Videos/Music
- “Blog upload space”: 100MB
- Clicked “Update Options”
- Installed BuddyPress directly
- [B] http://localhost.localdomain/<name>/wp-admin/plugin-install.php?tab=plugin-information&plugin=buddypress&TB_iframe=true&width=640&height=542
- Clicked “Install”
- Clicked “Activate”
- 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/
- 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/
- Activated the BP Default Home theme: [B] http://localhost.localdomain/<name>/wp-admin/wpmu-themes.php
- Clicked yes on “BuddyPress Default Home Theme”
- Clicked Update Themes
- Activated the BP theme
- [B] http://localhost.localdomain/<name>/wp-admin/themes.php
- Clicked “Activate” on “BuddyPress Default Home”
- Added widgets to the BP theme
- [B] http://localhost.localdomain/<name>/wp-admin/widgets.php
- Placed widgets through drag-and-drop
- Checked the BuddyPress install: [B] http://localhost.localdomain/<name>
- Installed and integrated bbPress
- Downloaded bbPress using Subversion: [T] svn co http://svn.automattic.com/bbpress/trunk/ /Users/<username>/Sites/<name>/<bbname>/
- Went through the install process: [B] http://localhost.localdomain/<name>/<bbname>/bb-admin/install.php
- Go to step 1
- Added the following details
- Database Name <dbname> (same as WPMU)
- Database user root
- Database password root
- Clicked Save database configuration file
- Check for configuration file
- Go to Step 2
- Added the following details
- Add integration settings
- Add user database integration settings (without the cookie integration)
- User database table prefix wp_
- WordPress MU primary blog ID 1
- Clicked “Save WordPress integration settings”
- Clicked “Go to step 3”
- Added the following details
- Site Name (Name of the bbPress site, can be anything)
- Key Master username admin
- First Forum Name (Name of the first forum, can be anything)
- Clicked “Save site settings”
- Added the following details
- Complete the installation
- Ignored the warnings
- Went through the writing options: [B] http://localhost.localdomain/<name>/<bbname>/bb-admin/options-writing.php
- Username: admin
- Password: <adminpass>
- Clicked on XML-RPC Enable the bbPress XML-RPC publishing protocol.
- Clicked “Save changes”
- Went to the discussion options: [B] http://localhost.localdomain/<name>/<bbname>/bb-admin/options-discussion.php
- “Enable Pingbacks”: “Allow link notifications from other sites.”
- Clicked “Save Changes”
- 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/
- Went to the bbPress plugin options: [B] http://localhost.localdomain/<name>/<bbname>/bb-admin/plugins.php
- Clicked “Activate” on “BuddyPress Support Plugin”
- Went to the WPµ site: [B] http://localhost.localdomain/<name>
- Clicked “Log Out”
- Registered a new user: [B] http://localhost.localdomain/<name>/register
- Username <blogname>
- Email address (blog administrator’s valid email)
- Name (full name of blog administrator, can be anything)
- Clicked “Next”
- “Blog Title” (name of the blog administrator’s main blog, can be anything)
- Clicked “Signup”
- Checked for email at blog administrator’s email address
- Clicked confirmation link: [B] http://localhost.localdomain/<name>/activate?key=<confkey>
- Noted <blogpass> (generated)
- Gave administrative rights to the newly created blog administrator: [B] http://localhost.localdomain/<name>/<bbname>/bb-admin/users.php
- Logged in with admin/<adminpass>
- Clicked on <blogname>: Edit
- Clicked on “User Type: Administrator”
- Clicked on “Update Profile”
- Edited the bbPress configuration file:
- [T] open -e /Users/<username>/Sites/<name>/<bbname>/bb-config.php
- Added the following:
- $bb->bb_xmlrpc_allow_user_switching = true;
- (say, after /**#@-*/)
- Saved
- Went to BuddyPress options: [B] http://localhost.localdomain/<name>/wp-admin/admin.php?page=buddypress/bp-forums/bp-forums-admin.php
- Logged in with admin/<adminpass>
- Added the following details
- bbPress URL: http://localhost.localdomain/<name>/<bbname>/
- bbPress username <blogname>
- bbPress password <blogpass>
- Clicked “Save Settings”
- 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.
I was wondering how you got mamp to load http://localhost.localdomain/ instead of http://localhost:8888
Nevermind I figured it out…
-first turn off web sharing in system preferences under sharing
-next change your apache port to 80
Good point! I did have to do the same thing, even though I wasn’t really using Web server…
found a in depth article about setting up your machine pre-install of wordpress Mu: http://www.withinsightdesign.com/2009/installing-wordpress-mu-on-mac-os-x-leopard/
Thanks. It might have been helpful but the toughest parts were to integrate BuddyPress and bbPress, I found. Took me a while to make it work.
This guide helped so much with the bbpress integration for me. All that is left now is the cookie integration…
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.
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.
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?
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.
@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).
Hi
Please could you tell me where you change this info
“7. Edited /etc/hosts to add: 127.0.0.1 localhost.localdomain”
Thanks
Tara
In the Terminal: open -e /etc/hosts
And add this line: 127.0.0.1 localhost.localdomain
Save the file.
When I do this it tells me I don’t have access privileges and there is no way I can change that
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.
How to Integrate WordPress and bbPress in 3 Simple Steps