How to Install TextPattern CMS on Ubuntu 18.04

Install TextPattern CMS on Ubuntu 18.04

In this tutorial we’ll learn how to install TextPattern CMS on Ubuntu 18.04. We will also install and configure its prerequisites. TextPattern CMS is a simple, flexible, free and open source Content Management System (CMS) that allows web designers to design beautiful web sites without programming in PHP. TextPattern CMS features an easy to learn XML-like tag-based templating language which allows web designers to quickly structure and build fast, lean, responsive, and secure CMS-based web sites and blogs.

I recommend to use a minimal Ubuntu server setup as a basis for the tutorial, that can be a virtual or a root server image with an Ubuntu 18.04 LTS minimal install from a web hosting company or you use our minimal server tutorial to install a server from scratch.

Install TextPattern CMS on Ubuntu 18.04

Step 1. First, ensure your system and apt package lists are fully up-to-date by running the following:

apt-get update -y
apt-get upgrade -y

Step 2. Installing LAMP on Ubuntu 18.04 LTS.

You should check out this LAMP stack install tutorial for Ubuntu 18.04, if you haven’t installed LAMP yet. Once it’s installed, come back here and read on. We also will install the required packages for LAMP stack and the important PHP extension that TextPattern CMS relies on:

apt-get install php7.2 libapache2-mod-php7.2 php7.2-common php7.2-mbstring php7.2-xmlrpc php7.2-soap php7.2-mysql php7.2-gd php7.2-xml php7.2-cli php7.2-zip

Step 3. Installing TextPattern CMS on Ubuntu 18.04 LTS.

First download the latest stable version of the Textpattern CMS. You can download it with the following command:

mv textpattern-4.6.2 /var/www/html/textpattern

Next, you will need to change permissions of the Textpattern folder:

chown -R www-data:www-data /var/www/html/textpattern/
chmod -R 755 /var/www/html/textpattern/

Step 4. Create a database for TextPattern.

Next, we need to create a database for the TextPattern installation:

mysql -uroot -p

Run the following command to create a database for TextPattern:

MariaDB> CREATE DATABASE textpattern;
MariaDB> CREATE USER 'textuser'@'localhost' IDENTIFIED BY 'password';
MariaDB> GRANT ALL PRIVILEGES ON `textpattern`.* TO 'textuser'@'localhost';
MariaDB> flush privileges;
MariaDB> exit

Step 5. Configure Apache web server for TextPattern.

For this you can take the default config as a template:

cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/textpattern.conf

Now edit the currently created Config as follows:

nano /etc/apache2/sites-available/textpattern.conf

Modify the virtual host file for your TextPattern site to resemble the example below:

<VirtualHost *:80>
 DocumentRoot /var/www/html/textpattern/

<Directory /var/www/html/textpattern/>
 Options FollowSymlinks
 AllowOverride All
 Require all granted

ErrorLog ${APACHE_LOG_DIR}/error.log
 CustomLog ${APACHE_LOG_DIR}/access.log combined


Finally, reload the web server as suggested, for the changes to take effect:

a2ensite textpattern.conf
a2enmod rewrite
systemctl restart apache2.service

Step 6. Accessing OpenCart.

Now you can access the TextPattern web install wizard in your browser by entering the domain name or http://yourdomain/textpattern to continue your TextPattern installation.

Congratulation’s! You have successfully install and configured TextPattern CMS on your Ubuntu 18.04 Bionic Beaver server. Thanks for using this tutorial installing TextPattern on Ubuntu 18.04 LTS (Bionic Beaver) system.