How to install Composer and PyroCMS on your DirectAdmin VPS at KnownHost


New Member
Hi All -

I wanted to share the steps to install Composer and PyroCMS on your DirectAdmin VPS here at KnownHost.

Full disclosure: I consider myself a 'webhack'. I search for answers, try stuff and check to see if they work. If they don't, I start over. The steps here are a blend of the instructions I found on the links found at the bottom of this post.

You'll need SSH root and account-level access to complete these steps.

And finally - the fine folks at KnownHost may very well complete the installation for you. It's just that I have a curious mind and enjoy the feeling of accomplishment I get from doing stuff myself.

Here we go:

1. Login to your VPS via SSH as root
ssh root@my_server
2. Install Composer - (the following method will allow Composer to be accessible from all accounts/users). Move composer.phar file to bin

curl -sS | php
mv composer.phar /usr/local/bin/composer
3. Delete default files created by DirectAdmin:
rm -rf /home/<<USERNAME>>/domains/<<DOMAIN_NAME>>/public_html/*
4. Logout of SSH as root. Log back in as User - (in order to assign ownership correctly. Or 'chown', if you wanna...)
- cd to public_html directory (which should be empty)

5. Run PyroCMS install via Composer:
composer create-project pyrocms/pyrocms
6. Modify the httpd.conf
- Login to your DirectAdmin control panel as Admin
- under "Server Manager", choose "Custom HTTPD Configuration"
- the domain list loads. Choose httpd.conf on the appropriate row
- Domain configuration page loads. Click "Customize"
- in the httpd.conf customization textarea:

7. At this point, you should be able to visit your site in a browser and be redirected to PyroCMS's install wizard.

8. After running PyroCMS's install wizard, FTP into account and edit composer.json file:
- remove "anomaly/installer-module" line
- save

9. Run:
composer update
after removing line in step 8.

Annnnnd...... that should be it! Hope this helps!

How to install Laravel and Composer on a DirectAdmin VPS:
How to install PyroCMS:
Adding custom httpd.conf: