Generally, PrestaShop back office error 500 happens when trying to access the Back-office while Debug mode is active or while production mode active.
The characteristic of this error is that it only occurs in one of the modes and not in both.
Most PrestaShop administrators experiences this issue when starting an update of the website theme or modules from your PrestaShop online store.
Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to resolve related Prestashop errors.
Usually, this error is seen in PrestaShop Stores Version 1.7 and that makes it impossible for us to enter the Back-office, showing an error 500 or the page goes blank.
Below are some of the most common error messages seen:
1. "Error 500 (Internal Server Error)".
2. "Error 500 – Internal server error".
3. "Internal server error".
4. "HTTP ERROR 500"
5. "Error 500"
6. "HTTP Error 500"
Common causes for PrestaShop back office error 500 are given below:
1. Permission error
2. Incorrect configuration of the .htaccess file
3. Waiting time has expired
4. Obsolete modules
In PrestaShop 1.7 stores, unlike version 1.6, a series of cache files are created located in two "prod" (production mode) and "dev" (Debug mode) folders, depending on the PrestaShop mode being used.
These cache files help to speed up PrestaShop in each of the chosen modes.
We can find these files in the following two directories depending on the Version of PrestaShop:
/app/cache/
/var/cache/
If a programming code error exists, it will be written to the cache files corresponding to the mode that is currently being used.
We can activate our web host's FTP or CPanel error reports in the PrestaShop shop.
There are 2 ways to enable these reports, depending on the version we are using:
a. PrestaShop v1.4 to v1.5.2
1. Firstly, open config/config.inc.php
2. And find the line: @ini_set(‘display_errors’,’off’);
3. We need to replace it with: @ini_set(‘display_errors’,’on’);
b. PrestaShop v1.5.3 and later versions (including 1.6 and 1.7)
1. Firsly, open config/defines.inc.php
2. And find the line: define(‘_PS_MODE_DEV_’, false);
3. Replace it with: define(‘_PS_MODE_DEV_’, true);
Finally, we can browse our store’s front or back office to find out the issue.
Once the source of the problem is known, basically the solution is to clean and delete all PrestaShop cache files that contain the two folders “dev” and “prod”.
Generally, these files do not get automatically deleted from the “Empty cache” option. Hence we need to remove or clean it manually.
Here, you will see the method in order to fix the PrestaShop back office error 500.
1. Fixing Permission error
In many cases, this error occurs due to wrong folder permissions.
To correct this error, we need to set the folder authorization to 755 instead of 777 (or vice versa).
2. Correcting configuration of the .htaccess file
Internal server problems like 500 errors often arise when we configure the .htaccess file wrongly.
In PrestaShop, the problems are generally will be related to URL re-writing options and activating "friendly URLs".
We can back up the .htaccess file and restore it from the back office or disable friendly URLs.
A .htaccess file's format is very strict and even an incorrect character or command could cause an internal 500 server error.
Therefore, from the "friendly URLs" option, indicating "NO" could be a solution (do not forget to save the changes).
3. How to fix 'Waiting time has expired' ?
Each server has its own waiting time, which determines how long a script will run.
If the function or script exceeds this time limit, we will receive a 500 error.
Here are the PrestaShop scripts that may take too long to load:
1. Importing CSV files
2. Backup files
3. Loading translations
4. Import/export
5. Regenerating miniature views
Generally, the server time limit is 30 seconds, which is not enough for these scripts.
If it is not so, we can ask our hosting provider to change this setting at least temporarily.
4. Reviewing addons to fix Obsolete modules
While updating the shop from version 1.6 to version 1.7, we may encounter obsolete modules or modules that are incompatible with this new version of PrestaShop.
This may also generate 500 errors.
We need to review all the Addons we have previously installed or at least those that are available in a more recent version.
So that we can find out what causes the incompatibility.
This article covers methods to resolve PrestaShop back office error 500.
The error happens when the Back-office is accessed only from Debug mode activated or in production mode activated. The characteristic of this error is that it only occurs in one of the modes and not in both.
Also, this is an error that is occurring ONLY IN PRESTASHOP STORES VERSION 1.7, and that makes it impossible for us to enter the Back-office, showing an error 500 or the page goes blank.
That's why we call it a critical mistake, for leaving the store inoperative.
To fix a HTTP 500 error on PrestaShop online store website:
You can activate your web host's FTP or CPanel error reports in your PrestaShop shop.
1. From PrestaShop v1.4 to v1.5.2
i. Open config/config.inc.php
ii. On line 29, you will find this line: @ini_set('display_errors','off');
iii. Replace it with: @ini_set('display_errors','on');
2. PrestaShop v1.5.3 and later versions (including 1.6 and 1.7)
i. Open config/defines.inc.php
ii. On line 28, you will find this line: define('_PS_MODE_DEV_', false);
iii. Replace it with: define('_PS_MODE_DEV_', true);
Once error reports from the FTP or CPanel are activated, you can browse your store's front or back office to find out what the problem is.
More about Server error 500:
Error 500 means Internal server Error. Whenever a 500 error occurs, the task to return information by the server to the web browser will stop.
Therefore, as we mentioned above, this is a critical error that would leave the website inoperative.
The 500 errors, as we noted above, are internal server errors and their origin may be in a programming code error on any item that is included and related to the request for information returned by the server to the web browser.
Therefore, not all 500 errors come from the same source.