Category Archives: BuddyPress

MECC 2011 – Don’t Get Ninged

So, there has been a lot of interest in how to build your own school services such as blogs, wikis, and social network. This session is dedicated to understanding the basics of how you can setup a basic social networking sites for your class, school, or district.

To accomplish this task we are going to need to learn about a few things:

  1. Server Virtualization
  2. DNS basics
  3. Linux LAMP
  4. WordPress and Buddypress

WPMU DEV - The WordPress Experts

Server Virtualization

Basically virtualization is software/hardware that allows you to run a complete operating system on an existing machine as through it is a different physical machine. This allows a systems resources to be maximized and for an end user to interact with an operating system independent of the underlying hardware.

We are going to use Virtualbox by Oracle an open-source virtualization tool for this session. It is quit easy and can be used on Windows, OS X, and just about any variety of Linux.

  1. Install following the directions in the user manual.
  2. Configure Example VM settings
    1. Copy Example.VDI folder to your VMMachine Directory
    2. Adjust VM settings to suit your machine
    3. Start it up.

VM Setup after install:

  1. Update Current Modules
    sudo apt-get update
  2. Upgrade your server to latest software and patches
    sudo apt-get upgrade
  3. Install openSSH server so that you can use a terminal to control server
    sudo apt-get install openssh-server
  4. Open terminal session your platform of choice and ssh into the box
    ssh bpadmin@<your-ip-address>
    (You’ll be prompted to add the RSA Key, type “yes” and then input your password.)
  5. Setup Webmin on your server using APT repositories
    1. Add Webmin APT repository to server APT sources
      sudo nano /etc/apt/sources.list
    2. Add Comment and Webmin URLs
      ##Webmin Repositories for web-based server administration
      deb sarge contrib
      deb sarge contrib
    3. Fetch and install my GPG key with which the repository is signed
      cd /root
      sudo apt-key add jcameron-key.asc
    4. Update your repositories and install webmin
      sudo apt-get update
      sudo apt-get install webmin
    5. Test your webmin install by navigating to https://<your-ip-address>:10000
    6. Your get an untrusted certificate warning (This is normal unless you purchased a 3rd party certificate, which is totally unnecessary.)
    7. Accept it.
    8. Login using admin user info.
  6. Configure local DNS using Hosts file
    1. Server DNS
      1. Set up an entry for host server in the /etc/hosts file
        sudo nano /etc/hosts
      2. Add line with server reference to end
        <your-ip-address> buddypress
      3. Check your DNS by pinging your URL, it should have the IP in the response.
      4. Save
    2. Client DNS
      1. Setup an entry on your client machine, this various depending on the flavor of your OS.
      2. Check your DNS by pinging your URL, it should have the same IP as the server
  7. Begin our LAMP (Linux, Apache, MSQL, and PHP) server setup (Adapted from
    1. Install MySQL database server
      sudo apt-get install mysql-server mysql-client 

      1. Set up a strong root password
      2. Check MySQL in command-line
        mysql -u root -p
        (enter password)
      3. We’ll check the status of the server with a sql command (the semi-colon is critical)
        show status;
      4. Exit MySQL Shell
    2. Install Apache2 server
      sudo apt-get install apache2 

      1. Open your web-browser and check your apache server at both IP address and buddypress URL. Both should work.
      2. Configure apache2 settings and modules in webmin
        1. Log into Webmin @ https://<server-ip-address>:10000
        2. Click Servers
        3. Click Apache Webserver
        4. Click Global Configuration Tab
        5. Click Configure Apache Modules icon
        6. Make sure rewrite is enabled and save
        7. Stop and start the apache server using the hyperlink in the top right corner
    3. Install PHP5 to use with Apache2
      sudo apt-get install php-5 php5-suhosin 

      1. Restart Apache
        sudo /etc/init.d/apache2 restart
      2. Create a phpinfo file to verify PHP settings
        1. sudo nano /var/www/info.php
        2. Add the phpinfo function to file
          <?php phpinfo(); ?>
        3. Save
      3. In your web-browser navigate to http://<your-ip-address>/info.php
      4. Verify PHP settings.
    4. Add additional useful PHP extensions
      sudo apt-get install php5-mysql php5-gd php5-imagick php5-curl
    5. Your webserver is now ready to rock!

Setting Up WordPress with SVN

  1. Install SVN client for linux
    sudo apt-get install subversion
  2. Change to web directory
    cd /var/www
  3. Use the guide provided by
    sudo svn co .
  4. Now prepare a database for wordpress install using Webmin
    1. In your browser navigate to https://<your-server-ip>:10000
    2. Go to >Servers>MySQL Database Server
    3. Login using root and root password
    4. Click Create a New Database
    5. Give it an original name (“wpbp”), set character set to (“utf8″), and set collation to (“utf8_bin”)
    6. Click Save
    7. Create wordpress DB user to limit server permissions.
    8. Under Global Options click User Permissions
    9. Click Create new User
    10. Give it a name (“wpdb_user”), a complex password, and give it the following permissions (“select, insert, update, delete, create, alter, and drop”)
    11. Click save.
    12. Now your DB and DB user are ready for the installation
  5. Make sure that your wordpress files and directories are read/write for install and default html is removed.
    sudo chown -R www-data:www-data /var/www
    sudo rm /var/www/index.html
  6. Configure mod_rewrite in Apache so that you can use pretty URLS
    1. In Webmin go to >Servers>Apache Webserver
    2. Click on virtual server
    3. Click Edit Directives
    4. Find options and make sure that it includes FollowSymLinks
    5. Find AllowOverride and make sure that it include FileInfo or ALL
    6. Save
    7. Start and stop Apache2 server
  7. Navigate to our webserver in a web browser and follow the directions.
  8. Verify successful wordpress install at your URL.

Setting Up Blog Network and Buddypress

  1. Create blog network following directions @
  2. In terminal edit the /var/www/wp-config.php file as described in the article above by adding
    define(‘WP_ALLOW_MULTISITE’, true);
  3. Log in and go to >Tools>Network
  4. Select sub-directories
  5. Follow directions on the “Enabling Networks” page by using copy and paste with terminal
    1. Create directory
      sudo mkdir /var/www/wp-content/blogs.dir
    2. Correct folder permissions for upload folder
      sudo chown -R www-data:www-data /var/www/wp-content/blogs.dir
    3. Edit /var/www/wp-content.php
      sudo nano /var/www/wp-content.php
    4. Edit /var/www/.htaccess
      sudo nano /var/www/.htaccess
    5. Log out of WordPress and then log back in.
    6. You should now have a “Network Admin” in the top right corner.
    7. Now we need to make sure that our site permissions are correct with CHMOD
      1. For most installations the following should suffice
        sudo chmod -R 755 /var/www
      2. If you are interested in setting a more hardened WordPress install check out this article
    8. You are ready start building blogs and installing Buddy Press.
  6. Install Buddypress plugin
    1. Login in as admin if you haven’t already
    2. Click “Network Admin” in the top right corner
    3. Go to > Plugins > Add Plugin
    4. Search for Buddypress
    5. Click Install Now link
    6. Click the Network Activate link
    7. Make Buddypress theme available to main blog
      1. Go to Sites
      2. Click the edit link under “/” blog
      3. Click theme tab
      4. Enable Buddypress default theme
    8. Go back to main blog admin page by clicking Site Admin link
    9. Click > Appearance > Themes
    10. Activate Buddypress theme
    11. View site