How to install PIMCore on Ubuntu 20.04 – a quick‑start guide
If you’re looking to run the open‑source product information manager on a fresh Ubuntu 20.04 server, this article walks you through the exact steps you need to get it up and running with minimal fuss.
Step 1: Get your system ready
sudo apt update && sudo apt upgrade -y
I hate waiting for packages to finish downloading, so I always run a quick full‑upgrade before diving into new software. It keeps the kernel and libraries up to date, which is a lifesaver when PHP or Composer complains about missing dependencies.
Now pull in the core stack:
sudo apt install -y apache2 mysql-server php8.0 libapache2-mod-php8.0 \ php8.0-mysql php8.0-gd php8.0-curl php8.0-xml php8.0-zip php8.0-mbstring \ git unzip wget nodejs npm
Why each package matters:
- apache2 – the web server PIMCore expects by default.
- php‑modules – PIMCore is a PHP app; missing any of these will break bootstrap.
- nodejs/npm – optional, but handy for compiling front‑end assets if you plan to tweak the theme.
Step 2: Create a MySQL database and user
sudo mysql -u root -p
Inside the MySQL shell:
CREATE DATABASE pimcore CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; GRANT ALL PRIVILEGES ON pimcore.* TO 'pimuser'@'localhost' IDENTIFIED BY 'StrongPass123'; FLUSH PRIVILEGES; EXIT;
If you skip this, PIMCore will throw a fatal error when it can’t connect to the database. I’ve seen newbies hit that wall right after downloading the tarball and wonder why nothing happens.
Step 3: Grab PIMCore from GitHub
cd /var/www/ sudo git clone https://github.com/pimcore/pimcore.git pimcore cd pimcore
I prefer cloning directly into /var/www/ because it keeps the web root tidy and makes file permissions easier to manage later.
Step 4: Set correct ownership for Apache
sudo chown -R www-data:www-data /var/www/pimcore
Apache runs as www‑data. If you leave the files owned by your user, PHP will complain about “Permission denied” when writing cache or logs.
Step 5: Install Composer and PIMCore dependencies
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer cd /var/www/pimcore sudo composer install
Composer pulls the PHP libraries PIMCore needs. A common pitfall: if you’re missing php-xml, Composer will exit with a cryptic “Missing required PHP extension” message. The earlier step installing that module is why I stress it.
Step 6: Configure Apache for PIMCore
sudo tee /etc/apache2/sites-available/pimcore.conf > /dev/null <<EOF
<VirtualHost *:80>
ServerName pimcore.local
DocumentRoot /var/www/pimcore/web
<Directory /var/www/pimcore/web>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/pimcore_error.log
CustomLog ${APACHE_LOG_DIR}/pimcore_access.log combined
</VirtualHost>
EOF
Enable the site and rewrite module, then reload Apache:
sudo a2ensite pimcore.conf sudo a2enmod rewrite sudo systemctl reload apache2
I set ServerName to pimcore.local; you can point your hosts file or DNS accordingly. Without rewrite, the pretty URLs break.
Step 7: Run the PIMCore installer
Open a browser and navigate to http://pimcore.local. The web wizard will guide you through:
1. License agreement (it’s open source, so just accept).
2. Database configuration – use the pimcore database, user pimuser, password you chose.
3. Admin account creation.
If the installer balks at “PHP version too low,” double‑check that Apache is actually using PHP 8.0 (run php -v). On a fresh install, sometimes Apache falls back to an older PHP module if multiple versions are present.
Step 8: Final touches
sudo chmod -R 775 /var/www/pimcore/app/cache sudo chmod -R 775 /var/www/pimcore/web/media
PIMCore writes cache and media files there; give Apache write permission or you’ll see 500 errors when uploading assets.
If you want the site to be reachable from the internet, open port 80 in your firewall:
sudo ufw allow 80/tcp
That’s it. You now have a running PIMCore instance on Ubuntu 20.04. If anything stinks along the way, check the Apache error log; that usually points you to the missing module or permission issue.