In short: An error 500 only means that Shopware ran into an error while delivering the page. The actual cause is almost always in a log file: in the Shopware log under var/log or, if Shopware does not even start, in your hosting provider's PHP or web server log. The most common triggers are a plugin after an update, a changed PHP version, an incomplete Shopware update or a full disk.
What an error 500 means
Status code 500 means "Internal Server Error". The server is saying: the request was fine, but something went wrong while processing it. In production, Shopware deliberately does not show the actual error message in the browser so visitors do not see technical details. That is why reloading the page again and again does not help. The answer is in the logs.
Step 1: Write down the last change
Before you touch anything, note what changed last. In my projects, an error 500 almost always goes back to one of these events:
- a Shopware or plugin update
- a newly installed or activated plugin
- maintenance or an update at the hosting provider, for example a new PHP version
- a move to another server
- a configuration change, for example in the
.envfile
If you know what happened last, you usually already have half the cause.
Step 2: Read the logs
Shopware writes errors to log files in the var/log directory of your installation. The file name starts with the name of the environment, in production usually prod, and the files are rotated regularly. Open the newest file and look for entries with CRITICAL or ERROR at the time of the outage. Shopware describes how logging is set up in its logging documentation.
If there is nothing relevant there, Shopware probably did not start at all. That happens with a wrong PHP version, too little memory for PHP or a syntax error in a file. In that case you will find the message in the PHP error log or the web server's error log. Where those logs are is usually shown in your hosting provider's customer area.
Do not simply switch on debug mode in the live store. It shows error details publicly and writes very large logs. If you need it briefly, use it in a targeted way and switch it off again right away.
Step 3: Classify the error message
The message in the log usually tells you where to look:
- A plugin's class or namespace name appears in the message: the plugin is very likely the trigger, often after an update of Shopware or of the plugin itself.
- Messages about PHP functions or syntax that used to work: the hosting provider has probably changed the PHP version. Check which PHP version your Shopware version requires.
- Database errors, such as missing tables or columns: the migrations did not run completely after an update.
- Database connection errors: credentials or the server have changed, for example after a move.
- Messages about write permissions or disk space: the disk is full or Shopware can no longer write to
var/.
Step 4: Switch off the trigger in a targeted way
Make a backup of the database and files before every intervention. Then, depending on the cause:
Plugin as the trigger: bin/console plugin:list shows all plugins and their status. bin/console plugin:deactivate PluginName switches off the affected plugin, then clear the cache with bin/console cache:clear. You will find these commands in Shopware's command reference. Keep in mind: a deactivated plugin is then missing from the store. For payment or shipping methods you need to check whether checkout still works sensibly without it.
Incomplete update: if database and code do not match, the update has to be finished cleanly. I describe how in the article Shopware update failed: store stuck in maintenance mode.
PHP version: set the PHP version in your hosting provider's customer area to one your Shopware version supports. This is often the quickest fix when the provider switched without notice.
Disk space or permissions: free up space, for example by removing old backups or logs, and check the write permissions on var/. Then clear the cache.
What you should not do
- Do not delete files at random. The cache in
var/cachecan be cleared, everything else only with a plan. - Do not edit the plugin's code directly. The next plugin update overwrites the change and the error comes back.
- Do not restore the whole system from an old backup without thinking. Orders and customer accounts since the backup will be lost.
Checklist
- Write down the last change
- Read the newest log file in
var/log, otherwise the PHP and web server log at the hosting provider - Classify the message: plugin, PHP version, database, disk space
- Make a backup
- Switch off or correct the trigger, then clear the cache
- Test home page, product page, cart and checkout
- Write down what happened so it does not happen again at the next update
How to avoid the next outage
Most errors 500 I see would have shown up beforehand in a test update on a copy of the store. Those who apply updates regularly in small steps and test them first have far fewer emergencies. That is exactly what my Update package is for. If the update depends on a plugin that is no longer maintained, plugin porting helps.
Frequently asked questions
Do I lose orders during an error 500?
As long as the store shows the error, customers cannot order. Orders that were already saved remain in the database. After the fix, it is important to check whether payments came in for which no order was created.
Is clearing the cache enough?
Sometimes, for example after an aborted deployment. If the error comes back afterwards, the cause lies elsewhere and the logs are the next step.
When should I get help?
When you have no access to the server and logs, cannot classify the message, or the store has been down for more than an hour. Then emergency help is usually cheaper than more hours of downtime.