Build a phpBB Forum in 5 Steps

Share this article

If you’re thinking of setting up a forum for your Website, you need not start from scratch. The open-source script, phpBB, can easily be installed on most Web servers. This article will describe how to do it right, from downloading through to customisation.

To use this tutorial, you need not know anything about PHP, and need only have had minimum experience with databases.

Introduction to phpBB

phpBB is a stable, open-source, bulletin board script available as a free download from phpbb.com. It allows you to set up an unlimited number of forums and categories. Users, moderators and user groups with varying permissions can be created. In short, it provides everything you’d expect of a bulletin board service. For a complete list of all supported features, see phpbb.com/features.

This software can easily be installed using FTP and a browser. It will run on any PHP-enabled server and requires any one of the following databases: MySQL, PostgreSQL, MS SQL or Access via ODBC.

It doesn’t matter whether your server is running IIS or Apache, though setup tends to be simpler on an Apache Web server. Any Website administrator should be able to install and configure phpBB in a minimum amount of time.

The administrator’s interface allows for ongoing maintenance, so that styles can be changed and topics added or removed. In fact, any administrative duties can be easily performed.

The installation instructions provided at the phpBB site are clear and straightforward. This article does not attempt to replace those instructions but to supplement them and to assist site administrators who are not familiar with PHP. It will help you determine whether you can run phpBB on your server, and if so, how to upload, install and configure it.

System Requirements

As phpBB is written using the server-side scripting language PHP, you need to know whether your Web server supports this language.

If you don’t know the answer to this question, you can always ask your Web host, or upload the following script to your server.

<?php 
 phpinfo();
?>

Use any text editor to create this file and save it as info.php. The actual name of the file is not as important as the extension, .php. In text mode, upload this file to the root directory on your server. View it by typing the address into your browser.

If your server does not support PHP, all you will see are the three lines of code shown above. In this case, get in touch with your Web host and see if PHP can be enabled for your domain.

If PHP is installed, the configuration settings of PHP will be displayed. Assuming that you have PHP enabled on your server, the info.php file will also be useful to help determine if you have the database support needed by phpBB.

Confirming database support for phpBB varies slightly depending upon the Web server you’re running. Let’s first look at Web servers that use Apache.

Apache/Linux

Most versions of PHP on Apache are compiled with support for MySQL databases. You can confirm this by looking again at the “info.php” file. The third line of this file should be the Configure Command. In this line, look for the words with-mysql.

PostgreSQL is not as widely supported, but you should be able to discover whether your server supports it in exactly the same way, but instead, looking for with-pgsql.

IIS/Windows

There will be no Configure Command available when PHP is run on a Windows platform, so we’ll take a slightly different approach to confirm database support here. Again viewing the info.php file, choose Find from your browser’s menu options and search for your database type.

For instance, if we searched for mssql to confirm support for MS SQL Server, we should see something similar to the text below:

1304_table1

In the same way, you can test for PostgreSQL using the search string pgsql, for MySQL using mysql, and for ODBC support using odbc.

Use the info.php file to determine which version of the database you have. You’ll need to know this when we begin the installation, and, with database and PHP support confirmed, we can now begin that process.

Upload The phpBB Files

Assuming you’ve downloaded and decompressed the files for phpBB, everything you need to upload should be in the directory called phpBB2. The only real requirement is that the directory structure be preserved.

Use your favourite FTP program to upload the files to your server. Make sure that all non-graphic files are transferred in ASCII mode. Most FTP programmes will do this automatically for you, based on the file extensions. Make sure your software is configured to transfer all files with the extensions .php, .tpl, .inc, .htm and .cfg as text files.

After the upload is complete, change the permissions on the config.php file so that they’re writeable by all. If you don’t know how to do this, don’t worry about it. The program will give you the option of saving a new config.php file and then overwriting the original.

Prepare for Installation

In preparation for setting up phpBB on your server, you’ll need the following information:

  • Database Server Hostname/DSN
  • Database Name
  • Database Username
  • Database Password
  • Admin Email Address

Let’s discuss this information before we proceed. The host name will be the domain name at which your database is hosted. If your database is hosted on the same server as your Web server, all you need enter here is localhost. If it resides on another server, you can enter the appropriate domain name or the IP address. If instead you’re using ODBC to connect, you will need the connection name. If you are unsure about your situation, clarify the specifics with your Web host.

The database name is, quite simply, the name of the database you’re planning to use. You may use an existing database or create a new one. To create a new database, you may again need to speak with your Web host. If you’re using MySQL with phpMyAdmin, then it’s a relatively simple matter. If you’re using an existing database, table names will be created with a distinctive prefix so that the phpBB tables are readily identifiable.

The username and password need no explanation. The admin email is the email address to which you want questions relating to your bulletin board to be sent.

Installation

With all the information at hand, installation is as simple as pointing your browser towards the install.php file. If you uploaded the directory phpBB2 and its contents to the root directory of your server, the path you need is http://www.<your domain>/phpBB2/install/install.php.

Fill in the text boxes and press the Start Install button. Within seconds you should be finished — installation really is that simple. All the necessary database tables have been created for you. If you wish, have a look at them. There should be a total of 29 new tables — and we haven’t even had to think about SQL!

