How to Install MODX Revolution on Ubuntu 20.04

In this article, we’ll explain how to install MODX Revolution on Ubuntu 20.04 with LAMP.

MODX offers the best qualities of content management systems, web development frameworks, and cloud hosting with less complexity, limitations, and bloat. It’s the Content Management Framework built to help you deliver any digital experience faster, your way, and with improved SEO, security, and speed.

Prerequisites

  • An Ubuntu 20.04 installed dedicated server or KVM VPS.
  • A root user access or normal user with administrative privileges.

Install MODX Revolution on Ubuntu 20.04 with LAMP

1. Keep the server updated

Update the package repository index, and upgrade the installed packages.

# apt update && sudo apt -y upgrade

2. Install Apache webserver

# apt install apache2 -y

In case, you enabled firewall and firewall block requests of the apache web server, open a port in the firewall.

# ufw allow 80/tcp

# ufw allow 443/tcp

# ufw reload

Start and enable apache2 service.

# systemctl start apache2 && systemctl enable apache2

3. Install PHP

Here we are installing the default PHP version 7.4 and other modules for web deployments using the following command:

# apt install php libapache2-mod-php php-gd php-mbstring php-common php-mysql php-imagick php-xml -y

4. Install MariaDB

# apt install mariadb-server mariadb-client -y

The default configuration of the MariaDB will not be secured. Let’s secured the installation using the following command:

# mysql_secure_installation

Once the script gets executed, it will ask multiple questions.

It will ask you to enter the current password for root (enter for none):

Then enter yes/y to the following security questions:

Set a root password? [Y/n]: y
Remove anonymous users? : y
Disallow root login remotely? : y
Remove test database and access to it? : y
Reload privilege tables now? : y

Login in to mysql

# mysql -u root -p

Run the following queries to create a MySQL database and database user for MODX Revolution.

CREATE DATABASE modx_data CHARACTER SET utf8 COLLATE utf8_general_ci;a
CREATE USER ‘modx_user’@’localhost’ IDENTIFIED BY ‘UltraSecurePassword’;
GRANT ALL PRIVILEGES ON modx_data.* TO ‘modx_user’@’localhost’;
FLUSH PRIVILEGES;
EXIT;

Note: Replace the database name modx_data and username modx_user with something more to your liking. Replace “UltraSecurePassword” with an actual, secure password.

Install MODX Revolution Files

Change your current working directory to the default web directory.

# cd /var/www/html/

Now use wget to download the MODX Revolution installation zip package.

# wget https://modx.com/download/direct?id=modx-2.8.3-pl.zip

You should definitely check for the most recent version by visiting the MODX Revolution download page.

Give the package a simpler name.

# mv direct?id=modx-2.8.3-pl.zip modx.zip

Now extract the zip package.

# unzip modx.zip

Move all of the installation files to the web root directory.

# mv modx-2.8.3-pl/* /var/www/html

Change ownership of the web files to avoid any permissions problems.

# chown -R www-data:www-data *

Restart Apache again.

# systemctl restart apache2

Now we’re ready to move on to the final step.

5. Setup MODX Revolution Installation

To access the MODX revolution installation page, enter your server IP address, followed by /setup into your browser address bar.

http://YOUR_VULTR_IP_ADDRESS/setup

Click the “Next” button to continue the installation.

Select New Installation and leave the folder permissions at their default values. Click “Next” when you are ready to move on to the next step.

Set the following database options.

Database type: mysql
Database host: localhost
Database login name: modx_user (or your previously selected name)
Database password: UltraSecurePassword (or your previously chosen password)
Database name: modx_data (or your previously selected name)
Table prefix: modx_

Once you have entered the above database options, click on the link below to Test database server connection and view collations. You will see a message that says: Connecting to database server: Success!. If you get any errors, go back and ensure that all database options are correct.

You can leave the character set and collation options at their default values. They should look like this.

Connection character set: utf8
Collation: utf8_general_ci

When you are satisfied with your selected installation options, you can click on the link below to Create or test selection of your database.

You will be prompted to enter your admin details, which will be used to login to the CMS. Fill them in as shown below and click Next.

Administrator name:
Administrator email:
Administrator password: Confirm password:

 

You will see an Installation Summary. As long as everything looks okay, you can simply click Install to Install MODX Revolution to your server instance.

You will see a confirmation page that says Core installation was successful. Simply click Next to continue.

You can now login to your MODX Revolution admin panel using the login details you entered earlier during installation.

That’s it. The installation and setup has been completed successfully.

In this article, we’ve seen how to install MODX Revolution on Ubuntu 20.04 with LAMP.

Ubuntu Server Admin

Recent Posts

A year of documentation-driven development

For many software teams, documentation is written after features are built and design decisions have…

9 hours ago

Announcing FIPS 140-3 for Ubuntu Core22

With the release of the FIPS 140-3 certified cryptographic modules for Ubuntu 22.04 LTS, Canonical…

1 day ago

The foundations of software: open source libraries and their maintainers

Open source libraries are repositories of code that developers can use and, depending on the…

4 days ago

From inspiration to impact: design students from Regent’s University London explore open design for their dissertation projects

Last year, we had the opportunity to speak at Regent’s UX Conference (Regent’s University London’s…

5 days ago

When an upstream change broke smartcard FIPS authentication – and how we fixed it

A government agency mandated smartcard authentication across their Ubuntu fleet. When they enabled FIPS mode…

6 days ago

Open platforms, edge AI, and sovereign telco clouds: Ecrio & Canonical at MWC Barcelona

Building telco clouds with open source At MWC Barcelona 2026, Canonical is demonstrating how telecommunications…

6 days ago