GICT knowledge base
How to Install MODX in Ubuntu
Published
MODX (originally MODx) is an open source content management system and web application framework for publishing content on the world wide web and intranets. MODX is licensed under the GPL, is written in the PHP programming language, and supports MySQL and Microsoft SQL Server as the database. It allows you to build sites of any size, managed with ease from the back end administration. It has a very flexible templating system which is ideal for designers and a robust OOP API for developers who wish to extend its functionality.
1) Make sure that the server is up to date.
# apt-get update
2) Get into the /var/www directory.
# cd /var/www/
3) Now download the modx.
4) Unzip the downloaded file.
# unzip unzip modx-2.2.9-pl.zip
5) Now rename the unzipped directory.
# mv modx-2.2.9-pl modx
6) Before proceeding with the installation you have to make sure that the php memory_limit is higher than 24mb. If not please execute the below-mentioned commands to increase this.
# vi /etc/php5/apache2/php.ini
7) Edit the memory_limit and assign a value which 24 or higher than that.
memory_limit 32
8) In the same file itself, you’ll need to make sure that the register_globals, magic_quotes_gpc and safe_mode directives are off. Now you can save and exit the file. If you made any changes, don’t forget to restart Apache for the changes to take effect:
# service apache2 restart
9) Modx needs a database.
# mysql -u root -p
10) Create a database in your preferred name.
# CREATE DATABASE ‘dbname’
# GRANT ALL PRIVILEGES on db name_ TO ‘dbname @ localhost’ IDENTIFIED by dbname;
# FLUSH PRIVILEGES;
# exit
11) Change the owner and group of /var/www/html/* to that of www-data.
# chown www-data:www-data /var/www/html/*
12) Open your browser and access the below-mentioned link to proceed further installation of the modx.
# yourserverip/modx/setup
13) Enter the database type, database name, password, table prefix.
14) Enter the username, email id, password which you would prefer to make.
15) You can verify the installation summary of the MODx on your server on this page.
The installation of modx has been completed and login with your administrator credentials to the modx dashboard.
If you need any further help please do reach our support department.
Related guides
How to Find Services That Need a Restart After Updates with needrestart
Find services using outdated libraries with needrestart on Ubuntu. Read restart reports, review automatic restart policy and plan maintenance safely.
UbuntuHow to Enable Brotli Compression in Nginx on Ubuntu 24.04
Enable Brotli in Ubuntu Nginx, preserve gzip fallback, verify response headers and avoid stale precompressed assets. Measure savings on your own files.
UbuntuHow to Prevent Overlapping Cron Jobs with flock
Prevent overlapping cron jobs with flock. Use a shared lock, understand skipped runs and verify that every entry point follows the locking policy.
UbuntuSecuring Ubuntu 24 SSH and other best practices
How to Lock Down Your Ubuntu 24 Server: A Beginner's Guide So, you just spun up a brand new Ubuntu 24 server. You may find a lot of SSH brute force logins failures.




