phpBB is a free popular bulletin board system written in PHP that has all needed features for creating a flexible discussion board website. Like any other paid forum systems, phpBB allows administrators to create for free new posts, add unlimited number of categories, private message support, ban members by IP/username, etc.

In this tutorial, I will explain two methods for installing phpBB locally under a system running Ubuntu (12.04/11.10 or older). This will allow you to test this script offline before launching it online.

Method 1 (Automatic Installation)

You can install phpBB with this command from the terminal, but this is not the latest version:

sudo apt-get install phpbb3

To make the forum accessible via the web server, run this command:

sudo ln -s /usr/share/phpbb3/www /var/www/phpbb 

Restart now Apache with this command:

sudo /etc/init.d/apache2 restart

The forum will be accessible at this link:


The default username and password are : admin

Method 2 (Manual Installation)

If you haven't installed the LAMP web server under Ubuntu, you can do with this command (you will be required to enter a MySQL root password during installation):

sudo apt-get install lamp-server^

Then restart Apache with this command:

sudo /etc/init.d/apache2 restart

1. Create A MySQL Database & User

- Open the terminal and login to the MySQL server with this command (use the MySQL root password set during the installation of LAMP):

mysql -u root -p

- The MySQL database we will create will be named phpBB3. So, run this command to create it:

create database phpBB3;

-  The MySQL user will be also named phpBB3. You can create it with this command (change "12345" to any password of your choice):

CREATE USER 'phpBB3'@'localhost' IDENTIFIED BY '12345';

- Give this user all access privileges to the MySQL database with this command:


Then exit with this command:


So, the MySQL settings that you will use later during the installation of phpBB will be as follows:

  • hostname: localhost
  • Database name: phpBB3
  • Database username: phpBB3
  • Database password: 12345
2. Install phpBB Locally Under Ubuntu

Let's first download and move phpBB folder to the /var/www directory with the following commands:

wget -O phpBB-3.0.10.tar.bz2

sudo tar jxvf phpBB-3.0.10.tar.bz2 -C /var/www

Run now these commands to change permissions of these files and folders:

sudo chmod a+rw /var/www/phpBB3/config.php

sudo chmod a+rw /var/www/phpBB3/store

sudo chmod a+rw /var/www/phpBB3/cache

sudo chmod a+rw /var/www/phpBB3/files

sudo chmod a+rw /var/www/phpBB3/images/avatars/upload/

Add now PHP GD support to Apache with these commands:

sudo apt-get install php5-gd

sudo /etc/init.d/apache2 restart

To start the installation of phpBB, open one of these links:



Then follow installation instructions. In the MySQL database page, insert the MySQL details we have created above:

When the installation is complete, remove the Install directory with this command to get rid of the security notification message:

sudo rm -r /var/www/phpBB3/install/

Your forum main page will be now accessible at this link:

You can start now managing your forum the way you like.

That's it!