WordPress MU 2.8: Beginner's Guide 1847196543, 9781847196545

Packed with easy-to-follow examples and screenshots, this book is designed to be followed from beginning to end, althoug

236 74 9MB

English Pages 268 Year 2009

Report DMCA / Copyright

DOWNLOAD PDF FILE

Recommend Papers

WordPress MU 2.8: Beginner's Guide
 1847196543, 9781847196545

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
File loading please wait...
Citation preview

WordPress MU 2.8 Beginner's Guide

Build your own blog network with unlimited users and blogs, forums, photo galleries, and more!

Lesley A. Harrison

BIRMINGHAM - MUMBAI

This material is copyright and is licensed for the sole use by JEROME RAYMOND on 30th October 2009

WordPress MU 2.8 Beginner’s Guide

Copyright © 2009 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmited in any form or by any means, without the prior writen permission of the publisher, except in the case of brief quotaions embedded in criical aricles or reviews. Every efort has been made in the preparaion of this book to ensure the accuracy of the informaion presented. However, the informaion contained in this book is sold without warranty, either express or implied. Neither the author, Packt Publishing, nor its dealers or distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark informaion about all the companies and products menioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this informaion.

First published: October 2009

Producion Reference: 1211009

Published by Packt Publishing Ltd. 32 Lincoln Road Olton Birmingham, B27 6PA, UK. ISBN 978-1-847196-54-5 www.packtpub.com

Cover Image by Vinayak Chitar ([email protected])

This material is copyright and is licensed for the sole use by JEROME RAYMOND on 30th October 2009

Credits Author Lesley A. Harrison

Reviewers Joseph Arellano

Editorial Team Leader Gagandeep Singh Project Team Leader Priya Mukherji

Lee Jordon Project Coordinator Acquisiion Editor

Zainab Bagasrawala

David Barnes Proofreader Development Editor

Jade Schuler

Amey Kanse Producion Coordinator Technical Editor

Shantanu Zagade

Gaurav Datar Cover Work Copy Editor

Shantanu Zagade

Sanchari Mukherjee Indexer Hemangini Bari

This material is copyright and is licensed for the sole use by JEROME RAYMOND on 30th October 2009

About the Author Lesley Harrison has more than ten years of experience working in the world of IT. She has served as a web developer for various local organizaions, a systems administrator for a mulinaional IT outsourcing company, and later a database administrator for a Briish uility company. Today, Lesley runs her own video gaming site, Myth-Games.com, and works as a freelance web developer. She works with clients all over the world to develop Joomla! and WordPress/WordPress MU web sites. Lesley has enjoyed seeing the Internet develop from the days of newsgroups and staic HTML pages, to the vast and interacive World Wide Web of today. She worked as a reviewer on Daniel Chapman's Joomla 1.5 Customizaion book, which was published by Packt Publishing in August 2009. I would like to thank my husband Mark for his paience while I was wriing this book instead of leveling one of my many characters. I would also like to thank Blaenk Denum for his help with the reCAPTCHA plugin, and the Packt Publishing team for their paience and guidance over the past year.

This material is copyright and is licensed for the sole use by JEROME RAYMOND on 30th October 2009

About the Reviewers Lee Jordon is an avid user of WordPress, Blogger, Twiter, and other useful web applicaions. She designs interacive customer service portals, enterprise-level web sites, other web-based applicaions, and writes web content and user guides. Her toolbox includes HTML, PHP, JavaScript, Java Servlets, MySQL, Flash, Dreamweaver, and Photoshop. She applies over 10 years of experience of designing and wriing for the Web to develop interacive, user friendly web sites and wriing technical guides to popular web technologies. She is the author of two books with Packt Publishing: Blogger: Beyond the Basics and Project Management with dotProject.

