It seems as if everyone has a blog these daysâwhether it's a work-related one, a platform for launching a writing career, or just somewhere to upload random musings and holiday snaps. Many people maintain several different blogs, each one focused on a different subject. If you run a web site, offering your members the ability to run a blog is a great way to encourage repeat visitors and build a sense of community. Throughout this book, we will be working on building a web site called The SlayerCafe. This web site will use WordPress MU to offer its members the chance to create their own blogs. It will also use bbPress-powered forums and BuddyPress for social networking features.
The SlayerCafe is aimed at Slayers, their Watchers, and people (including good-aligned Werewolves, Techno Mages, and Wiccans) who would like to join in the fight against vampires. The blog network will allow the site's users to share advice and information in the form of blog posts, videos, and comments. The social side of the site will allow Slayers and Watchers to create special interest groups, engage in discussions in forums, and update their status feeds so that their fellow community members know what's going on at all times. The SlayerCafe will make use of Facebook Connect and tie in to the Twitter micro-blogging service, too.
A basic membership to SlayerCafe will be free, and there will be some advertisements on the site to support this, but there will also be premium memberships with special features available only to paying members.
In this chapter you will learn about:
WordPress MUâwhich allows you to offer blogs to your users
BuddyPressâwhich helps you turn your WordPress MU site into a social network
bbPressâwhich allows you to run forums from your WordPress MU site
The tools you need to get the above scripts up and running
So let's get started...
You may already be familiar with WordPress, either through the free blog site WordPress.com or the blog script that you can download from WordPress.org. WordPress MU allows you to run your own site in the vein of WordPress.com. It is ideal for people who want to run multiple blogs or who want to offer blog hosting services to their users.
You may be wondering why you would use WordPress MU to run several blogs on the same domain, instead of just installing a new blog each time. Well, with WordPress MU, all the blogs are stored in the same database (without your worrying about coming up with unique table prefixes), and all of the blogs run off one install. This means you only have to update one install when new versions are released and, when it comes to editing source code or uploading plugins, you only have to do those jobs once.
Most WordPress plugins, widgets, and themes are compatible with WordPress MU, so you have a huge range of designs and features available to you, as well as the option of coding your own designs and features if you are a skilled programmer or designer.
The developers of WordPress are planning to merge the WordPress and WordPress MU projects at some point in the future. Therefore, learning how to use the multisite features of WordPress MU now will help you stand in good stead for the future when users of the single-site version are looking for designers to help them convert their site to a multiblog platform. For more information about the project and the plans to merge it with the single-site version of WordPress, check the official WordPress MU site at http://mu.wordpress.org, along with http://ocaoimh.ie/âthe blog of Donncha, one of the WordPress developers .
WordPress MU can be downloaded from http://mu.wordpress.org/download/.
The WordPress MU community is not as large as the WordPress community; however, it is still very active and there are lots of places you can turn to for assistance with your site. The official help channels are:
The WordPress MU forums (http://mu.wordpress.org/forums/).
The WordPress MU IRC Channel on Freenode. Connection instructions can be found at http://codex.wordpress.org/WPMU_IRC_Channel.
The bug tracker, available at http://trac.mu.wordpress.org/.
The MU page of the WordPress Codex: http://codex.wordpress.org/index.php?title=Category:WPMU.
Unlimited authors on each blog
Each user can have more than one blog (or none at all!)
Users can have different roles on different blogs
Blogs can have different plugins and different themes
Blogs can be hosted on subdomains (
myblog.mysite.com) or in subdirectories (
Users will be able to register at your site and request a blog, which will be created automatically. The blog admin panel looks a lot like the standard WordPress blog admin panel (as you can see in the below screenshot), so it will be familiar to many of your users.
WordPress MU is sometimes seen written as WordPress- Î¼ (using the Greek letter "Mu".) In fact, the use of that symbol was originally the preference of the developers. If the Greek symbol is used, then the Î¼ is pronounced as "Mew". Over time, writing the name as "WordPress MU" has become the popular preference, and the popular pronunciation of the name is "WordPress Em Yew". Some people prefer to say "Moo" and this is also considered to be a valid pronunciation.
A blog network is all well and good, but how will your users find each other? How will they talk to each other? Building a sense of community is important if you want your site to succeed. Even corporate blog networks can benefit from community-like features. For example, your users could set up groups for teams or departments to share information with each other and have private discussions.
There are two very useful plugins that make it easy to add social features to WordPress MU. One is BuddyPress that adds Facebook-like features to WordPress MU. The other is bbPress that you can use to integrate forums with your blog. We will discuss bbPress in Chapter 8 and BuddyPress in Chapter 9.
BuddyPress is a suite of plugins for WordPress MU. These plugins allow you to add social networking features to your site, including friends lists, private messages, photo galleries, status feeds, and more.
The complete suite of BuddyPress plugins includes:
Private Messaging: Make it easy for members to contact their friends on-site.
BuddyPress sits on top of WordPress MU and is installed much like a normal plugin. You don't have to install all the features. If you want only Friends Lists and Activity Streams, you can choose to use just those plugins, or you could simply install everything. The choice is yours.
You can find out more about BuddyPress at http://buddypress.org/.
Some people prefer to use other standalone forum scripts such as VBulletin, phpBB, or SMF with WordPress MU and use a "bridge" to tie together the login details from the two databases. This can work well and is certainly a good option if you have a reason for wanting to use a standalone forum. (Perhaps you have already purchased a license for VBulletin, or you have a heavily modified phpBB install with a large user base, and don't want to confuse your users by making a change.)
bbPress has been developed from the ground up to work with WordPress and WordPress MU.
It can easily be modified to share the theme of your WordPress site.
It has "pretty permalinks", just like WordPress.
It is stable and fast.
The ties to WordPress mean that when new versions of bbPress or WordPress are released, any integration issues will be fixed promptly.
There are lots of plugins available to add new features to your forum.
You can find out more about bbPress at http://bbpress.org/.
You will need a very good hosting package to run a busy social networking and blogging site. In most cases, a shared hosting package will not be able to handle the load, even if, on paper, the package meets the requirements listed on the WordPress MU site.
You can run small WordPress MU sites on a shared host. In fact, if you know that your site will have only a small number of users (for example, if your site is aimed at members of a club or society or is used by your company's employees), then shared hosting may be all that you need.
If you're unsure how popular your site will be, look for a host that offers easy upgrades from shared hosting to a VPS or dedicated hosting so that you can upgrade if you need to. If you are creating a site for use by members of the public, don't rush out to buy a server and pay a fortune on collocation straightaway. Start small and upgrade when you need to.
Choose your host carefully
A shared hosting account may be sufficient to install and test your web site, but it is likely that you will quickly reach the limits of a shared host once your site opens to the public. WordPress MU uses more server resources than a standalone WordPress blog, and you should make sure that your host will be able to cope with the demand. For a small or medium sized community, a low-end VPS account will probably be the best choice. The good news is that VPS accounts are only slightly more expensive than a good shared hosting account and, for your money, you will get a server that can grow with you as your traffic increases.
The range of hosting options out there can be quite intimidating, especially if you aren't used to managing your own sites. The kind of hosting you choose will depend on the amount of traffic your site gets, your budget, and the features you need access to.
A V PS is a Virtual Private Server. This is the next step up from standard shared hosting. With a VPS, you have a shell account and total control over your server. You can install whatever you want and configure it the way you want. VPSes aren't actually real physical boxes; they are virtual machines, and your VPS is likely to be running on the same computer as several other VPSes.
The good thing about VPSes is that they are inexpensive, and you have almost total control over the configuration of the machine. However, VPS packages tend to be less powerful than dedicated hosting packages, so you may find that if your site takes off, you outgrow your VPS very quickly.
If you aren't already familiar with running a server, then you may want to consider buying a "Managed VPS" package. These are more expensive than standard packages, but your hosting company will look after the technical side of things, including applying security patches when they are released and managing the configuration of the server.
Dedicated servers are much more expensive than VPSes. But instead of just getting a small virtual machine and limited bandwidth and storage space, you get a real, physical server. If you need the freedom to do whatever you want and expect to have very high traffic, then leasing a dedicated server is a good option. You could also consider buying a server and then using a collocation agreement.
Grid hosting is a relatively new form of hosting. Instead of all your scripts and data being handled in one central place, it is handled "in the cloud". Cloud-based hosting solutions can be economical if you are expecting small amounts of traffic most of the time but want to make sure that a sudden traffic spike won't bring your server to its knees. Usually, you pay for only the amount of bandwidth/processor cycles you use, and the servers respond elastically to your needs.
The downside of grid hosting is that many grid hosts don't support wildcard subdomains, and you can't tweak your server's configuration the way you can with a dedicated server. Also, if you're running under high load all the time, your bills could work out to be more expensive than with a dedicated server.
For most people, a dedicated server or a VPS is the best option. You could always farm out specific parts of your site to the cloud. We will discuss how to do this later in the book.
You can run WordPress MU on most web servers. The developers recommend Apache or LiteSpeed, but it is possible to run WordPress MU on other servers such as Lighttpd or Nginx, although alternative web servers may require some tweaks that are beyond the scope of this book. The main requirements are:
If you want to take advantage of the subdomains feature of WordPress MU, then you will need access to the WHM control panel (or have some other way of setting up wildcard subdomains). If you are using a VPS or dedicated server, you can set up the subdomains yourself using Bind 9. If you're on a shared host, you may need to contact support to get them to set up wildcard subdomains for you.
Other things to check with your host:
The PHP memory limit: You should ensure it can be increased to at least 32MB (preferably 64MB)
Register_globalsshould be turned off in
Here are some suggestions to get you started:
I use a UK-based web hosting company called 34SP (http://www.34sp.com). Their prices are in GBP and their packages aren't quite as generous on data transfer/storage as some of the deals offered by other hosts, but I have been with them for almost four years and have found their servers to be rock-solid stable and their tech support team is very knowledgeable and quick to respond.
Throughout this book we will be building a niche blog networkâfor Vampire Slayers. The site, called SlayerCafe, will offer a safe environment for Vampire Slayers, Watchers, and other people who are interested in fighting against vampires and demons.
SlayerCafe will provide its members with their own blog (which can be set to private if they wish), and it will also allow them to form special interest groups, build friends lists of local Slayers, and share information with each other.
To ensure that the Watchers that run the site don't have too much of their time eaten up by boring admin tasks (they still have to research vampires and guide their Slayers, after all!), we will set up some anti-spam measures and assign some senior Slayers with moderator roles so that they can take care of the basic admin tasks on the site.
Running a site can be expensive. If SlayerCafe becomes popular with the Slayers, then they will use up a lot of bandwidth posting photographs and videos of their exploits!
To combat this bandwidth bill, we will offer premium membership features, such as the ability to customize your theme, extra storage space, and custom ranks on the forums, and we will run a SlayerCafe store where members can purchase t-shirts and other items.
It's easy to get carried away when you are trying to plan your WordPress MU site. There are thousands of plugins and widgets available and, if you install all the ones that sound cool, you'll end up with a site that is very cluttered and difficult to use.
When planning your site, think about what it is you want the site to do. The chances are, you want most (if not all) of the features offered by the basic bbPress and BuddyPress. You will also want some of the plugins that make life easier for the site admin (anti-spam measures, plugin management, and so on), but when you're thinking about the frontend that your users see, try to keep it as clean as possible.
Consider the following:
Your target audience: You may think that a Twitter widget is cool, but if your site is aimed at teenagers, do some research to see what social networks they prefer. You may find a Twitter widget wouldn't be wanted, while other networks would go down well.
The purpose of the site: The ability to share PowerPoint presentations is a must-have feature for a work-related site, but on a more social site, users may prefer being able to share videos instead.
Expected browsers and screen sizes: If you're creating a site for your company, you know what browser is installed and what screen size most people use. If your site is aimed at people who play video games, you can reasonably expect they will have large screens and run a modern browser. If it's aimed at a niche interest group that isn't something to do with technology, then it's worth catering to older browsers and smaller screen resolutions and picking a theme that will look good on as many different setups as possible.
The beauty of WordPress MU is that it is easy to add and remove features, and your site can grow over time. Rather than overwhelming your visitors, start small by offering them the features they really need. As your member base grows, listen to their feedback and gradually add the features they want. This should ensure that everything on your site is practical and that you don't end up with a "monster site" with lots of features that hardly anyone uses and are nothing more than an inconvenience when they break.
This chapter introduced WordPress MU, BuddyPress, and bbPress, and talked about choosing a host for your site, as well as looking ahead to what we will cover in the rest of the book.
In this chapter we learned about WordPress MU and how it differs from the single-user version of WordPress. We also learned about BuddyPress and bbPressâwhat they are used for, what each part of the script does, and why you would want to use them. We learned about the social features of BuddyPress and the benefits of using bbPress instead of a piece of standalone forum software.
We also learned about the web hosting requirements of WordPress MU. We talked about the different kinds of hosting available, and the kinds of site that would suit each hosting option.
We also discussed how to plan your site and choose which features you want to add to your blog network. We talked about the example site, SlayerCafe, that we will be building throughout the course of this book.
Now that we know what we will be using to build our site, it's time to start building it. In Chapter 2, we will install WordPress MU.