How to Install Pimcore on Ubuntu 20.04

Updated on 11 August, 2026
Learn how to install PIMCore on Ubuntu 20.04 with our step-by-step guide. Get your product information management system up and running quickly and efficiently.
How to Install Pimcore on Ubuntu 20.04 header image

PIMCore is a free and open-source enterprise content management system written in PHP. It combines Product Information Management (PIM), Master Data Management (MDM), Digital Asset Management (DAM), a Customer Data Platform (CDP), and a Digital Experience Platform (DXP) in a single application, with web content management and print publishing built in.

This article explains how to install PIMCore on an Ubuntu 20.04 server. It covers installing Apache, PHP-FPM, and MySQL, creating the application database, deploying PIMCore with Composer, configuring an Apache virtual host, and reaching the administrator interface.

Note
Ubuntu 20.04 LTS reached the end of its standard five-year support window on 31 May 2025. It no longer receives security updates through the normal channels, so a server running it accumulates unpatched kernel and package vulnerabilities and is not suitable for a host exposed to the public internet.

Prerequisites

Before you begin, you need to:

  • Have access to an Ubuntu 20.04 server as a non-root user with sudo privileges.
  • Update the installed packages on the server.
  • Point a domain such as example.com to your server's public IP address.

The stack this article installs meets the following minimum versions:

  • Apache 2.4 or later
  • PHP 8.0 or later
  • MySQL 8.0 or later, or MariaDB 10.3 or later

Install the Required Packages

Ubuntu 20.04 does not ship PHP 8.0 in its default repositories, so the packages come from the ondrej/php repository. PHP-FPM handles the application requests while Apache serves the site and proxies PHP to that process pool.

  1. Update the package list.

    console
    $ sudo apt update
    
  2. Install the tooling required to add a third-party repository.

    console
    $ sudo apt -y install software-properties-common
    
  3. Add the PHP repository.

    console
    $ sudo add-apt-repository ppa:ondrej/php
    
  4. Refresh the package list so that it includes the new repository.

    console
    $ sudo apt update
    
  5. Install Apache, MySQL, PHP, and the extensions PIMCore requires.

    console
    $ sudo apt install apache2 mysql-server php8.0 libapache2-mod-php8.0 php8.0-mysql \
        php8.0-curl php8.0-xml php8.0-zip php8.0-mbstring php8.0-intl php8.0-opcache \
        php8.0-imagick php8.0-gd php8.0-cli php8.0-fpm libapache2-mod-fcgid wget unzip -y
    
  6. Open the PHP-FPM configuration file.

    console
    $ sudo nano /etc/php/8.0/fpm/php.ini
    
  7. Find the following directives and set them to the values below.

    ini
    memory_limit = 256M
    upload_max_filesize = 100M
    post_max_size = 100M
    

    Save and close the file.

    • memory_limit: Raises the per-request memory ceiling, which PIMCore needs when building assets and running the installer.
    • upload_max_filesize and post_max_size: Allow larger asset uploads through the administrator interface.
  8. Enable the Apache modules that forward requests to PHP-FPM.

    console
    $ sudo a2enmod proxy_fcgi setenvif
    
  9. Enable the PHP-FPM configuration.

    console
    $ sudo a2enconf php8.0-fpm
    
  10. Restart Apache to apply the changes.

    console
    $ sudo systemctl restart apache2
    

Create the PIMCore Database

PIMCore stores its content, asset metadata, and user accounts in MySQL. Securing the server first removes the anonymous accounts and test database that a default installation leaves in place.

  1. Enable MySQL to start at boot.

    console
    $ sudo systemctl enable mysql
    
  2. Run the security script.

    console
    $ sudo mysql_secure_installation
    

    The script asks a series of questions. Answer them as follows:

    • Setup VALIDATE PASSWORD plugin: Enter n.
    • Remove anonymous users: Enter y.
    • Disallow root login remotely: Enter y.
    • Remove test database and access to it: Enter y.
    • Reload privilege tables now: Enter y.
  3. Log in to the MySQL shell and enter your password when prompted.

    console
    $ sudo mysql -u root -p
    
  4. Create a database named pimcore.

    sql
    CREATE DATABASE pimcore charset=utf8mb4;
    
  5. Create a database user. Replace DB-PASSWORD with a strong password.

    sql
    CREATE USER 'pimcoreuser'@'localhost' IDENTIFIED BY 'DB-PASSWORD';
    
  6. Grant the user full access to the database.

    sql
    GRANT ALL ON pimcore.* TO 'pimcoreuser'@'localhost' WITH GRANT OPTION;
    
  7. Apply the privilege changes.

    sql
    FLUSH PRIVILEGES;
    
  8. Exit the MySQL shell.

    sql
    exit;
    

Install PIMCore

Composer resolves the PIMCore packages and their dependencies into the web root. The COMPOSER_MEMORY_LIMIT variable removes the memory ceiling for this command, because resolving the dependency tree exceeds the default limit.

  1. Install the packages Composer needs to fetch the project.

    console
    $ sudo apt install curl git
    
  2. Install Composer.

    console
    $ curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
    
  3. Change to the web root.

    console
    $ cd /var/www/
    
  4. Create the project.

    console
    $ sudo COMPOSER_MEMORY_LIMIT=-1 composer create-project pimcore/skeleton pimcore
    
  5. Change to the installation directory.

    console
    $ cd /var/www/pimcore
    
  6. Run the installer. Enter the database credentials you created earlier and the administrator account you want to use.

    console
    $ sudo ./vendor/bin/pimcore-install
    
  7. Set the directory ownership to the web server user.

    console
    $ sudo chown www-data:www-data -R /var/www/pimcore/
    
  8. Set the directory permissions.

    console
    $ sudo chmod -R 755 /var/www/pimcore/
    

Configure the Apache Virtual Host

Apache serves the application from the public directory rather than the project root, which keeps the configuration files and vendor directory outside the web root. The rewrite module is required because PIMCore routes every request through a front controller.

  1. Allow HTTP traffic through the firewall.

    console
    $ sudo ufw allow 80
    
  2. Create the virtual host file.

    console
    $ sudo nano /etc/apache2/sites-available/pimcore.conf
    
  3. Add the following configuration. Replace example.com with your domain and admin@example.com with your email address.

    ini
    <VirtualHost *:80>
        ServerAdmin admin@example.com
        DocumentRoot /var/www/pimcore/public
        ServerName example.com
    
         <Directory /var/www/pimcore/public/>
              Options FollowSymlinks
              AllowOverride All
              Require all granted
         </Directory>
    
         ErrorLog ${APACHE_LOG_DIR}/error.log
         CustomLog ${APACHE_LOG_DIR}/access.log combined
    </VirtualHost>
    

    Save and close the file.

    • DocumentRoot: Points at the public directory so that only the front controller and assets are reachable.
    • AllowOverride All: Lets the bundled .htaccess file apply the rewrite rules that PIMCore requires.
  4. Enable the rewrite module.

    console
    $ sudo a2enmod rewrite
    
  5. Enable the new virtual host.

    console
    $ sudo a2ensite pimcore.conf
    
  6. Disable the default virtual host.

    console
    $ sudo a2dissite 000-default.conf
    
  7. Restart Apache to apply the configuration.

    console
    $ sudo systemctl restart apache2
    

Access the PIMCore Administrator Interface

The administrator interface is served from the /admin/ path on the domain you configured. Signing in confirms that Apache, PHP-FPM, and the database are all working together.

  1. Open the administrator interface in a web browser. Replace example.com with your domain.

    http://example.com/admin/
  2. Sign in with the administrator account you created during the installation.

Conclusion

You have installed PIMCore on an Ubuntu 20.04 server with Apache, PHP-FPM, and MySQL, and reached the administrator interface through your own domain. Secure the site with a TLS certificate before exposing it publicly, and review the data model and asset settings in the administrator interface to start building your catalog. For more information, visit the official PIMCore documentation.

Comments