A 500 Internal Server Error in PrestaShop usually means something went wrong on the server, often due to PHP issues, file permission errors, or faulty module/theme code. Here’s a step-by-step guide to identify and fix the issue:
✅ Step 1: Enable Debug Mode
This will show you the actual error instead of a generic 500 message.
Option A: From the Admin Panel
If the back office is accessible:
- Go to Advanced Parameters > Performance
- Enable Debug Mode
Option B: Manually via defines.inc.php
If back office is not accessible:
- Open
/config/defines.inc.php
- Find this line:
define('_PS_MODE_DEV_', false);
- Change it to:
define('_PS_MODE_DEV_', true);
Then refresh your website and note the error message.
✅ Step 2: Common Causes and Fixes
🔸 1. Broken or Incompatible Module
If the error appeared after installing/updating a module:
- Use FTP or File Manager
- Go to
/modules/
and rename the suspected module folder to something likemodule_name_backup
- Reload the site
🔸 2. PHP Version Conflict
PrestaShop 1.7+ is compatible with PHP 7.1–7.4 (1.7.8.x supports up to PHP 7.4)
Make sure your server uses the correct PHP version. You can check it in hosting panel or ask your host.
🔸 3. File Permission Issues
- Use FTP to check file permissions:
- Files: 644
- Folders: 755
- Incorrect permissions may cause a 500 error.
🔸 4. Corrupt .htaccess File
- Rename the
.htaccess
file to.htaccess_old
- Try to regenerate it:
- Back office > SEO & URLs > Save (if accessible)
- Or delete it and regenerate by visiting front office and back office if they load.
🔸 5. Memory Limit or Execution Timeout
Check your hosting’s PHP error logs for memory exhaustion:
- If so, increase memory:
// In config/defines.inc.php
@ini_set('memory_limit', '512M');
✅ Step 3: Check Server Error Logs
- Use cPanel or ask your hosting provider
- Look for the latest log in
error_log
or/var/log/apache2/error.log
✅ Step 4: Restore from Backup (if necessary)
If nothing helps and the error happened after a major change (theme/module/edit), consider restoring a backup of your:
- Database
- PrestaShop files
🛠 Optional: Reinstall Core Files (Advanced)
If system files are corrupted:
- Download the same PrestaShop version from official site
- Upload and replace
/classes
,/controllers
,/override
,/src
,/tools
,/vendor
, etc. - Keep
/img
,/upload
,/themes
,/modules
,/config
, and/translations
untouched.