Install Textpattern on CentOS 7

textpattern-logoTextpattern is flexible and easy to use open source content management system (CMS) written in the PHP programming language. Texpattern comes with full range of features and it allows you to easily create, edit and publish content on your website. In this guide we will install Textpattern on a CentOS 7 VPS with Apache, MariaDB and PHP.

First of all log in to your server as user root

ssh root@IP

and make sure that all packages are up to date by executing the following command

yum -y update

Textpattern uses a MySQL database to store the information so run the following command to install MariaDB database server

yum install mariadb mariadb-server

Once it is installed, start the MariaDB database server and enable it to start at the boot time

systemctl start mariadb
systemctl enable mariadb

Run the mysql_secure_installation script to secure the database server and set your MariaDB root password

Log in to MariaDB using the ‘root’ user and create new database and the associated user and password for Textpattern.

mysql -u root -p

CREATE DATABASE textpattern;
CREATE USER 'Ttextpatternuser'@'localhost' IDENTIFIED BY 'PASSWORD';
GRANT ALL PRIVILEGES ON `textpattern`.* TO 'textpatternuser'@'localhost';

Replace ‘PASSWORD’ with an actual strong password.

Install Apache web server

yum install httpd

After the installation is completed, start the web server and add it to automatically start on the system start-up

systemctl start httpd
systemctl enable httpd

Textpattern is written in the PHP programming language, so we need to install PHP among with few PHP modules

yum install php php-pdo php-common php-mbstring php-mcrypt

Go to Textpattern’s official website and download the latest stable release of the application to your server


Unpack the downloaded zip archive to the document root directory on your server. In CentOS usually it is the ‘/var/www/html/’ directory.

unzip -d /var/www/html

To be sure that it is the correct directory you can use the following command

Need a fast and easy fix?
✔ Unlimited Managed Support
✔ Supports Your Software
✔ 2 CPU Cores
✔ 2 GB RAM
✔ 50 GB PCIe4 NVMe Disk
✔ 1854 GeekBench Score
✔ Unmetered Data Transfer

Now just $43 .99

grep -i '^documentroot' /etc/httpd/conf/httpd.conf
DocumentRoot "/var/www/html"

Change the ownership of the Textpattern’s files

cd /var/www/html/
chown -R apache:apache textpattern/

Next, we will create Apache virtual host for your Textpattern website. Create ‘/etc/httpd/conf.d/vhosts.conf’ file with the following content

vim /etc/httpd/conf.d/vhosts.conf

IncludeOptional vhosts.d/*.conf

and create the virtual host

mkdir /etc/httpd/vhosts.d/
vim /etc/httpd/vhosts.d/

<VirtualHost YOUR_SERVER_IP:80>
DocumentRoot "/var/www/html/textpattern/"
ErrorLog "/var/log/httpd/"
CustomLog "/var/log/httpd/" combined

<Directory "/var/www/html/textpattern/">
DirectoryIndex index.html index.php
Options FollowSymLinks
AllowOverride All
Require all granted

Restart the Apache web server for the changes to take effect.

systemctl restart httpd

Navigate your favorite web browser to and follow the on-screen instructions to finish the installation and setup Textpattern.

Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to install Textpattern for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

Leave a Comment