500 Internal Server Error on PrestaShop admin login:
The first step when troubleshooting any application is to check the error logs, in my case all logs are empty, so the next step is to enable debug mode in prestashop:
Open config/defines.inc.php
On line 28, you will find this line: define(‘_PS_MODE_DEV_’, false); – replace it with:
define('_PS_MODE_DEV_', true);
Then go back to the page that was displaying 500 error:
In my case the problem Is causing metrics_page route, so the first thing to do is to temporarily disable it.
To disable a module from the database navigate to PHPMyAdmin and inside the ps_tab table for ps_metrics change the 1 to 0.
To disable a module from the file manager, navigate to modules directory and rename the module name: ps_metrics
Then clear the cache by deleting/renaming the folders var/cache folder:
I can now access the admin section after deactivating the module that was generating the problem.
Why is the root-cause of the error?
I’ve seen a lot of other PrestaShop users talking about the same issues on forums, but the root cause is well explained here: HOW TO PREVENT ISSUES OF PRESTASHOP METRICS MODULE WHEN UPGRADING TO PRESTASHOP 1.7