How to install Pimcore with Apache on Ubuntu 24.04
Installing Pimcore with Apache on Ubuntu 24.04 sets up a central system to manage website content, product details, and online shops. Pimcore is a free platform that combines content tools, customer data, and online store features into one place.
Ubuntu 24.04 LTS is a Linux operating system released in April 2024. Pairing it with the Apache web server gives you a reliable base to run your Pimcore site.
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
You can install Apache on Ubuntu by opening your terminal and running the package manager commands to set up the web server. First, update your system package list with sudo apt update, then run sudo apt install apache2 to install the software. Once the installation finishes, you can manage the web server using system commands to start, stop, and enable it automatically at startup.
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
You can install MariaDB on Ubuntu to create and manage the database that Pimcore needs for storing its data. Open your terminal and run sudo apt update followed by sudo apt install mariadb-server to download and set up the database server on your system. After the installation completes, the database service runs in the background so you can create your Pimcore database and user accounts.
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
You need to create a dedicated database named pimcoredb and a user account called pimcoredbuser in MariaDB for secure data storage. Access the MariaDB command line interface to set up your new database, create the user with a secure password, and grant that user full access permissions. These credentials allow Pimcore to connect to the database and save your website information properly.
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
Install PHP on Ubuntu Linux
You can install PHP on Ubuntu Linux along with all the required modules because Pimcore uses it to run your website and backend processes. Run the apt install command with the full list of required PHP extensions, including libapache2-mod-php, php-intl, php-mysql, and php-xml. Having these extensions ensures that the Pimcore installation wizard runs without any missing dependency errors.
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
You can get the Pimcore files by installing git and Composer, which is the package manager that handles all the software libraries Pimcore requires to function. Install curl and git using your terminal, then download and run the official Composer installer script to set up the tool globally. Using Composer is the standard method for downloading the free community version of Pimcore with all its dependencies intact.
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.
You enable the Pimcore virtual host and restart the Apache server by running specific commands. This action makes Pimcore accessible through your web browser. For example, you would run the command `sudo a2ensite pimcore.conf` to enable the virtual host file.
sudo a2ensite pimcore.conf
sudo a2enmod rewrite
sudo systemctl restart apache2
Setup Let’s Encrypt SSL/TLS for Pimcore
You can set up Let's Encrypt SSL/TLS for Pimcore on Apache Ubuntu to secure your website and protect visitor data with free security certificates. Install Certbot and its Apache plugin, then run the certificate generation tool to automatically configure HTTPS for your domain name. Once the SSL certificate is active, your Apache web server will encrypt all traffic between visitors and your Pimcore 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 is a writer at Geek Rewind who turns complex IT tasks into clear, step-by-step guides. He draws on years of hands-on experience in system administration and enterprise IT operations, focusing on Windows, Linux and WordPress: the problems people actually run into, and the fixes that work. His server and WordPress guides come from systems he runs himself. Richard builds and maintains the platform behind Geek Rewind, from its Ubuntu servers and Nginx configuration to its custom WordPress plugins. Many new tutorials start with readers' questions, and he's always glad to answer them in the comments.
No comments yet — be the first to share your thoughts!