How to install Pimcore on CentOS 7

PimcorePimcore is a free and open-source content management platform for creating and managing web applications and digital presences. In this article we will install Pimcore on a CentOS 7 VPS with Apache web server, PHP and MariaDB MySQL server.

Log in to your Linux VPS as user root and make sure that all packages are up to date

yum -y update

Now install MariaDB

yum install mariadb-server mariadb

Start MariaDB and add it to automatically start on system start-up

systemctl start mariadb.service
systemctl enable mariadb.service

Run the following command to secure your MariaDB server and set a new root passord


Pimcore needs an MySQL database, so log in to the MySQL server with user root and create new database with UTF-8 as character set

mysql -u root -p
MariaDB [(none)]> CREATE DATABASE pimcore CHARACTER SET utf8 COLLATE utf8_general_ci;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON pimcore.* TO 'pimcoreuser'@'localhost' IDENTIFIED BY 'PASSWORD';
MariaDB [(none)]> flush privileges;
MariaDB [(none)]>> \q;

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

Now, we will install Apache web server

yum install httpd

Start the web server and enable it to start at boot

systemctl start httpd
systemctl enable httpd

Install PHP and a few PHP extensions

yum install php php-mysql php-dom php-gd php-mbstring php-common

Download the latest stable release of Pimcore to your server


Extract the downloaded archive to the document root directory on your server.

yum -y install unzip
mkdir /var/www/html/pimcore/
unzip -d /var/www/html/pimcore/

Change the ownership

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

In order to use the scheduled features we need to create a cronjob.

yum -y install cronie
crontab -u
*/5 * * * * /usr/bin/php /var/www/html/pimcore/pimcore/cli/maintenance.php

Now, we will set up Apache virtual hosting directive for your Pimcore website.

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

Now just $43 .99


Create a ‘/etc/httpd/conf.d/vhosts.conf’ file with the following content

IncludeOptional vhosts.d/*.conf

and create a ‘/etc/httpd/vhosts.d’ directory where we will put all our virtual hosts.

mkdir /etc/httpd/vhosts.d

Create a virtual host for your Pimcore domain

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

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

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

And restart Apache for the changes to take effect

systemctl restart httpd

That’s all. Now, we need to lunch the web installer accessing , enter your MySQL information and create administrator user.

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 setup this 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

To prove you are human please solve the following *