How to Install MODX Revolution on Ubuntu 20.04

How to Install MODX Revolution on Ubuntu 20.04 HostnExtra

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.

  • 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

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

# apt update && sudo apt -y upgrade

# 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

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

# 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’;

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

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\

Now extract the zip package.

# unzip

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.

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


install MODX Revolution
install MODX Revolution

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: <your_prefered_admin_name>
Administrator email: <your_admin_email>
Administrator password: <a_secure_password
Confirm password: <the_same_secure_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.

MODX Revolution admin panel
MODX Revolution admin panel

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.

HostnExtra was founded in 2016. All of our servers are located in the continental United States and United Kingdom. View more details