Hello All,
I just installed Flarum on an account that is hosted on NameCheap's shared hosting. I wanted to document these steps for others (and for myself in the future)
Preparation
SSH
Firstly, as Flarum's installation instructions state, you'll need to have SSH access. Follow NameCheap's knowledgebase article to obtain remote SSH access.
PHP
By default, NameCheap provides an older version of PHP that is incompatible with Flarum. From CPanel, click on "Select PHP Version" and choose version 5.6. While you're there, ensure the "fileinfo" module is enabled.
Composer
If you are following Flarum's installation instructions, and enter the following command: composer create-project flarum/flarum . --stability=beta
, it will immediately return without any output.
In fact, if you run composer --help
or composer --version
, you will get no response.
The trick (at least on NameCheap), is you need to run the command as follows:
php -d suhosin.executor.include.whitelist=phar -d memory_limit=1024M $(which composer) create-project flarum/flarum . --stability=beta
This introduces the following options:
suhosin.executor.include.whitelist=phar
-- I'm no PHP expert, but from what I can tell, composer
requires the phar
module to be excluded from PHP security
-d memory_limit=1024M
-- The default memory limit was less than 200M and composer requires much more than that amount
Permissions
Make sure you change the permissions to non-writable by the group and the world using the following commands:
find -type f | xargs chmod -v 644
find -type d | xargs chmod -v 755
That's as far as I've progressed, but I'll continue to update this post as I continue through the installation / configuration process