Joseph Arellano holds a B.A. in Communicaion Arts from the University of the Paciic and a J.D. (law degree) from the University of Southern California. He lives in Northern California and maintains the Joseph’s Reviews book review blogsite (http://josephsreviews. wordpress.com/).

This material is copyright and is licensed for the sole use by JEROME RAYMOND on 30th October 2009

This material is copyright and is licensed for the sole use by JEROME RAYMOND on 30th October 2009

Table of Contents Preface Chapter 1: Introducing WordPress MU What is WordPress MU Making your own social blog network What is BuddyPress What is bbPress Making and hosing my site Choosing between VPS, dedicated, and grid hosing VPS

1 7 8 10 10 12 13 14 14

Server requirements for WordPress MU Recommended WordPress MU hosts Building our example site: The SlayerCafe Planning your site Summary

Chapter 2: Installing WordPress MU Tools you will need Text editors FTP clients and other tools Seing up a local web server Time for acion – geing your server set up Databases with MySQL Preparing for WordPress MU—creaing a database Time for acion – creaing a database for WordPress MU Time for acion – subdomains for WordPress MU Preparing your live server Time for acion – working with cPanel User blogs with subdomains Time for acion – subdomains under WHM

15 16 16 17 18

19 19 19 20 20 20 22 23 23 24 26 26 26 27

This material is copyright and is licensed for the sole use by JEROME RAYMOND on 30th October 2009

Table of Contents

One last thing—wildcards and Apache Installing WordPress MU Time for acion – geing WordPress MU up and running Changing the admin password Time for acion – changing the admin password Leing people register Time for acion – enabling registraions Tesing your site Time for acion – creaing a new user Summary

Chapter 3: Customizing the Appearance of Your Site Picking out a theme Installing your new theme Time for acion – installing a new theme Styling the sign-up page Time for acion – ediing your theme Seing the theme for your users' blogs Time for acion – changing the default blog theme Customizing your home page Time for acion – making a sign-up buton Featured posts Time for acion – featured posts Showing of your staisics Time for acion – simple stats Displaying recent posts and comments Time for acion – displaying the most acive blogs Customizing AHP Sitewide Recent Posts plugin Time for acion – tweaking the recent post display opions Displaying Sitewide recent comments plugin Time for acion – Sitewide recent comments The plugin display code

28 29 30 33 34 34 34 35 36 37

39 39 40 41 44 45 47 47 50 50 51 52 56 56 59 59 61 61 63 63 66

Time for acion – our improved home page Other important points Summary

Chapter 4: Leing Users Manage Their Blogs User management basics Preparing the site for our users

67 67 68

69 69 70

Banned Names

70

Customizaion opions for your users Time for acion – ofering a selecion of themes

72 73

[ ii ]

This material is copyright and is licensed for the sole use by JEROME RAYMOND on 30th October 2009

Table of Contents

User editable themes Time for acion – userthemes revisited User roles and admin panels Time for acion – seing user levels and changing the user's admin panel Hiding the dashboard Time for acion – hiding the dashboard More user opions – privacy and using their own domain Time for acion – domain mapping A few things to consider Summary

Chapter 5: Protecing Your Site

74 75 78 79 79 81 81 83 83 86 86

89

Signing up for reCAPTCHA Stopping spam with reCAPTCHA and Bad Behavior Time for acion – seing up reCAPTCHA Bad Behavior Time for acion – seing up Bad Behavior Making sure the plugins run for your users Time for acion – managing your users' plugins Blocking bad guys with .htaccess Time for acion – .htaccess seings to stop bad guys Other useful plugins Moderaing registraions Taming your default categories

90 90 90 93 93 98 98 101 102 105 105 106

Regular backups without liting a inger Time for acion – automaic backups Summary

107 107 109

Chapter 6: Increasing Traic to Your Blog

111

Improved tagging Time for acion – tagging blog posts Sitewide tags Time for acion – sitewide tag clouds Using pings Time for acion – pings Trackbacks Ofering RSS feeds Time for acion – ofering RSS subscripion opions FeedBurner

111 112 114 114 117 117 118 120 120 122

Time for acion – let's burn some feeds Twiter and social bookmarking Geing your readers to share posts

122 126 126 [ iii ]

This material is copyright and is licensed for the sole use by JEROME RAYMOND on 30th October 2009

Table of Contents

Time for acion – social bookmarking links More about traic building Summary

Chapter 7: Sicky Features for your Blog Network

127 129 130

131

What do people mean by "sicky"? Leing readers and authors communicate Contact forms Time for acion – seing up contact forms Improved comments Time for acion – IntenseDebate Comments

132 132 133 133 135 135

Acivaing IntenseDebate on your users' blogs

140

Community features—gravatars Time for acion – gravatars in WordPress MU Encouraging sign-ups with downloads for members only Welcoming new visitors Time for acion – creaing a welcome message Related posts for visitors from search engines Other ways to engage the community Polls Sitewide searching

141 141 143 144 144 148 149 149 149

Summary

150

Chapter 8: Adding Forums with bbPress Installing bbPress Time for acion – installing bbPress One login for both the forum and the blog Time for acion – user DB integraion with WordPress MU Handling new users Time for acion – blog and forum registraions Seamless theme integraion Time for acion – styling your forum Managing your forum Time for acion – managing your forum Managing your users

151 151 152 154 155 156 157 157 158 160 160 163

Time for acion – seing user permissions Useful plugins for bbPress Time for acion – installing plugins Displaying recent posts in your blog Creaing forum topics using blog posts Summary

164 166 166 171 171 172

[ iv ]

This material is copyright and is licensed for the sole use by JEROME RAYMOND on 30th October 2009

Table of Contents

Chapter 9: Social Networking with BuddyPress

173

BuddyPress Seing up BuddyPress Time for acion – installing the BuddyPress suite BuddyPress plugins explained

173 174 174 178

Working with Extended Proiles Private Messaging Friends list Groups The Wire Acivity streams Blog tracking Forums

178 179 180 181 182 183 184 184

Themes for your BuddyPress network Time for acion – installing new themes Puing BuddyPress content on your front page Hooking up BuddyPress to other social networks Time for acion – Facebook Connect Integraing with Twiter

184 185 186 187 188 189

Improving your site's performance Time for acion – speeding up BuddyPress The future of BuddyPress Summary

Chapter 10: Moneizing Your Site

190 190 191 192

193

Ways to moneize your site

193

Adverising networks as a revenue source Selling ads directly Ads in RSS feeds Donate links Revenue sharing Premium memberships Selling products via your site

194 195 196 197 197 198 198

Managing ads on WordPress MU Time for acion – ad management with Adverising Manager Revenue sharing Time for acion – revenue sharing Premium memberships MemberWing EasyPaypal

199 199 203 204 205 206 206

Time for acion – premium memberships Other ways to moneize your site—stores Things to remember when moneizing your site Summary

206 210 210 211

[v]

This material is copyright and is licensed for the sole use by JEROME RAYMOND on 30th October 2009

Table of Contents

Chapter 11: Site Opimizaion

213

Choosing to opimize your site Speed up your site with caching Time for acion – seing up object cache More ways to speed up your site—opimizing themes Spreading the load Time for acion – spreading the load More theme opimizaion Opimizing your database Time for acion – opimizing your site through phpMyAdmin Troubleshooing slow loading sites Server side opimizaions Summary

Chapter 12: Troubleshooing and Maintaining your Site Why worry about upgrades Performing a safe upgrade

213 215 215 217 217 218 219 221 221 223 225 227

229 229 230

Performing a database backup via the command line Performing a database backup via phpMyAdmin

Time for acion – performing the upgrade Troubleshooing—when upgrades go wrong Troubleshooing—common problems Time for acion – restoring a backup Protecing your site from hackers Geing help online Summary

Index

231 231

232 234 236 237 238 241 243

245

[ vi ]

This material is copyright and is licensed for the sole use by JEROME RAYMOND on 30th October 2009

Preface In today's digital world, it seems that everyone has a web presence—be that a proile on a social networking site such as Facebook, a blog hosted by Blogger or WordPress.com, or their own web site. General networking and blogging sites are useful for keeping in touch with old friends, but their search tools are less efecive if you are trying to ind people with similar interests to your own or who work in the same industry. The muliuser version of WordPress, called WordPress MU, is an ideal soluion to this problem. WordPress MU, paired with forum sotware such as bbPress and the BuddyPress suite of social networking tools, allows you to start your own blog network with social networking features such as friends lists, status updates, and groups. Using these tools, you could start a social network and blogging site for a local social group, a fan club, or your company. Throughout this book, we will build a blog network called SlayerCafe. This blog network is aimed at Vampire Slayers and their Watchers, as well as other people who are interested in joining the ight against demons of the night. The Slayers and Watchers will be able to share informaion, swap ips, update each other on their aciviies, share videos, and discuss demonic goings-on in the site's forums. The Slayers feel they need such a site because they found that public social networking sites such as Facebook weren't suitable for discussing vampires and werewolves. Their serious conversaions were invaded by fans of Vampire: The Masquerade and Twilight, which made it too diicult to separate the real vampires from the icional ones. This book will explain how to set up WordPress MU and how to seamlessly integrate WordPress MU with bbPress and BuddyPress. You will also learn how to promote your blog network and atract new users, as well as how to keep your site safe, secure, and free from spam.

This material is copyright and is licensed for the sole use by JEROME RAYMOND on 30th October 2009

Preface

Running a successful blog network requires a good web server; however, it does not have to be expensive to get started. You will learn about the diferent hosing opions available to you, along with the ways to opimize WordPress MU so that the server load is reduced as much as possible. If your site is a business venture, then you will be interested in learning how to make money by charging for premium memberships, selling site-related merchandise, or by using adverising. All those opions will be discussed.

What this book covers Chapter 1—Introducing WordPress MU will introduce WordPress MU, bbPress, and BuddyPress and explain the hosing requirements of those sites. You will learn about shared hosing, Virtual Private Servers (known as VPSes), and dedicated servers, and you will get an overview of the beneits and downsides of each of those hosing opions. Finally, you will learn how to plan the development of your site so that it has all of the features that you want to ofer to your prospecive users. Chapter 2—Installing WordPress MU will discuss seing up a local copy of your site for tesing purposes and installing WordPress MU on your web server in subdomain coniguraion so that users can have WordPress.com style "myusername.theblogsite.com" blog addresses. Chapter 3—Customizing the Appearance of Your Site will cover installing and customizing themes and how to ofer a range of theme choices to your users. You will also be introduced to some plug-ins that ofer community features so that your blog looks like it is a part of a network, rather than a standalone blog. Chapter 4—Leing Users Manage Their Blogs will cover more about the muliuser aspects of WordPress MU and seing up some features that allow users to manage their blogs, including allowing them to add and remove plugins and widgets, change their themes, and even have their own domain name point to their blog. Chapter 5—Protecing Your Site will explore some security opions that will make life harder for spammers and hackers, keeping the site clean, safe, and stable for your users. You will learn how to reduce spam, block known bad visitors, and automate backups, so that if the worst happens, you can restore a backup of your site quickly and easily. Chapter 6—Increasing Traic to Your Blog Network discusses some simple promoion techniques that will make it easy for you and your site's users to bring in visitors to their blogs. You will learn how to ofer RSS feeds that interested visitors can subscribe to, and how to "converse" with other bloggers via trackbacks. You will also learn how to use pings to tell blog directories that your blog has been updated and how to promote your blog on Twiter.

[]

This material is copyright and is licensed for the sole use by JEROME RAYMOND on 30th October 2009

Preface

Chapter 7—Sicky Features for your Blog Network tells what is meant by a "sicky" site and how to make your visitors feel like they are part of the community, encouraging them to return to the site and promote your site to their friends. Chapter 8—Adding Forums with bbPress introduces the bbPress forum sotware. You will learn how to install it and how to integrate it seamlessly with WordPress MU. Not only will the two parts of the site look like they it together, but they will behave like they are part of the same site, too. Your users will need to register for an account once and, when they log in to the site, they will have access to both the blog network and the forums. Chapter 9—Social Networking with BuddyPress will help us add some social features to our site. BuddyPress ofers several features, including friends lists, groups, and The Wire (a feature similar to Facebook's Wall). Along with seing up and opimizing BuddyPress, you will learn how to allow your users to log in to your site with Facebook Connect and how to integrate BuddyPress with Twiter—the popular "microblogging" service. Chapter 10—Moneizing Your Site will show how to moneize your site. We will explore several diferent opions, including adverising, revenue sharing, donaions, and subscripions. Which model (or models) you choose will depend on the kind of community you are running. You will learn about several diferent revenue models so that you can ind the one that suits your site best. Chapter 11—Site Opimizaion will explain some ways to reduce the load generated by your visitors, enabling your exising server to handle a greater amount of traic. You will also learn about some cheaper ways to increase your server's capacity. Chapter 12—Troubleshooing and Maintaining your Site will give an overview of how to maintain your site and how to troubleshoot common issues with upgrades and plugins. You will see some common error messages and learn what they are likely to mean and how to ix them.

Who this book is for If you wish to manage muliple blogs and build a blog network, then this book is for you. You are not expected to be experienced with PHP coding. Some knowledge of HTML and some experience with the blogging and social networking world will be helpful, but not essenial.

Conventions In this book, you will ind a number of styles of text that disinguish between diferent kinds of informaion. Here are some examples of these styles, and an explanaion of their meaning. Code words in text are shown as follows: "Open your theme's index.php ile—in our case we are ediing the Blue Zinfandel theme." []

This material is copyright and is licensed for the sole use by JEROME RAYMOND on 30th October 2009

Preface

A block of code will be set as follows: