Site icon PrestaShop | Magento | CRM Modules

PrestaShop fix 500 error on website

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:

  1. Go to Advanced Parameters > Performance
  2. Enable Debug Mode

Option B: Manually via defines.inc.php

If back office is not accessible:

  1. Open /config/defines.inc.php
  2. Find this line:
    define('_PS_MODE_DEV_', false);
    
  3. 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:

🔸 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

🔸 4. Corrupt .htaccess File

🔸 5. Memory Limit or Execution Timeout

Check your hosting’s PHP error logs for memory exhaustion:

// In config/defines.inc.php
@ini_set('memory_limit', '512M');

✅ Step 3: Check Server Error Logs


✅ 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:


🛠 Optional: Reinstall Core Files (Advanced)

If system files are corrupted:

  1. Download the same PrestaShop version from official site
  2. Upload and replace /classes, /controllers, /override, /src, /tools, /vendor, etc.
  3. Keep /img, /upload, /themes, /modules, /config, and /translations untouched.

 

Exit mobile version