There is a new version of this tutorial available for Ubuntu 20.04 (Focal Fossa).

How to Install Flatpress CMS on Ubuntu 18.04

This tutorial exists for these OS versions

On this page

  1. Requirements
  2. Install Apache and PHP
  3. Install FlatPress
  4. Access FlatPress

FlatPress is a free and open-source blogging engine written in PHP language. FlatPress stores all its content on text files, so it does not require a database. It supports multiple languages, plugins, themes, widget,s and much more.

In this tutorial. I am going to explain how to install FlatPress on Ubuntu 18.04 server.


  • A server running Ubuntu 18.04.
  • A non-root user with sudo privileges.

Install Apache and PHP

By default, the latest version of the PHP is not available in the Ubuntu 18.04 default repository. So, you will need to add third party repository to your system. You can install it with the following command:

sudo add-apt-repository ppa:ondrej/php

Once the repository is added, install Apache, PHP and all required PHP libraries by running the following command:

sudo apt-get install apache2 php7.0 php7.0-mysql php7.0-curl php7.0-json php7.0-cgi libapache2-mod-php7.0 php7.0-mcrypt php7.0-xmlrpc php7.0-gd php7.0-mbstring php7.0 php7.0-common php7.0-xmlrpc php7.0-soap php7.0-xml php7.0-intl php7.0-cli php7.0-ldap php7.0-zip php7.0-readline php7.0-imap php7.0-tidy php7.0-recode php7.0-sq php7.0-intl wget unzip -y

Once all the packages are installed, start Apache service and enable it to start on boot time with the following command:

sudo systemctl start apache2
sudo systemctl enable apache2

Install FlatPress

First, download the latest version of FlatPress from Git repository with the following command:


Next, unzip the downloaded file with the following command:


Next, copy the extracted directory to the Apache root directory and give proper permissions with the following command:

sudo cp -r flatpress-1.0.3 /var/www/html/flatpress
sudo chown -R www-data.www-data /var/www/html/flatpress
sudo chmod -R 775 /var/www/html/flatpress

Next, create an Apache virtual host file for Flatpress with the following command:

sudo nano /etc/apache2/sites-available/flatpress.conf

Add the following lines:

<VirtualHost *:80>
     ServerAdmin [email protected]
     DocumentRoot /var/www/html/flatpress

     <Directory /var/www/html/flatpress/>
          AllowOverride All
          Require all granted

     ErrorLog ${APACHE_LOG_DIR}/flatpress_error.log
     CustomLog ${APACHE_LOG_DIR}/flatpress_access.log combined


Save and close the file. Then, enable virtual host with the following command:

sudo a2ensite flatpress

Next, enable Apache rewrite module and reload Apache service with the following command:

sudo a2enmod rewrite
sudo systemctl restart apache2

Access FlatPress

Now, open your web browser and type the URL You will be redirected to the FlatPress installation page:

Now, click on the Next button. You should see the Admin user creation page:

Here, provide all the details and click on the Next button. Once the installation has been finished. You should see the following page:

Congratulations! you have successfully installed FlatPress on Ubuntu 18.04 server.

Share this page:

0 Comment(s)