Shut down your browser, and don’t forget to delete the directories called contrib and install. phpBB won’t run until you do so. If, during the installation, you were asked to download the “config.php” file, you must now upload it to the phpBB2 directory, overwriting the existing file.

Administer Your Forum

To administer your Bulletin Board open http://www.<your domain>/phpBB2/index.php in your browser, and log in with the administrator name and password that you specified on installation. Then, click the Go to Administration Panel link at the bottom of the page. You’ll probably want to go to Forum Admin > Management first, to set up a new forum and categories.

Styles Admin is probably the next area you’ll want to look at, but before you do, go to the phpBB site and see what other styles you might like to download. Upon installation, the phpBB default style, subSilver, is the only one available, but any number of styles may be installed.

After downloading them from the phpBB site, you need to upload your new styles to the Templates directory, which is directly below the phpBB2 directory. After this, new styles must be installed from the Administration panel by going to Styles Admin > Add.

Once you’ve found a theme you like, you can further customise it from the administration panel by choosing Style Admin > Management > Edit. You can associate a theme with an entirely new Cascading Style Sheet (CSS), or you can edit the existing one.

Customise Your Forum

Once you’ve settled on a style, you will doubtless want to further customise it in ways that aren’t available through the Administration panel. For instance, you might want to display your own logo, rather than the phpBB logo.

If you have some knowledge of HTML, minor changes like this are not too difficult. Any changes you wish to make to the appearance of the header can be addressed by making changes to the file called overall_header.tpl. Since this file is included for every page within a style, your changes will take effect throughout the whole bulletin board.

Some other changes can be relatively easy to make. For instance, if it doesn’t make sense to have user groups, the appropriate code can simply be commented out of the overall_header.tpl file.

Be aware that phpBB allows users to choose their own styles, so, unless you choose to override the user’s choice of style from the general configuration menu, any installed templates will be available for users to choose. If you do decide to customise styles and also want to allow users their choice, you’ll have to make the appropriate changes to every style template. One change you shouldn’t make is to the copyright notice on the footer of each page.

Conclusion

With little effort and no cost, you’ve installed a professional bulletin board service on your Website, regardless of the server you’re using and your level of knowledge of PHP and databases. The style of this bulletin board can be easily configured to match the look and feel of the rest of your site, so give it a try!

Frequently Asked Questions (FAQs) about Building a phpBB Forum

What are the prerequisites for building a phpBB forum?

To build a phpBB forum, you need a web hosting account and a domain name. You also need to download the latest version of phpBB from the official website. It’s also recommended to have a basic understanding of PHP and MySQL, as phpBB is built on these technologies. However, phpBB is designed to be user-friendly, so even if you’re not a tech expert, you can still set up and manage your forum with ease.

How can I customize the look of my phpBB forum?

phpBB offers a wide range of styles and themes that you can use to customize the look of your forum. You can access these styles from the phpBB Styles Database. Once you’ve chosen a style, you can download it and install it on your forum. You can also create your own style if you have the necessary skills.

How can I manage users and permissions in my phpBB forum?

phpBB has a powerful and flexible system for managing users and permissions. You can create different user groups, each with its own set of permissions. You can also set permissions for individual users. This allows you to control who can view and post in different sections of your forum, among other things.

How can I add extensions to my phpBB forum?

Extensions are a great way to add new features and functionality to your phpBB forum. You can find a wide range of extensions in the phpBB Extensions Database. Once you’ve found an extension you want to use, you can download it and install it on your forum.

How can I keep my phpBB forum secure?

Keeping your phpBB forum secure is crucial. You should always use a strong, unique password for your administrator account. You should also keep your phpBB software up to date, as updates often include security fixes. Additionally, you can use features like CAPTCHA and email verification to protect against spam and automated attacks.

How can I optimize my phpBB forum for search engines?

phpBB includes several features that can help you optimize your forum for search engines. For example, you can use the SEO-friendly URLs feature to make your forum’s URLs more readable and relevant. You can also use the meta tags feature to provide search engines with additional information about your forum.

How can I back up my phpBB forum?

It’s important to regularly back up your phpBB forum to protect against data loss. You can use the built-in backup feature in phpBB to create a backup of your forum’s database. You should also back up your forum’s files, which include your styles, extensions, and uploaded files.

How can I migrate my phpBB forum to a new server?

If you need to move your phpBB forum to a new server, you can do so by backing up your forum’s database and files, then restoring them on the new server. You’ll also need to update your forum’s configuration to reflect the new server’s settings.

How can I troubleshoot problems with my phpBB forum?

If you’re experiencing problems with your phpBB forum, the first step is to check the phpBB Support Forums for solutions. If you can’t find a solution there, you can post a new topic describing your problem. Be sure to provide as much information as possible to help others diagnose the issue.

How can I make my phpBB forum more engaging for users?

There are many ways to make your phpBB forum more engaging for users. You can create interesting and relevant topics, encourage users to participate in discussions, and reward active users with special privileges or titles. You can also use extensions to add new features that enhance user engagement, such as social media integration or gamification elements.

Peter LavinPeter Lavin
View Author

Peter runs a Web Design and Development firm in Toronto, Canada. For more information, visit http://www.softcoded.com/.

Share this article
Read Next
Get the freshest news and resources for developers, designers and digital creators in your inbox each week