Available for projects & agency overflow · Quick reply, from the person who does the work

PrestaShop shop stuck on a 500 error or blank page

A blank page or a 500 error on PrestaShop tells you nothing on its own: it's a symptom, not a diagnosis. You need the real error messages to know whether the problem is a module, an override, the database or the server.

Describe my issue Send a message

The situations I handle

  • Completely blank screen when loading the front end or back office
  • 500 error appearing right after a module or PrestaShop update
  • 500 error on certain pages only (product page, cart, checkout)
  • "The file config/settings.inc.php is missing" message after a hosting transfer
  • 500 error triggered after a manual edit to an override file
  • Site works locally but errors once deployed on the production server

How I go about it

  1. Enabling debug mode

    I set _PS_MODE_DEV_ to true in config/defines.inc.php to reveal the real PHP or Smarty error message instead of the generic blank page.

  2. Reading the logs

    I check the server's PHP logs (often in error_log or the Apache/Nginx logs) and, on PrestaShop 1.7/8, the var/logs/ folder, which holds the Symfony errors.

  3. Isolating the culprit

    I disable modules one by one via the ps_module table or FTP, and check the override/ folder for a file conflicting with the core.

  4. Checking the server

    I check the PHP version, active extensions, memory_limit and write permissions on var/cache, var/logs and config, all common causes after a hosting change.

  5. Fixing and clearing the cache

    Once the cause is identified, I fix the file or reconfigure the server, then clear var/cache/prod (or cache/smarty on 1.6) before switching debug mode back to false.

PrestaShop blank page: where it appears tells you where it comes from

Before even reading the logs, note where the blank page or 500 error occurs. It halves the search area.

  • Front office and back office both blank: the failure happens before PrestaShop tells them apart. Look at the configuration: PHP version changed by the host, an incomplete app/config/parameters.php (1.7, 8, 9) or config/settings.inc.php (1.6), an invalid .htaccess, missing write permissions.
  • Back office only: often a cache left over from a previous version in var/cache/, or a module hooked into the admin.
  • Front office only, or a single page: a module attached to a display hook, a theme file, or data specific to that page.
  • Only at checkout: the payment or carrier module, which is only called at that step.

If the page stays blank while _PS_MODE_DEV_ is on, the error happens before PrestaShop has loaded: read the server’s PHP error log, not var/logs.

The most common error messages, and what they point to

  • Cannot declare class … or Cannot redeclare class …: a duplicated override, or one left behind after a module was uninstalled. Deleting the class index — var/cache/prod/class_index.php on 1.7 and later, cache/class_index.php on 1.6 — makes PrestaShop rebuild it.
  • Allowed memory size of … bytes exhausted: PHP’s memory limit has been reached, typically during an import, thumbnail regeneration or indexing.
  • Call to undefined function each() or create_function(): a module written for an old PHP version. Both functions were removed in PHP 8; see moving PrestaShop to PHP 8.
  • SQLSTATE[42S02]: Base table or view not found: a table is missing, after a migration, an interrupted SQL import or a badly uninstalled module.
  • Link to database cannot be established: wrong database credentials in the configuration file, or the MySQL server is down. See database connection error.
  • Permission denied on var/cache or var/logs: write permissions lost, common after an FTP transfer or a change of host.

The most common causes

On PrestaShop, a 500 error is rarely random. The cases I run into most often:

  • A badly written or duplicated override file between override/ and a module, causing a class to be redeclared.
  • A PHP version incompatibility after a hosting upgrade (a module using a function removed in PHP 8, for instance).
  • Missing write permissions on var/cache, var/logs or config after an FTP file transfer.
  • A corrupted .htaccess file or an invalid rewrite rule, breaking routing before PrestaShop even runs.
  • A missing or corrupted database table following a migration or an interrupted SQL import.

On 1.6, the blank page often hides a Smarty error in the compiled cache (cache/smarty/compile) that wasn't cleared after a theme update.

config/defines.inc.php
define('_PS_MODE_DEV_', true);

Related pages

Describe your need in one minute

A few targeted questions so I can reply with an estimate rather than another questionnaire.

impact
declencheur
debug (facultatif)
logs (facultatif)
message (facultatif)
Please provide an email or a phone number so I can get back to you.

Please provide an email or a phone number so I can get back to you.

Frequently asked questions

Am I at risk of losing my orders or customers?
No. The 500 error stops pages from displaying but the database stays intact: existing orders, customer accounts and the catalogue are untouched. It is the PHP execution layer that stops, not the storage.
What access do I need to give you?
FTP or SSH access, database access (phpMyAdmin or direct credentials) and, if possible, access to the host's client area to check the PHP configuration.
How long does the diagnosis take?
In most cases, enabling debug mode and reading the logs is enough to identify the cause in the first working session. It is the kind of block that gets sorted the same day once server access is available; the fix itself depends on what's broken.
Can the error come back after it's fixed?
If it comes from an unstable third-party module, yes, at the next automatic update. I can lock updates on sensitive modules to stop that happening again.
Do I need to restore a full backup?
Rarely. Restoring a backup loses orders and changes made since that date. I generally fix the file or configuration at fault directly instead.
Why does my PrestaShop shop show a blank page with no message at all?
Because PrestaShop hides errors in production: as long as _PS_MODE_DEV_ is false, the details are not displayed. Set it to true for one test. If the page is still blank, the error happens before PrestaShop loads — PHP version, .htaccess, configuration file — and the server’s error log is where you will find it.