WordPress 500 Internal Server Error

WordPress 500 Internal Server Error: What to do

WordPress has grown to become one of the most popular content management systems available today, powering millions of websites. Trusted by bloggers and corporations because of its extreme versatility, huge support base – and it doesn’t cost a thing. Still, it sometimes throws up errors that can be a challenge to fix, even after using the documentation available. One such error is “WordPress 500 Internal Server Error.”

It’s quite common and can keep your site offline if you don’t fix it. Just follow the steps below and you should be back up and running in no time. And please note that any time you’re thinking of making changes, back up your WordPress site and its MySQL database. It’s always best to ensure you can recover your site if something goes wrong.

Enable debugging to fix WordPress internal server error

Debugging is always going to be a part of working with PHP. And WordPress comes with its own systems which simplify the process. You can enable debugging in WordPress by connecting to your server via FTP/SFTP or SSH. Once you’re in, edit the wp-config.php file. Just before the /* That’s all, stop editing! Happy blogging. */ line, add these lines:

define('WP_DEBUG', true);

define('WP_DEBUG_LOG', true);

WP_DEBUG is a PHP constant which triggers the debug mode in WordPress. WP_DEBUG_LOG ensures that all errors are saved in a log file called debug.log.

Save the configuration file and then whichever WordPress operation caused the WordPress 500 Internal Server Error, do it again. Look in the /wp-content/ directory. Locate the debug.log log file and check it for PHP errors, warnings, and notices. If you find any you can attempt to fix them.

You should ideally have the following code in your wp-config.php file:

Enable WP_DEBUG mode:

define( 'WP_DEBUG', true );

Enable Debug logging to the /wp-content/debug.log file:

define( 'WP_DEBUG_LOG', true );

Disable display of errors and warnings:

define( 'WP_DEBUG_DISPLAY', false );

@ini_set( 'display_errors', 0 );

Use dev versions of core JS and CSS files (only needed if you are modifying these core files):

define( 'SCRIPT_DEBUG', true );

Increase PHP memory limit in WordPress to fix internal server error

One of the most common causes for the 500 Internal Server Error message is hitting the PHP memory limit. This is normally set in the php.ini file, so you can try increasing the  memory_limit in php.ini and restart your Apache HTTP server / PHP-FPM service. Alternatively you can add the following line in your wp-config.php file:

define('WP_MEMORY_LIMIT', '64M');

In case your application is struggling under multiple active plug-ins and a heavy theme, you can add memory by increasing the value here.

Create new .htaccess file

The .htaccess file can easily become corrupted by a bad plugin or manual changes. Log in to your server via FTP/SFTP or SSH and rename the file to .htaccess.BAK or .htaccess.CORRUPTED. Then create a new .htaccess file with the basic .htaccess settings.

Deactivate all plugins in WordPress to fix internal server error

If none of these approaches works, it may help to deactivate all your WordPress plugins. Go to the WordPress dashboard and find the Plugins section, then deactivate them, one at a time. Each time you do this, you can refresh your site and then check to see if the problem has been solved.

If you don’t have access the WordPress dashboard you can still deactivate the plugins via FTP/SFTP or SSH. Log in to your server, go to your wp-content directory and rename the plugins directory to plugins.DEACTIVATED. Alternatively, you can go to the plugins directory and deactivate each plugin one by one. Do not forget to enable the plugins once you are done by renaming the plugins.DEACTIVATED directory to plugins again.

With any luck, one of these solutions will have helped you to fix the WordPress 500 Internal Server Error. But if not, contact your web hosting provider for assistance.

WordPress Toolkit under Plesk Onyx – say goodbye to 500 internal server error

Hopefully this has helped and increased your understanding of WordPress. You can make your WordPress site faster and more reliable using the Plesk Onyx WordPress Toolkit extension. It’s available as part of the Plesk Onyx hosting platform for your virtual or dedicated server. We designed it to simplify common tasks like configuration and routine management, and to make fixing issues like WordPress 500 internal server error much easier.

Use Plesk WordPress Edition

How useful was this post?

Click on a heart to rate it!

Average rating 2.8 / 5. Vote count: 12

No votes so far! Be the first to rate this post.

Oh no, sorry about that!

Let us know how we can do better below

Tell us how we can improve this post?


Elvis Plesky
Our fun and curious team mascot's always plugged into the latest trends. He's here to share his knowledge and help you solve your tech problems.
    Showing 3 comments
    • Avatar

      Nice article.
      I have to face dll file error for a long time.
      Can you please help me out?

      • Debbie from Plesk
        Debbie from Plesk

        Hey sunaina,
        Have you been in touch with our support with your query?

    • Avatar
      Erica S Terner

      Well, this is nice information! Thanks for sharing this as it would help many users to know about important information about WordPress. Knowing about this, we are looking forward to implementing things accordingly.

    Leave a Comment

    Start typing and press Enter to search