Install Symphony CMS on an Ubuntu VPS

install-symphony-cms-on-an-ubuntu-vpsIn this tutorial, we will explain how to install Symphony CMS on an Ubuntu 14.04 VPS with MariaDB, PHP-FPM and Nginx. Symphony CMS is a XSLT-powered open source content management system which enables users to create and manage websites and web applications. This guide should work on other Linux VPS systems as well but was tested and written for an Ubuntu 14.04 VPS.

Login to your VPS via SSH

ssh user@vps

Update the system and install necessary packages

[user]$ sudo apt-get update && sudo apt-get -y upgrade
[user]$ sudo apt-get install software-properties-common git

Install MariaDB 10.0

[user]$ sudo apt-key adv --recv-keys --keyserver hkp:// 0xcbcb082a1bb943db
[user]$ sudo add-apt-repository 'deb trusty main'
[user]$ sudo apt-get install mariadb-server

When the installation is complete, run the following command to secure your installation:

[user]$ mysql_secure_installation

Next, we need to create a database for our Symphony installation.

[user]$ mysql -uroot -p
MariaDB [(none)]> CREATE DATABASE symphony;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON symphony.* TO 'symphonyuser'@'localhost' IDENTIFIED BY 'symphonyuser_passwd';
MariaDB [(none)]> \q

Install PHP-FPM and Nginx

Installing PHP and Nginx is pretty easy, just run the following command:

[user]$ sudo apt-get install nginx php5-fpm php5-cli php5-xsl php5-xmlrpc php5-gd php5-mysqlnd

Clone the Symphony CMS git repository

Create a root directory for your web site and clone the git repository from github using the following commands:

[user]$ mkdir -p ~/{public_html,logs}
[user]$ git clone git:// ~/

If you want to add the optional extensions run:

[user]$ cd ~/
[user]$ git checkout --track origin/bundle
[user]$ git submodule update --init --recursive

PHP-FPM configuration

Create a new PHP-FPM pool for your user:

[user]$ cat << EOF | sudo tee /etc/php5/fpm/pool.d/$(whoami).conf
user = $(whoami)  
group = $(whoami)  
listen = /var/run/php5-fpm-$(whoami).sock  
listen.owner = $(whoami) = $(whoami)  
listen.mode = 0666  
pm = ondemand  
pm.max_children = 5  
pm.process_idle_timeout = 10s;  
pm.max_requests = 200  
chdir = /

Restart PHP-FPM:

[user]$ sudo service php5-fpm restart

Nginx configuration

Create a new Nginx server block with the following content:

[user]$ cat << EOF | sudo tee /etc/nginx/sites-available/
server {
    listen 80;
    root $HOME/;
    access_log $HOME/;
    error_log $HOME/;
    index index.php;

    location / {
        rewrite ^(.*[^/])\$ \$1/ permanent;
        if (!-d $request_filename) {
            rewrite ^/(.*)\$ /index.php?symphony-page=\$1 last;

    location ~ ^/symphony(/?.*)\$ {
        if (!-f \$request_filename) {
            rewrite ^/symphony/?\$ /index.php?mode=administration&\$query_string last;
            rewrite ^/symphony(/(.*/?))?\$ /index.php?symphony-page=\$1&mode=administration&\$query_string last;
    location ~ ^/image/(.*)\$ {
        try_files \$uri \$uri/ /extensions/jit_image_manipulation/lib/image.php?param=\$1;

    location ~* \.(?:ico|css|js|gif|jpe?g|png|ttf|woff)\$ {
        access_log off;
        expires 30d;
        add_header Pragma public;
        add_header Cache-Control "public, mustrevalidate, proxy-revalidate";
    location ~ \.php\$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)\$;
        fastcgi_pass unix:/var/run/php5-fpm-$(whoami).sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
        fastcgi_intercept_errors off;
        fastcgi_buffer_size 16k;
        fastcgi_buffers 4 16k;
    location ~ /\.ht {
        deny all;
    location ~ /\.git {
        deny  all;

    location ~ ^/manifest/(.*)\$ {
        return 403;

    location ~ ^/workspace/utilities/(.*).xsl\$ {
        return 403;

    location ~ ^/workspace/pages/(.*).xsl\$ {
        return 403;

    location ~ ^/(.*).sql\$ {
        return 403;

    location ~ (^|/)\. {
        return 403;


Activate the server block by creating a symbolic link :

[user]$ sudo ln -s /etc/nginx/sites-available/ /etc/nginx/sites-enabled/

Test the Nginx configuration and restart nginx:

[user]$ sudo nginx -t
[user]$ sudo service nginx restart

Final steps

Open in your favorite web browser and you should see the Symphony install screen. Provide the database and user information and click on the “Install Symphony” button.

After the installation is complete, do not forget to remove the installer files:

[user]$ rm -rf ~/ ~/

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 setup 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.

How to install WooCommerce plugin on an Ubuntu 16.04 VPS
How to install Nginx and set-up SSL certificate on an Ubuntu 14.04 VPS
How to install LAMP (Linux Apache, MariaDB & PHP) on CentOS 7