How to install Pimcore with Apache on Ubuntu 24.04
You install Pimcore with Apache on Ubuntu 24.04 to build a robust platform for managing product information, master data, content, and eCommerce.
Pimcore is a comprehensive solution that integrates PIM, MDM, CMS, and eCommerce functionalities to streamline customer experience automation for businesses.
This tutorial guides you through setting up Ubuntu 24.04 LTS with the Apache web server, a reliable choice for hosting demanding applications.
We will configure Apache to efficiently serve your Pimcore instance, creating a stable and scalable foundation for your digital operations.
Install Apache, MariaDB, and PHP using apt commands. Create a Pimcore database in MariaDB, then configure Apache to serve your Pimcore files.
Install Apache HTTP server on Ubuntu
Apache is a web server that lets your computer host websites, and you’ll need it to run Pimcore. To install Apache on Ubuntu, just open your terminal and type ‘sudo apt update’ then ‘sudo apt install apache2’.
To do that, open the Ubuntu terminal and run the commands below to install the Apache web server.
sudo apt update
sudo apt install apache2
Once Apache is installed, the commands below can start, stop, and enable the Apache web server to start automatically when your server boots up.
sudo systemctl stop apache2
sudo systemctl start apache2
sudo systemctl enable apache2
You can test that the Apache web server is running by opening your web browser and browsing to the server’s localhost or IP address.
http://localhost

