How to Install MODX in Ubuntu

By on February 13th, 2018

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.

# wget


4) Unzip the downloaded file.

# unzip unzip


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.


# GRANT ALL PRIVILEGES on db name_ TO ‘dbname @ localhost’ IDENTIFIED by dbname;


# 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

Install ModX


13) Enter the database type, database name, password, table prefix.

Install ModX


14) Enter the username, email id, password which you would prefer to make.

Install ModX


15) You can verify the installation summary of the MODx on your server on this page.

Install ModX


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.



Leave a Reply