How to install Joomla! on Ubuntu 18.04

Joomla! is a very popular content management system that, like Grav, is written in PHP. This is the second most popular CMS after WordPress and as of 2017, about 3.3% of the world’s sites on the Internet platform use Joomla!

Install Apache

Update your storage list

apt-get update

Install web-server Apache

apt-get install apache2

Install MySQL

Joomla! runs on top of the LAMP stack. We will need to install MySQL and link it to PHP

apt-get install mysql-server php7.0-mysql

You will be prompted for a MySQL password. Enter it and then continue.

Complete the MySQL installation by running command:

/usr/bin/mysql_secure_installation

Next, you will be prompted for a password, enter the MySQL password you just created. Continue the installation process

Would you like to setup VALIDATE PASSWORD plugin? [Y/N] N
Change the 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

Install PHP

Joomla!requires PHP, to install please enter the folowwing command:

apt-get install php7.0 libapache2-mod-php7.0 php7.0-mcrypt php7.0-xml php7.0-curl php7.0-json php7.0-cgi 

Confirmation of LAMP Installation

To confirm that the LAMP installation was successful, open a web browser and go to the IP address of your server. You should see the Apache2 Ubuntu Default Page page. To confirm that PHP was successfully installed, please delete the default page

rm /var/www/html/index.html

Then create a new file

touch /var/www/html/index.php

Edit this:

nano /var/www/html/index.php

Then enter a sample PHP code, for example:

<?php
phpinfo();
?>

Go to your server in the browser. You should see a page with information about your PHP installation confirming that PHP was installed successfully.

After this, now remove index.php file

rm /var/www/html/index.php

Install Joomla! files

After successfully installing the LAMP stack, you can proceed with the installation of Joomla!. Go to the root of the Apache web server and download Joomla!.

cd /var/www/html
wget https://downloads.joomla.org/cms/joomla3/3-7-5/Joomla_3-7.5-Stable-Full_Package.zip

Install unzip, then to be able to unzip the downloaded archive

apt-get install unzip

Unzip the downloaded Joomla!archive

unzip Joomla_3-7.5-Stable-Full_Package.zip

Activate the .htaccess file by renaming it

mv htaccess.txt .htaccess

After activating the .htaccess file, you can set the appropriate permissions for the files

chown -R www-data.www-data /var/www/html
chmod -R 755 /var/www/html

Creation of Joomla! MySQL database

Before proceeding with the installation, you will need a MySQL database for Joomla!. Log in to the MySQL console

mysql -u root -p

Next, enter the root password created in step 2 to continue. After entering the MySQL console, create a new database for Joomla!

mysql>CREATE DATABASE joomla;

Next, you need to create a new user and grant him Joomla privileges! database. You can replace username and password with the username and password of your choice

mysql>GRANT ALL PRIVILEGES on joomla.* to 'username'@'localhost' identified by 'password';
mysql>FLUSH PRIVILEGES

Exit the MySQL console.

mysql>exit

Install Joomla!

Restart the Apache web-server

systemctl restart apache2

Open a browser and browse to the IP address of your server. You will see Joomla! web interface. Continue the installation process. In the “Database Configuration” section, you must enter the username, password and MySQL database. The username and password must be taken above where you created it in the section “Creation of Joomla! MySQL database

Database Type: MySQLi
Host Name: localhost
Username: username
Password: password
Database Name: joomla
Table Prefix: joomla_
Old Database Process: Remove

After entering the data, click “Next” and continue the installation process. Your Joomla! Installation completed!

Was this article helpful?

Related Articles

Leave A Comment?