When you see the Apache2 Default Page, it means the Apache HTTP server is successfully installed.
Additional help on installing Apache on Ubuntu is in the link below.
Install the MariaDB database server on Ubuntu
Pimcore needs a place to store its information, and MariaDB is a popular database system that works well. To install MariaDB on Ubuntu, open your terminal and run ‘sudo apt update’ followed by ‘sudo apt install mariadb-server’.
To install and use the MariaDB database server, use the instructions below.
Open the Ubuntu terminal and run the commands below to install the MariaDB database server.
sudo apt update sudo apt install mariadb-server
Once the MariaDB database server is installed, use the commands below to stop, start, and enable the MariaDB server to start automatically when the server boots.
sudo systemctl stop mariadb sudo systemctl start mariadb sudo systemctl enable mariadb
Run the following commands to validate and test if the MariaDB database server is installed successfully.
sudo mariadb
Once you run the commands above, it will log you onto the MariaDB console and display a message similar to the one below.
Welcome to the MariaDB monitor. Commands end with ; or g. Your MariaDB connection id is 32 Server version: 10.11.2-MariaDB-1 Ubuntu 23.04 Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or 'h' for help. Type 'c' to clear the current input statement. MariaDB [(none)]>
The message tells you that the server is installed successfully.
Additional help on installing MariaDB.
- How to install MariaDB on Ubuntu Linux
- MariaDB without password prompt
Create a Pimcore database
Now that MariaDB is set up, you need to create a special database just for Pimcore to use. This involves making a database named ‘pimcoredb’ and a user called ‘pimcoredbuser’ who has full control over it.
As part of the setup, we will create a pimcoredb database and a user account called pimcoredbuser.
Finally, we’ll grant the pimcoredbuser full access to the pimcoredb database.
All the database steps above can be done using the commands below:
But first, log on to the MariaDB database server:
sudo mariadb
Then run the commands below to complete the steps:
CREATE DATABASE pimcoredb CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE USER pimcoredbuser@localhost IDENTIFIED BY 'type_your_password_here';
GRANT ALL ON pimcoredb.* TO pimcoredbuser@localhost WITH GRANT OPTION;
FLUSH PRIVILEGES;
exit
Ensure to replace ‘type_your_password_here ‘with your password.
Install PHP on Ubuntu Linux
Pimcore is built with PHP, which is a programming language for websites, so you need to install it on your Ubuntu computer. Run this command in your terminal: ‘sudo apt install php libapache2-mod-php php-intl php-mysql php-curl php-cli php-zip php-xml php-gd php-common php-mbstring php-xmlrpc php-bcmath php-json php-sqlite3 php-soap php-z’.
Then, run the commands below to install the latest PHP version.
sudo apt install php libapache2-mod-php php-intl php-mysql php-curl php-cli php-zip php-xml php-gd php-common php-mbstring php-xmlrpc php-bcmath php-json php-sqlite3 php-soap php-zip
Additional help on installing PHP
Get Pimcore files
Composer is a tool that helps manage the software packages needed for Pimcore. To get Pimcore, first install git and Composer by running ‘sudo apt install curl git’ and then ‘curl -sS https://getcomposer.org/installer | sudo php — –install-dir=/usr/local/bin –f’.
There are multiple ways to get Pimcore installed. For the free community version, the composer installer is the right choice.
First, install git, Composer, and other dependencies.
sudo apt install curl git
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
Next, change to the Apache web server directory and clone Pimcore files. The last command allows the Apache web server to interact safely with the files, ensuring a secure environment for your Pimcore installation.
cd /var/www/
sudo COMPOSER_MEMORY_LIMIT=-1 composer create-project pimcore/demo pimcore
sudo chown www-data:www-data -R /var/www/pimcore/
Alternatively, install the skeleton copy if you do not want to install Pimcore with demo content.
sudo COMPOSER_MEMORY_LIMIT=-1 composer --ignore-platform-req=ext-amqp create-project pimcore/skeleton pimcore
After that, run the command below to install Pimcore.
cd /var/www/pimcore
sudo -u www-data ./vendor/bin/pimcore-install
Once you have completed all the above steps, continue configuring the Apache web server below to serve the Pimcore content.
You will be prompted to create an admin account, type the database and account created above to complete the installation.
Admin username:
> superadmin
Admin password (input will be hidden):
>
MySQL username:
> pimcoredbuser
MySQL password (input will be hidden):
>
MySQL database:
> pimcoredb
This will install Pimcore with the given settings. Do you want to continue? (yes/no) [yes]:
>
Running installation. You can find a detailed install log in var/installer/log/dev.log
Install complete!
11/11 [============================] 100%
Trying to install assets as relative symbolic links.
--- ------------------------------------------ ------------------
Bundle Method / Error
--- ------------------------------------------ ------------------
✔ FOSJsRoutingBundle relative symlink
✔ PimcoreAdminBundle relative symlink
✔ PimcoreCustomReportsBundle relative symlink
✔ PimcorePersonalizationBundle relative symlink
✔ PimcoreEcommerceFrameworkBundle relative symlink
✔ PimcoreApplicationLoggerBundle relative symlink
✔ PimcoreGoogleMarketingBundle relative symlink
✔ PimcoreCustomerManagementFrameworkBundle relative symlink
✔ PimcoreNewsletterBundle relative symlink
✔ PimcoreGlossaryBundle relative symlink
✔ PimcoreSeoBundle relative symlink
✔ PimcoreSimpleBackendSearchBundle relative symlink
✔ PimcoreDataHubBundle relative symlink
✔ OutputDataConfigToolkitBundle relative symlink
✔ Web2PrintToolsBundle relative symlink
✔ ObjectMergerBundle relative symlink
✔ PimcoreWebToPrintBundle relative symlink
✔ PimcoreTinymceBundle relative symlink
✔ PimcoreStaticRoutesBundle relative symlink
✔ PimcoreWordExportBundle relative symlink
✔ PimcoreXliffBundle relative symlink
✔ PimcoreCoreBundle relative symlink
--- ------------------------------------------ ------------------
[OK] All assets were successfully installed.
[OK] Pimcore was successfully installed
Next, create a .htaccess file for Apache rewrite.
sudo -u www-data nano /var/www/pimcore/public/.htaccess
Then, copy the content from the below link into the file and save it.
After Pimcore installation, continue below to set up Apache to serve Pimcore’s content.
Run the commands below to create an Apache virtual host file for Pimcore.
sudo nano /etc/apache2/sites-available/pimcore.conf
Then, copy and paste the content block below into the Apache server block.
<VirtualHost *:80>
ServerName pimcore.example.com
ServerAlias www.pimcore.example.com
ServerAdmin admin@example.com
DocumentRoot /var/www/pimcore/public
<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 the file.
Then, run the commands below to enable the virtual host and restart the Apache server.
sudo a2ensite pimcore.conf
sudo a2enmod rewrite
sudo systemctl restart apache2
Setup Let’s Encrypt SSL/TLS for Pimcore
It’s important to secure your Pimcore website with HTTPS, and Let’s Encrypt offers free security certificates for Apache on Ubuntu. You can follow a separate guide to set up Let’s Encrypt for Apache, which will protect your site.
Please read the post below for additional resources on installing and creating Let’s Encrypt SSL certificates for Apache.
How to set up Let’s Encrypt SSL certificate for Apache on Ubuntu Linux
Once you have restarted the Apache web server, open your browser and browse to the server hostname or IP address defined in the Apache server block.
http://pimcore.example.com/
A Pimcore web portal page should appear.

To log on to the backend admin page, use the URL below.
http://pimcore.example.com/admin
That should do it!
Conclusion:
In summary, installing Pimcore on Ubuntu with Apache involves several key steps:
- Setup Environment: Ensure you have a proper Apache, MariaDB, and PHP environment installed.
- Database Configuration: Create a database specifically for Pimcore and a user account to access it.
- Download Pimcore: Use Composer to download the Pimcore files and set the correct permissions for your Apache server.
- Installation Process: Follow the prompts to install Pimcore, input the database details, and set up an admin account.
- Configure Apache: Create a virtual host configuration and enable the necessary modules for proper URL handling.
- Implement SSL/TLS: Secure your Pimcore installation using an SSL certificate from Let’s Encrypt to enable HTTPS.
- Access Pimcore: Open your browser and navigate to your Pimcore installation to use the platform.
Following these steps, you can successfully set up a robust and secure Pimcore environment to enhance your business’s data management and eCommerce capabilities.
Was this guide helpful?
About the Author
Richard
Tech Writer, IT Professional
Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.
No comments yet — be the first to share your thoughts!