How to Install Joomla on an Ubuntu 18.04 VPS or Dedicated Server

How to Install Joomla on an Ubuntu 18.04 VPS or Dedicated Server

Joomla is the second most widely used Content Management System (CMS) besides WordPress. The open-source software is programmed in PHP using Object Oriented techniques that make it easy to maintain.

Joomla stores its data in MySQL or MariaDB, and it is used by millions of programmers worldwide to create mobile-ready and user-friendly websites. It has thousands of features and designs, and these make it a good bet for building professional sites.

In this article, we will show you how to install Joomla on your Ubuntu 18.04 Virtual Private Server (VPS).

Prerequisites

  • A non-root user with sudo privileges
  • A VPS or dedicated server hosting plan

Special note: use HostAdvice’s VPS hosting reviews and dedicated hosting reviews to get the best service at the best prices.

Step 1: Install Apache

First, update the index on the Ubuntu repository:

$ sudo apt-get update

Then, install Apache using the command below

$ sudo apt-get install apache2

Step 2: Install MySQL

Joomla stores data in a MySQL database. So you need to install MySQL server  as well:

$ sudo apt-get install mysql-server

You should enter a strong password for the root user when prompted to do so.

Since the default MySQL installation is not secure, run the command below to remove anonymous users and test databases:

$ sudo mysql_secure_installation

Press Y or N and hit Enter as indicated below when prompted  to answer the questions that follow:

  • Setup VALIDATE PASSWORD plugin? [Y/N] N
  • Change root password? [Y/N] N
  • Remove anonymous users? [Y/N] Y
  • Disallow root login remotely? [Y/N] Y
  • Remove test database and access to it? [Y/N] Y
  • Reload privilege tables now? [Y/N] Y

We now need to create a database where Joomla will store data:

First, log in on the MySQL Command Line Interface(CLI) using the commands below:

$ sudo mysql -u root -p

Enter your root password and hit Enter.

Next create the database, user and assign the right privileges using the commands below:

mysql>CREATE DATABASE joomla;
mysql>GRANT ALL PRIVILEGES on joomla.* to 'joomla_user'@'localhost' identified by 'PASSWORD';
mysql>FLUSH PRIVILEGES;
mysql>QUIT;

Remember to replace ‘joomla_user’ with your preferred value. Also, you should set a strong password for the user.

Step 3: Install PHP

Joomla is written in PHP – a server side general purpose scripting language.  So, you need to install PHP as well together with associated modules tailored for Apache web server using the commands below:

$ sudo apt-get install php libapache2-mod-php
$ sudo apt-get install php-cli php-common php-mbstring php-gd php-intl php-xml php-mysql php-zip php-curl php-xmlrpc

Press Y and hit Enter when prompted to confirm the installation

Step 4: Install Joomla

Since the download will be a zip archive, you should begin by installing the unzip tool.

$ sudo apt-get install unzip

Next, cd to the ‘/tmp’ directory and download the latest version of Joomla from the official website.

$ cd /tmp
$ wget https://downloads.joomla.org/cms/joomla3/3-8-10/Joomla_3-8-10-Stable-Full_Package.zip

Joomla will be downloaded and stored under the archive file ‘Joomla_3-8-10-Stable-Full_Package.zip’

We need to unzip this file and copy it to the root of our website probably under a directory name like ‘joomla’.  You can use any name for this.

So first, we make the directory

$ sudo mkdir /var/www/html/joomla

Unzip the file

$ sudo unzip Joomla_3-8-10-Stable-Full_Package.zip  -d /var/www/html/joomla

Step 5: Configure Joomla and Assign the Right File Permissions

The default Joomla installation comes with a ‘htaccess.txt’ which we should copy to create a ‘.htaccess’ file. Use the commands below to do this:

$ sudo cp /var/www/html/joomla/htaccess.txt /var/www/html/joomla/.htaccess

In order for Apache to be able to access Joomla files, we need to set the right file permissions using the commands below:

$ sudo chown -R www-data.www-data /var/www/html/joomla
$ sudo chmod -R 755 /var/www/html/joomla

Restart Apache for all PHP settings to take place

$ sudo systemctl restart apache2

Step 6: Finalize Joomla Installation via a browser

Next navigate to the URL ‘http://example.com/joomla’ on your browser. Remember to replace ‘example.com’ with your domain name or public IP address of your server

http://example.com/joomla

Then enter your site name, description , email address and password that you want to create for the administrator.

Then, click ‘Next’ on the bottom right to proceed.

On the page that follows, enter the database details that you created above and click ‘Next’ to proceed

Then click ‘Install’ on the next screen.

The setup wizard will finalize the installation and you will get a congratulations message:

Click on the ‘Remove Installation Folder’.

Step 7: Test the Installation

Navigate to the URL ‘http://example.com/joomla’ and remember to replace ‘example.com’ with your domain name or public IP address. If the installation was completed successfully, you should see the home page.

http://example.com/joomla

Conclusion

We have accomplished installing Joomla on Ubuntu 18.04 server. You can now start posting content or probably install a new theme to make your website look more professionals. Joomla is a great content management application that you can utilize to create beautiful websites. if you have followed this guide step-by-step, your Joomla site should be up and running.

Check out these top 3 Joomla hosting services:

Hostinger
AU$4.46 /mo
Starting price
Visit Hostinger
Rating based on expert review
  • User Friendly
    4.7
  • Support
    4.7
  • Features
    4.8
  • Reliability
    4.8
  • Pricing
    4.7
FastComet
AU$2.67 /mo
Starting price
Visit FastComet
Rating based on expert review
  • User Friendly
    4.7
  • Support
    5.0
  • Features
    4.8
  • Reliability
    4.5
  • Pricing
    5.0
Kamatera
AU$5.96 /mo
Starting price
Visit Kamatera
Rating based on expert review
  • User Friendly
    3.5
  • Support
    3.0
  • Features
    3.9
  • Reliability
    4.0
  • Pricing
    4.3

How to Install Own Cloud On an an Ubuntu 18.04 Dedicated Server or VPS

You can create your own self-hosted cloud storage services by installing the ope
less than a minute
Idan Cohen
Idan Cohen
Marketing Expert

How to Install a Let’s Encrypt Certificate on your Ubuntu 18.04 Dedicated Server or VPS

If you are hosting your website on a VPS server running Ubuntu 18.04, we will sh
less than a minute
Michael Levanduski
Michael Levanduski
Expert Hosting Writer & Tester

How to Install WordPress on Your Ubuntu 22.04 VPS or Dedicated Server

This tutorial will show you how to install WordPress on your Ubuntu 22.04 virtua
less than a minute
Idan Cohen
Idan Cohen
Marketing Expert

How to Install "Drush" for Drupal on a CentOS 7 Server

This tutorial will show you how to install Drush, a command line shell and scrip
less than a minute
Idan Cohen
Idan Cohen
Marketing Expert
HostAdvice.com provides professional web hosting reviews fully independent of any other entity. Our reviews are unbiased, honest, and apply the same evaluation standards to all those reviewed. While monetary compensation is received from a few of the companies listed on this site, compensation of services and products have no influence on the direction or conclusions of our reviews. Nor does the compensation influence our rankings for certain host companies. This compensation covers account purchasing costs, testing costs and royalties paid to reviewers.
Click to go to the top of the page
Go To Top