Is there a problem that needs an urgent fix?Urgent fix?Get emergency help →
Blog

Practical Magento 2 guides on upgrades, security, speed and migration, written by the MageBooster team.

7 Common Magento Install Errors and the Fix

Access keys, Composer memory, PHP extensions, permissions, OpenSearch, the web root and static files: the seven most common Magento installation errors, each with its cause and the command that fixes it.
7 common Magento install errors

In short

Most Magento installation errors come from seven causes: wrong access keys, too little memory for Composer, a missing PHP extension, wrong file permissions, OpenSearch not reachable, a wrong web server root and static files that were never deployed.

This is part 9 of our Magento installation series. Part 8 was Magento cron setup.

1. Composer rejects your access keys

Symptom: Composer keeps asking for credentials for repo.magento.com, or stops with an authentication error. Cause: the keys are mixed up or belong to another account. The public key is the username and the private key is the password. Store them once:

composer config --global http-basic.repo.magento.com <public_key> <private_key>

2. Composer runs out of memory

Symptom: PHP Fatal error: Allowed memory size of XXXXXX bytes exhausted. Cause: the PHP memory_limit for the command line is too low. Adobe notes that upgrades can need up to 2 GB of RAM and recommends a swap file below that. Remove the limit for Composer:

COMPOSER_MEMORY_LIMIT=-1 composer install

3. A PHP extension is missing

Symptom: Composer refuses to install and names a missing ext- package, such as ext-intl. Cause: Magento needs many extensions. Compare php -m with Adobe’s system requirements and install what is missing. The command line and PHP-FPM can load different php.ini files; php --ini shows which one.

4. Permission denied

Symptom: setup:install or a deploy command cannot write to var, generated or pub/static. Cause: wrong file owner, or bin/magento was run as root. Fix the rights from the Magento root and run every command as the file system owner:

find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +
find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} +
chown -R :www-data .
chmod u+x bin/magento
sudo -u <owner> bin/magento setup:install ...

5. OpenSearch is not reachable

Symptom: setup:install stops because it cannot connect to the search engine. Cause: OpenSearch is not running, listens on another host or port, or a firewall or SELinux blocks it. Check that it answers, then pass the same host and port with --search-engine=opensearch --opensearch-host --opensearch-port:

curl 127.0.0.1:9200
netstat -an | grep 9200

6. The admin or the store shows 404

Symptom: /admin gives a 404, or the site does not open. Cause: without --backend-frontname the installer picks a random admin path, or nginx does not include Magento’s sample config, which serves from pub/. Show the admin path; in nginx set MAGE_ROOT, include nginx.conf.sample and match server_name to the base URL:

bin/magento info:adminuri
nginx -t && systemctl restart nginx

7. Pages load without styles

Symptom: the store shows plain text without CSS. Cause: in production mode Magento does not create static files on demand; you must deploy them. Empty pub/static except its .htaccess file, then deploy every language your store uses:

bin/magento setup:static-content:deploy en_US de_DE
bin/magento cache:flush

Next in the series: after installing Magento, the first 10 steps.

Stuck on an install error?

We install Magento 2.4.9 on your server and fix what blocks it. See our Magento installation and setup and managed Magento hosting, or contact us below.

Sources

Installation guides: Magento 2.4.9 on Ubuntu Mage-OS Hyvä
Spotted a mistake on this page? Tell us and we will fix it right away.

Free Site Audit

Send your store details. We check speed, security and extensions, then reply with three quick wins within 3 working days.

Let's talk

Get a quote

Tell us about your store and we’ll reply within one working day. Prefer to chat? Say hello from WhatsApp

MageBooster Book a UnoPim demo See UnoPim live with products like yours. A new PIM or a move from Akeneo: we reply with a plan, a timeline and a quote.
✓ Official UnoPim partner✓ AI agent set up for your team✓ Connected to Magento
MageBooster Start your Hyvä project From scratch or from your current store. We reply with a project plan, a timeline and a quote.
✓ Design and structure by us✓ Hyvä-optimised server✓ Bonus modules included

MageBooster

Let us get in touch with you

Leave your details and your store address. We look at your store first and contact you within one business day, by phone, WhatsApp or email, whichever you prefer.

Partner with us