Hey everyone,
I'd like to point out that PHP 7.4 will no longer receive any patches to fix security vulnerabilities. So, if you're still running 7.4 on your hosting environments, make sure to upgrade to at least PHP 8.0 as soon as possible!
Yes, this is important, servers running on vulnerable PHP versions can be hacked, websites defaced and information stolen.
Are there any steps required to upgrade Flarum you ask? Well, the process is fairly simple:
- Upgrade the PHP version of your commandline/cli, make sure it is the version you intend to run the website as. Use
php -v
to confirm, some hosting environments have PHP binaries for each version, for instance: php80 -v
and php81 -v
.
- Upgrade the PHP version the website runs as, most webhosting control panels (nowadays) allow you to configure the PHP version for each website independently. If not you'll need to make sure all other websites you host are PHP 8 compatible.
- Run the following command in the Flarum document root (where the files
flarum
and composer.json
live): composer update --prefer-dist --no-dev -a
or in case you need to use a different php binary: php81 composer update --prefer-dist --no-dev -a
. You should notice some changes in packages being installed.
- Open your Flarum site and everything should be AOK.
In case you see any deprecated warnings, make sure the php.ini
for the PHP version you installed uses the recommended error_reporting
value for production:
; error_reporting
; Default Value: E_ALL
; Development Value: E_ALL
; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT