Objective

The objective is to install Joomla 4 on Ubuntu 18.04 Bionic Beaver Linux

Operating System and Software Versions

  • Operating System: - Ubuntu 18.04 Bionic Beaver
  • Software: - Joomla! 4.0.0-alpha2 Development

Requirements

Privileged access to your Ubuntu System as root or via sudo command is required.

Difficulty

EASY

Conventions

  • # - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
  • $ - requires given linux commands to be executed as a regular non-privileged user

Instructions

Prerequsites

Let's start by installing prerequisites. For the Joomla 4 installation we will need the curl and tasksel commands. The following linux command will install both:
$ sudo apt install -y wget tasksel
This guide will use the Ubuntu LAMP stack ( Linux, Apache, MySQL, PHP) to run under the Joomla 4 installation.

If you wish to run Joomla 4 using Nginx webserver then follow our guide on How To Install Nginx, MariaDB, PHP (LEMP stack) on Ubuntu 18.04.

Next, install the Ubuntu LAMP stack using the tasksel command and enable the rewrite mode:
$ sudo tasksel install lamp-server
$ sudo a2enmod rewrite
Furthermore, install the additional PHP module Joomla 4 requirements:
$ sudo apt install -y php-xml php-zip
Failing to install the php-xml package will result in Error displaying the error page.

As recommended by Joomla 4 installer disable PHP output_buffering. Use the bellow command to provide you with some hints on how to locate the appropriate php.ini file for your web-server installation:
$ php -i | grep php.ini$ | cut -d '>' -f2 | sed 's/cli/apache2/'
Next, the following linux command will disable output_buffering for the PHP version 7.2. Change your PHP version on the bellow command when appropriate, alternatively :
$ sudo sed -i 's/^output_buffering/\; output_buffering/' /etc/php/7.2/apache2/php.ini
To apply the changes restart your Apache web server:
$ sudo systemctl restart apache2
We are now ready to download Joomla 4 installation package.

SUBSCRIBE TO NEWSLETTER
Subscribe to Linux Career NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials.


Download Joomla 4

At this stage we are ready to download and decompress the Joomla 4 tarball into webserver's root directory. Start by downloading the latest Joomla 4 package and save it into your /tmp directory using your web browser.

Alternatively, the bellow command is using wget to download Joomla 4 tarball version 4.0.0 Alpha 2:
$ wget -O /tmp/4.0.0-alpha2.tar.gz https://github.com/joomla/joomla-cms/archive/4.0.0-alpha2.tar.gz
Next, install Joomla 4 files into Webserver's root directory /var/www/html and change the file ownership to www-data. Change your downloaded Joomla 4 version number where appropriate:
$ sudo rm -fr /var/www/html
$ sudo tar xf /tmp/4.0.0-alpha2.tar.gz -C /var/www/
$ sudo mv /var/www/joomla-cms-4.0.0-alpha2/ /var/www/html
$ sudo chown -R www-data.www-data /var/www/html
All set, we are now ready to configure a database for the Joomla 4 installation.

Configure Database

In this section we will create a new MySQL database joomla4 and assign a user access to it to a new user admin with password pass:
$ sudo mysqladmin create joomla4
$ sudo mysql -e "CREATE USER 'admin'@'%' IDENTIFIED BY 'pass';"
$ sudo mysql -e "GRANT ALL PRIVILEGES ON joomla4.* TO 'admin'@'%' WITH GRANT OPTION;"
For more configuration options regarding the MySQL database installation visit our page: Install MySQL on Ubuntu 18.04.

Install Joomla 4 on Ubuntu

We are now ready to install Joomla 4.

Given that your Joomla 4 server can be resolved via joomla4-ubuntu host name, open up your browser and navigate to URL http://joomla4-ubuntu to access the Joomla 4 installation wizard:
Install Joomla 4 on Ubuntu 18.04 - Site Name
Select your language and enter your site name.
Install Joomla 4 on Ubuntu 18.04 - Administrator account username password
Insert username and password for your Joomla 4 administration account.


Install Joomla 4 on Ubuntu 18.04 - databases configuration credentials
Set the databases configuration credentials as created previously.
Install Joomla 4 on Ubuntu 18.04 - sample data
Hit Customise installation if you wish to install other languages and sample data.
Install Joomla 4 on Ubuntu 18.04 - languages
Select other languages to install and click on Next or hit Skip to install Sample Data.
Install Joomla 4 on Ubuntu 18.04 - Optionally install Sample Data
Optionally install Sample Data. This is recommended if you are new to Joomla or need just to review the Joomla 4 CMS


Install Joomla 4 on Ubuntu 18.04 - Delete installation folder
Tick Check if you wish to delete the installation folder on complete to remove the installation folder from the /var/www/html/ directory.

Click on Open Site to visit the Joomla 4 front page or hit Open Admin to visit the Joomla 4 administration back-end.
Install Joomla 4 on Ubuntu 18.04 - Joomla 4 front page
Joomla 4 front page.
Install Joomla 4 on Ubuntu 18.04 - admin login
Login to Joomla 4 administration back-end accesses via the http://joomla4-ubuntu/administartion URL.

Use your administrator credentials created during the Joomla 4 installation.
Install Joomla 4 on Ubuntu 18.04 - Joomla 4 administration interface
Joomla 4 administration interface
Install Joomla 4 on Ubuntu 18.04 - Joomla 4 system information page
Joomla 4 system information page
ARE YOU LOOKING FOR A LINUX JOB?
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed on LinuxCareers.com.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.