How to Install PunBB on Debian 8

punbb vpsIn this tutorial we are going to provide you with step-by-step instructions on how to install PunBB on a Debian 8 VPS.
PunBB is an open source, lightweight forum software written in PHP with simple layout and clean design. In general, it is faster than other forum software and it is very easy to administrate and moderate. The default theme of PunBB supports responsive design, so it is mobile and tablet friendly.
This tutorial was tested and written for a Debian VPS, but it should work on any Linux distribution.

This install guide assumes that Apache, MySQL and PHP are already installed and configured on your PunBB virtual server. At the time of writing this tutorial, the latest stable version of PunBB is 1.4.3 and it requires:

  • PHP 5 or higher with the MySQL PHP extension enabled
  • Apache Web Server >= 2.0 compiled with mod_rewrite module and with the following directives allowed: DirectoryIndex, Deny, Allow, Options, Order, AddHandler, RewriteEngine, RewriteBase, RewriteCond and RewriteRule.
  • MySQL, PostgreSQL or SQLite installed on your virtual server.

So, let’s start with the installation procedure. Download the latest version of PunBB available at ‘’ to a directory of your virtual server and extract it using the following commands:

cd /opt/
unzip -o -d /var/www/html/

PunBB requires a database to store it’s data, so create a new MySQL database for PunBB to use and assign a user to it with full permissions:

mysql -u root -p
mysql> CREATE DATABASE punbbdb;
mysql> GRANT ALL PRIVILEGES ON punbbdb.* TO 'punbbuser'@'localhost' IDENTIFIED BY 'your-password' WITH GRANT OPTION;
mysql> quit

Create a new virtual host directive in Apache. For example, create a new Apache configuration file named ‘punbb.conf’ on your virtual server:

touch /etc/apache2/sites-available/punbb.conf

Then, run the following command:

ln -s /etc/apache2/sites-available/punbb.conf /etc/apache2/sites-enabled/punbb.conf

Alternatively, use the a2ensite to enable the punbb.conf configuration in Apache:

sudo a2ensite punbb.conf

Edit the ‘punbb.conf’ configuration file:

Need a fast and easy fix?
✔ Unlimited Managed Support
✔ Supports Your Software
✔ 2 CPU Cores
✔ 2 GB RAM
✔ 50 GB PCIe4 NVMe Disk
✔ 1854 GeekBench Score
✔ Unmetered Data Transfer

Now just $43 .99

vi /etc/apache2/sites-available/punbb.conf

and add the following lines to it:

<VirtualHost *:80>
DocumentRoot /var/www/html/punbb/
<Directory /var/www/html/punbb/>
Options FollowSymLinks
AllowOverride All
ErrorLog /var/log/apache2/
CustomLog /var/log/apache2/ common

Restart the Apache web server for the changes to take effect:

systemctl restart apache2.service

Move the PunBB installation files to the document root directory defined in the virtual host directive above:

mv /var/www/html/punbb-1.4.3/ /var/www/html/punbb/

Set the proper ownership of PunBB files and directories:

chown -R www-data /var/www/html/punbb/

Open your favorite web browser and navigate to . Once you do that, you will be taken to the first page of the PunBB web installer. Enter the MySQL database information, set administrator username and password and start the installation. Once the installation is complete, log in at as administrator user and configure your PunBB forum according to your needs.

Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to install PunBB for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

Leave a Comment