How to install Flarum forum

What is Flarum?

Flarum is a free, open-source, and simple PHP discussion platform for your website. Flarum is fast, easy to use, responsive, and has all the features you need to run a successful community. It is the combined successor of esoTalk and FluxBB.

What are the requirements to install Flarum?

Before installing Flarum, it is essential to check that your server meets the requirements. For the successful Flarum installation you will need:

A Web Server: Apache (with mod_rewrite enabled) or Nginx
PHP 7.2.9+ with the following extensions: curl, dom, gd, JSON, mbstring, OpenSSL, pdo_mysql, tokenizer, zip
MySQL 5.6+ or MariaDB 10.0.5+
SSH (command-line) access to run Composer

What is Composer? And why is it needed?

Composer is a dependency management tool in PHP, which allows you to declare the libraries your project depends on, and it will install or update them for you.

Composer is required for Flarum because: Flarum uses Composer to manage its dependencies and extensions. You need to install the Composer in your machine to download Flarum, its dependencies, and update Flarum with its dependencies.

How to install Flarum on shared hosting?

Flarum requires Composer for installation, and Composer requires SSH access. In many shared hosting, SSH access is enabled, but what about the ones where SSH is disabled? You can still try to install Flarum with workarounds such as Pockethold.

To install Flarum with Pockethold: Upload installer.php where you want Flarum to be installed. Visit the default: yoururl.com/installer.php and follow the instructions.

How to install Flarum?

Step #1: Enable required PHP extensions.

Make sure the required PHP extensions mentioned on requirements are enabled on your hosting service. The required extensions are (curl, dom, gd, JSON, mbstring, OpenSSL, pdo_mysql, tokenizer, zip)

Step #2: Create a database, database user and password for Flarum installation

Setup a database, database user, and password in your hosting account. You should use a fresh database for the Flarum installation. If you are using CPanel, you can create a database from the MySQL database menu.

Step #3: Connect to your account via SSH

In this step, you have to connect your SSH account to use Composer to install Flarum. To access the hosting account via SSH, you need to download and install an SSH client, for example, PuTTY, and connect to the server using your SSH username and password. If you don’t know your username or password, contact your hosting provider.

Once you are logged in, navigate to a folder (or create one) where you want to install Flarum. (You can use “cd” command to change directory and “mkdir” to create a directory.)

Once inside the folder, you want to install Flarum, run this command:

composer create-project flarum/flarum . --stability=beta

You will see the process of installation in the terminal. It might take several minutes for the installation to get completed.

Step #4: Access your website using a web browser

After the installation files are downloaded, you can now navigate to your site. You will see some fields where you can add your information. Enter your Database Details and Admin Information you want to use.

Flarum Installation
Flarum Installation Page

It might take a few minutes for the installation to get completed. Once everything is over, you should be redirected to the main page of the website.

If you are still having issues installing Flarum, please head over to the official installation documentation of the Flarum website.

That’s it. Enjoy your new Flarum Website!