How to Install phpwcms on a CentOS 7 VPS

template_r1_c1phpwcms is a free and open source content management system and PHP development framework. It is very powerful, fast and flexible. It’s used by developers to create thousands of websites around the world. With its extensibility, phpwcms can create powerful websites with a lot of features. The admin area is easy to use with great user interface and beginners can easily adapt to it. In this tutorial we will guide you through the process of installing phpwcms on a CentOS 7 VPS with Apache web server, PHP and MariaDB

To start the installation, login to your CentOS 7 server as user root

ssh root@IP

As usual, run the following command to update all installed packages

yum -y update

Next, install Apache web server

yum -y install httpd

Once the installation of the web server is completed, start it and set it to start automatically on boot.

systemctl start httpd
systemctl enable httpd

phpwcms is a PHP based application and we need to install PHP with the ‘mysql’ extensions installed

yum -y install php php-mysql

Run the following command on your terminal to install MariaDB server on your CentOS 7 server

yum -y install mariadb mariadb-server

Once the installation is completed start the MariaDB server and set it to start on system boot

systemctl start mariadb
systemctl enable mariadb

Then, run the mysql_secure_installation script. This script will help you to improve the security of your MariaDB installation and set your MariaDB root password.

phpwcms requires an empty database, so login to the MariaDB server with the root user and create a new user and database that will be used by phpwcms to store information

mysql -u root -p

CREATE USER 'phpwcmsuser'@'localhost' IDENTIFIED BY 'PASSWORD';
GRANT ALL PRIVILEGES ON `phpwcms`.* TO 'phpwcmsuser'@'localhost';

Don’t forget to replace ‘PASSWORD’ with an actual strong password.

Download the latest available phpwcms release from their official website to your server. Make sure that you are downloading the full release, and not a patch package.


Unpack the downloaded ZIP archive to the document root directory on your server

unzip -d /var/www/html/

This will create a new directory for phpwcms with the version number. Change the name of the directory to something simpler.

cd /var/www/html/
mv phpwcms-phpwcms-1.8.2 phpwcms

Set the Apache user as the owner of the phpwcms files and directories

chown -R apache: /var/www/html/phpwcms

On the next step we will create an Apache virtual host for your phpwcms based website. Create a ‘/etc/httpd/conf.d/vhosts.conf’ file with the following content:

IncludeOptional vhosts.d/*.conf

Create a ‘vhosts.d/’ directory

mkdir /etc/httpd/vhosts.d/

and create the virtual host with the following content

vim /etc/httpd/vhosts.d/

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

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

Save the file and restart the Apache web server for the changes to take effect.

systemctl restart httpd

With this step the installation from the command line is completed. Now, open a web browser and navigate it to, accept their terms and conditions and follow the on-screen instructions to complete the phpwcms installation.

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 phpwcms 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.

How to install ProjectSend on CentOS 6
Install Nikto web scanner on an Ubuntu VPS
How to install PmWiki on CentOS 6 VPS