Flarum is minimalistic, but it's also highly extensible. In fact, most of the features that ship with Flarum are actually extensions!
This approach makes Flarum extremely customizable: You can disable any features you don't need, and install other extensions to make your forum perfect for your community.
For more information on Flarum's philosophy on what features we include in core, or if you're looking to make your own extension, please see our extension documentation. This article will focus on managing extensions from a forum admin's perspective.
The extension manager is an extension that comes bundled with Flarum when installed via an archive. It provides a graphical interface for installing and updating both extensions and Flarum itself.
If you do not have the extension manager installed and you wish to install it, you can do so by running the following command in your Flarum directory:
composer require flarum/extension-manager:"*"
Flarum has a wide ecosystem of extensions, most of which are open source and free. The extension manager provides a discovery feature allowing you to search through the available extensions. The extension manager connects to flarum.org/extensions. Alternatively, you can visit the Extensions tag on Flarum's community forums.
Using the extension manager extension, you can install extensions directly from the admin dashboard. Once you have browsed the list of available extensions from the links above, and found one you want to install, you can install it by entering the extension's composer package name into the extension manager's installation input.
Just like Flarum, extensions are installed through Composer, using SSH. To install a typical extension:
cd
to your Flarum directory. This directory should contain composer.json
, flarum
files and a storage
directory (among others). You can check directory contents via ls -la
.composer require COMPOSER_PACKAGE_NAME:*
. This should be provided by the extension's documentation.Using the extension manager extension, you can update extensions directly from the admin dashboard. You can run a check for updates by clicking the "Check for updates" button in the extension manager. If there are updates available, you can update all extensions by clicking the "Global update" button. Or, you can update individual extensions by clicking the "Update" button next to the extension you want to update.
Follow the instructions provided by extension developers. If you're using *
as the version string for extensions (as is recommended), running the commands listed in the Flarum upgrade guide should update all your extensions.
Using the extension manager extension, you can uninstall extensions directly from the admin dashboard. You can uninstall an extension by clicking the "Uninstall" button next to the extension you want to uninstall inside the extension's page.
Similarly to installation, to remove an extension:
cd
to your Flarum directory.composer remove COMPOSER_PACKAGE_NAME
. This should be provided by the extension's documentation.Each individual extension page of the admin dashboard provides a convenient way to manage the extension. You can:
The extension manager uses composer
under the hood, and as such, it looks for extension packages in the same places as composer
. By default, this is Packagist. However, you can configure additional sources for the extension manager to look for extensions in. This is useful if you want to install an extension that is not available on Packagist.
In the admin page of the extension manager, clicking the Add Repository button will open a modal where you can enter the name and URL of the repository you want to add. The name is just a label for the repository, and can be anything you want. The URL should be the URL of the repository which depends on the type of repository you want to add.
If you want to add a repository from a VCS (e.g. GitHub, GitLab, BitBucket, etc), the URL should be the URL of the repository's VCS. For example, if you had a private GitHub repository at https://github.com/acme/flarum-extension
, you would enter that URL into the URL field. If it is a private source, you will need to enter an authentication method through the New authentication method button. The token can be generated from your VCS provider's website, and the host should be the domain of the VCS provider (e.g. github.com
).
Extiverse provides access to premium extensions. It is a good example of a composer repository. You would specify the URL as https://flarum.org/composer/
and the name as premium
. You would also need to enter an authentication method through the New authentication method button. The token can be generated from your Flarum account's subscriptions page with the Instructions button.
HTTP Bearer
flarum.org
If for whatever reason you want to install a non-stable extension (e.g. a beta, alpha or RC version) you must first update the Minimum stability setting to the wanted stability.