How to install Joomla 3 on a Linux VPS Server


Hosting a web site on a shared hosting environment is convenient, but it doesn’t offer you the flexibility we sometimes need. This is a case when we need to access the server directly, to change 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 relatively cheaper. A quick Duck Duck Go 🙂 search will provide you with a lot of results starting from only $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 quick as possible and avoid approaching it with photos or videos. I suppose the user knows how to use the Terminal and troubleshoot any errors. The process is rather long and my goal is to create a quick guide, with all the small details that might occur (like permission assignment) and that are forgotten sometimes or haven’t been tested on the process. Thus, I have cloned the whole process, but there is a strong possibility you might find some 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. Firstly, 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_configWe 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 useful programmes: sudo apt-get install apache2 mysql php5
    12. We will see 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 main motivation.

Hope you enjoy it and please feel free to comment and suggest!

The top image was downloaded from:
Usefull info:

Leave a Comment

Solomon Designs team is passionate about WordPress. We build clean and responsive, fully featured and mobile-first orientated websites.
We combine our technical, creative and digital marketing expertise to bring you outstanding custom WordPress development services.
We take our work seriously and are continually expanding our knowledge and skills to better understand the business and web audience.
Your website is an investment in your business’s future and Solomon Designs team gives this the attention it deserves.