Instalación
No dude en probar Flarum en uno de nuestros foros de demostración. O bien, configure su propio foro en segundos en Free Flarum, un servicio comunitario gratuito no afiliado al equipo de Flarum.
Requisitos del Servidor
Antes de instalar Flarum, es importante comprobar que tu servidor cumple los requisitos. Para ejecutar Flarum, necesitarás:
- Apache (con mod_rewrite activado) o Nginx.
- PHP 7.3+ with the following extensions: curl, dom, fileinfo, gd, json, mbstring, openssl, pdo_mysql, tokenizer, zip
- MySQL 5.6+ o MariaDB 10.0.5+
- SSH (command-line) access to run potentially necessary software maintenance commands, and Composer if you intend on using the command-line to install and manage Flarum extensions.
PHP Configuration
Flarum 1.x runs on PHP up to and including 8.5, but it is built on an older framework stack. On modern PHP, some of its dependencies emit deprecation notices. This is expected and does not affect how Flarum works.
Every PHP version that currently receives official support — 8.2, 8.3, 8.4 and 8.5 — is affected. In other words, if you are running Flarum 1.x on a PHP version that is still maintained (as you should be), you will encounter these notices, so the configuration below should be treated as a standard part of setting up Flarum 1.x.
Configure PHP to exclude deprecation warnings so they don't fill your logs or leak into responses:
error_reporting = E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED
On a typical production server display_errors is already off, so the notices are not shown to visitors — but they can still be written to your error log on every request, which the setting above prevents.
In practice we see the best results running Flarum 1.x on PHP 8.3, which at the time of writing still receives security support. If you have the choice, it is a good balance of stability and remaining support life for a 1.x install.
These notices come from the older framework that Flarum 1.x is built on. That framework has itself reached end of life, so keeping 1.x running cleanly and securely on modern PHP takes progressively more effort over time.
Flarum 1.x is officially on life support while we finalize the 2.0 release. Going forward, the 1.x line will receive critical and security fixes only — no new features — and that support will wind down over time. We encourage all Flarum 1.x installations to plan an upgrade to Flarum 2.x, which is built on a current, supported framework and does not produce these deprecations.
Flarum 2.0 is in its release-candidate phase — the API is stable and many forums already run it in production — and a stable release is not far off. See the Flarum 2.x documentation to get started.
Instalando
Installing by unpacking an archive
If you don't have SSH access to your server or you prefer not to use the command line, you can install Flarum by unpacking an archive. Below is a list of the available archives, make sure you choose the one that matches your PHP version and public path or lack thereof preference.
Installing using the Command Line Interface
Flarum utiliza Composer para gestionar sus dependencias y extensiones. Antes de instalar Flarum, necesitarás instalar Composer en tu máquina. Después, ejecuta este comando en una ubicación vacía en la que quieras que se instale Flarum:
composer create-project flarum/flarum:^1.8.0 .
Mientras se ejecuta este comando, puede configurar su servidor web. Tendrás que asegurarte de que tu webroot está configurado en /ruta/para/su/foro/public, y configurar el URL Rewriting según las instrucciones siguientes.
Cuando todo esté listo, navega a tu foro en un navegador web y sigue las instrucciones para completar la instalación.
If you wish to install and update extensions from the admin dashboard, you need to also install the Extension Manager extension.
composer require flarum/extension-manager:"*"
The extension manager allows an admin user to install any composer package. Only install the extension manager if you trust all of your forum admins with such permissions.
URL Rewriting
Apache
Flarum incluye un archivo .htaccess en el directorio public - asegúrese de que ha sido descargado correctamente. Flarum no funcionará correctamente si mod_rewrite no está habilitado o .htaccess no está permitido. Asegúrate de comprobar con tu proveedor de hosting (o tu VPS) que estas características están habilitadas. Si gestionas tu propio servidor, puede que tengas que añadir lo siguiente a la configuración de tu sitio para habilitar los archivos .htaccess:
<Directory "/ruta/para/flarum/public">
AllowOverride All
</Directory>
Esto asegura que las sobreescrituras de htaccess están permitidas para que Flarum pueda reescribir las URLs correctamente.
Los métodos para habilitar mod_rewrite varían dependiendo de su sistema operativo. Puedes activarlo ejecutando sudo a2enmod rewrite en Ubuntu. En CentOS está activado por defecto. No te olvides de reiniciar Apache después de hacer las modificaciones.