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 );

Server and Sites monitoring

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.

WP 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 WP 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 WP Edition

5 Comments

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

  2. 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.

  3. Wonderful blog. I am looking for that kind of stuff. Now i am facing some problem with bmp file error, can anybody help me out?

    • Louis Vanfraechem
      Louis Vanfraechem Moderator

      Hi Rubi,

      Thank you for the kind words. Regarding your question, we suggest addressing the issue to the forum, where you can easily explore a variety of topics, and make use of the experience of our friendly community.

Add a Comment

Your email address will not be published. Required fields are marked *

GET LATEST NEWS AND TIPS

  • Yes, please, I agree to receiving my personal Plesk Newsletter! WebPros International GmbH and other WebPros group companies may store and process the data I provide for the purpose of delivering the newsletter according to the WebPros Privacy Policy. In order to tailor its offerings to me, Plesk may further use additional information like usage and behavior data (Profiling). I can unsubscribe from the newsletter at any time by sending an email to [email protected] or use the unsubscribe link in any of the newsletters.

  • Hidden
  • Hidden
  • Hidden
  • Hidden
  • Hidden
  • Hidden

Related Posts

Knowledge Base

Plesk uses LiveChat system (3rd party).

By proceeding below, I hereby agree to use LiveChat as an external third party technology. This may involve a transfer of my personal data (e.g. IP Address) to third parties in- or outside of Europe. For more information, please see our Privacy Policy.

Search
Generic filters
Exact matches only
Search in title
Search in content
Search in excerpt