Latest News

the latest news from our team

How to properly Track down „Error 500“ messages

How to properly Track down „Error 500“ messages

Recently I was working on a wordpress site on a Strato hosting and got some weird compatibility issues with an important plugin (Events Manager). I had a hard time figuring out what the problem was – the only thing I could see was an error 500 when turning it on.  Long story short: Here is how to properly  track down the error message and solve the issue. At least it workes in my cause, let me know if it did in yours!

First try is to enable the wordpress internal debugging! It is really great! Edit your wp-config.php file and add these lines:

define( 'WP_DEBUG', true);
define( 'WP_DEBUG_DISPLAY', true );
define( 'WP_DEBUG_LOG', true );

If this did not yet help, continue as follows:

  1. Connect via ftp as root to your server
  2. Open the php.ini file to make sure error reporting is properly set to even log error 500 messages (which it usually does not do for php)
    1. Locate your php.ini file. On my Strato hosting it was here:
      /etc/php.ini 

      but it could also usually bere found here.

      /etc/php5/apache2/php.ini
    2. Search for
      display_errors = Off

      Change it to:

      display_errors = On
    3. Some lines below find:
      ;display_startup_errors

      Change it to:

      display_startup_errors = On

      That line might be commented out like in my preview by a semicolon. simply remove the semicolon and change the line. Be sure to put the semicolon back in after tracking down the issue, cause error reporting might slow down your server a lot.

    4. Also make sure taht logging is set to on as well, so if you find:
      log_errors = Off

      or if this line is set to „On“ but disabled with a leading semicolon, change it to

      log_errors = On
    5. Some lines below find:
      ;error_reporting

      Or something similar, be sure to change it to:

      error_reporting = E_ALL
    6. Restart your server or at least restart php and apache.
    7. Do what you did to cause the 500 Internal Server error again, and check the log here:
      /var/log/httpd/error_log (might alsow be faound here: /var/log/apache2/error.log)
    8. At the end of the file you find your problem.
  3. Make sure to return your php.ini to its original state. To maintain server-performance.

FYI: In my case a switched on safe_mode was the culprit. I disabled it in my plesk settings of the corresponding hosting and in the subscription php settings. After another restart the problem was gone.

Find more information about this issue here:

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.