How to install Joomla 3 on a Linux VPS Server

Written by Kostas Mavrokefalos

Hosting a web site on a shared hosting environment is convinient, but doesn't give you the flexibility we sometimes need. This is a case when we need to access the server directly like changing file permissions or run a Python script on the server. In a shared host environment the user only has access to the File Manager through a cPanel (if available) and that's all. Moreover the VPS servers are relative cheaper. A quick Duck Duck Go :) search will provide you with a lot of results starting from even $5/month.

Also a VPS server is, at least in theory, faster than a Shared Hosting Environment. Generally speaking if you need total freedom you will find it difficult to stay in a Shared Host. Now that i convinced you let's go to our tutorial!

I will try to keep the process as fast as possible and try to avoid the picture approach or video. I suppose the user knows how to use the Terminal and troubleshoot any errors. The process is rather long and all i wanted is a quick guide to do this with all the small details that might appear (like permission assignment) that sometimes are forgotten or haven't been tested on the process. So for that reason i have cloned the whole process, but there is strong possibility you find small differences. I will be happy to read your comments and add/correct commands that would work more globally for a bigger variety of systems.

So the scenario is that we have just bought some VPS hosting from some online company and we want to install Joomla! on an absolutely empty linux server.

  1. In the first place we need to buy a VPS from some provider. Like i mentioned this can be really cheap and you can have some options here:

  2. Next we need to open a terminal (Ctrl+Alt+T) and type ssh USER_OF_YOUR_VPS@IP_ADRESS_OF_YOUR_VPS

  3. Install unzip: apt-get install sudo unzip

  4. We need to create the user (let's name it solomon): useradd -m -s /bin/bash solomon

    -m option will create a folder named solomon inside the home directory of your account

    -s option will define the default shell to be bash

  5. We need to change the user password (let's call it solomon): passwd solomon

  6. We need to place the user we just created into the SUDO: We type visudo and then in the edit screen under #allow members we add ALL=(ALL:ALL) ALL and SAVE

  7. Prevent the root user from login with SSH: vi /etc/ssh/sshd_config

    We need to find the command PermitRootLogin no and set it to no.

  8. Save & Exit

  9. We login again as the new user: ssh solomon@IP_ADRESS_OF_YOUR_VPS

  10. Enter password

  11. Now we need to install some usefull programmes: sudo apt-get install apache2 mysql php5

  12. We will get a window asking for the mySQL Password (Note this down because it is very important)

  13. Install some more scripts: sudo apt-get install php5-gd php5-mysql

  14. Now we are ready to install Joomla!

  15. We create the necessary directories: mkdir bin, cd bin , mkdir joomla, cd joomla

  16. Get joomla from the website: (You need to go to and copy link adress with your mouse in order to have the latest version of joomla- for me it is 3-6-5)wget

  17. cd /var/www/html

  18. sudo mkdir joomla

  19. cd joomla

  20. We unzip the filesudo unzip /home/solomon/bin/joomla/joomla_3-6-5-stable-full_package-zip

  21. cd ..

  22. Now we have to change the ownership of the folder so www-data owns it: chown www-data:www-data ./joomla/

  23. We create the database user, the database and assign the user to the database: mysql -u -root -p

  24. -u option:means user

  25. -p option:means password

  26. Now we have entered the mySQL terminal - We need to create a user and assign a password: CREATE USER 'joomla_user'@'localhost' IDENTIFIED BY 'we_define_a_password_here';

  27. We create the database:CREATE DATABASE joomla_db;

  28. GRANT ALL PRIVILEGES ON joomla_db.* TO 'joomla_user'@'localhost';

  29. exit

This is the end of the Tutorial. I am positive it contains all the necessary steps to perform the task. Implications might appear for different system Hardware Setups and different Linux Distributions, but it is unlikely. The commands are Standard Linux Network Administration Commands.

The benefit of having this task performed fast and the flexibility to have an easy to read and execute Walkthrough has been my motivation

Hope you enjoy it and i am very welcome to comments and suggestions.

Resources: The top image was downloaded from: Usefull info: