Install Fork CMS on a Debian VPS

forkIn this tutorial we’ll see how to install Fork CMS on a Debian 7 (Wheezy) VPS with MySQL, PHP-FPM and Nginx
Fork CMS is an open-source Content Management System written in PHP and comes with modules, themes, multi-language support, search engine optimisation and many more. Fork CMS is dedicated to creating a user friendly environment to build, monitor and update your website.


Install MySQL and create a database.

apt-get update
apt-get upgrade
apt-get install mysql-server mysql-client
mysql -uroot -p

Install Nginx and PHP-FPM

apt-get install nginx php5-fpm php-cli php5-mysql php5-gd php5-mcrypt

Install Composer and Git

apt-get install git
curl -sS | php
mv composer.phar /usr/local/bin/composer

Create a root directory for your web site and clone the git repository from github

mkdir -p /var/www/{public_html,logs}
git clone /var/www/

Install the dependencies and set the correct permissions

cd var/www/
composer install -o
chown -R www-data: /var/www/

Nginx configuration.
Create a new Nginx server block with the following content

# /etc/nginx/sites-available/
server {
  listen 80;
  root /var/www/;
  access_log /var/www/;
  error_log /var/www/;
  index index.php;

  location ~ ^/(backend|install|api(\/\d.\d)?(\/client)?).*\.php$ {
    try_files $uri $uri/ /index.php?$args;

  location / {
    try_files $uri /index.php?$args;

  location ~* \.(jpg|jpeg|gif|css|png|js|ico|html)$ {
    access_log off;
    expires max;
  location ~ /\.ht {
    deny  all;
  location ~ \.php {
    fastcgi_index index.php;
    fastcgi_split_path_info ^(.+\.php)(.*)$;
    include /etc/nginx/fastcgi_params;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

Symlink it and restart the server

ln -s /etc/nginx/sites-available/ /etc/nginx/sites-enabled/
/etc/init.d/nginx restart

Fork CMS installation

Open a browser pointing to your Fork CMS installation, and follow the on-screen instructions to complete the process.

Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert linux admins to install this for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

Leave a Comment

To prove you are human please solve the following *