Gå direkt till huvudinnehållet

WordPress Hjälp

Fix a WordPress internal server error

An internal server error (ISE), also known as a 500 error, is a generic error message that appears when your WordPress site cannot be displayed. In older versions of WordPress, an ISE can also appear as a blank white page without any error details. The error can happen for a variety of reasons, but it’s usually caused by a conflict with WordPress, a plugin, a theme, or one of the site’s control files. This most commonly happens after an update.

Finding the cause of an ISE and then resolving it is often a matter of trial and error. So below are some of the ways you can find the cause of the error with links to articles that will take you through each process and describe how to fix it.

Note: This article covers advanced troubleshooting methods, which include connecting to your hosting with an FTP app, editing or disabling files, and making changes in the database. If you don't want to fix this error yourself, our WordPress Premium Support team can do that for you.

Warning: Always make a backup of your site before troubleshooting or making any changes.

Disable your .htaccess file

One of the most common causes of an ISE is a corrupt .htaccess file. The .htaccess is a control file that WordPress uses to communicate with the server. WordPress, plugins, and themes often make changes to this file, which can sometimes corrupt the file.

When troubleshooting an ISE, start by disabling your .htaccess file and then visit your site in a private browsing mode (Chrome / Firefox / Edge). If the error is gone, reset your permalinks to create a new .htaccess file automatically.

Note: The .htaccess file is hidden by default in some file managing apps. If you use cPanel or FileZilla, make sure to enable the option to show hidden files if you don’t see the file.

Increase your memory limits

Your hosting account assigns a set amount of its memory to running PHP, which is necessary for your WordPress site to function. Due to your site's size or the number of plugins it uses, the site may require more than the default PHP memory.

To do this, connect to your hosting account with FTP and increase the WordPress memory limit in the wp-config.php file (if your site is not on Managed WordPress hosting, skip step 1).

If increasing the WordPress memory limit didn't help, try increasing the PHP memory limit to 256M or 512M.

Disable all your plugins

WordPress plugins can cause a conflict with one another, with an active theme, or with your version of WordPress, which can lead to an ISE. This is more likely to occur after you update WordPress, the active theme, or one of your plugins.

To check if an issue is caused by plugins, in the wp-content folder, rename the plugins folder to plugins.renamed and visit your site in a private browsing mode. If it loads correctly, the issue is caused by one of your plugins. If the error persists, something else is causing it.

Rename the folder with plugins back to plugins and continue investigating the issue. If it's caused by plugins, start disabling individual plugins to figure out which one is causing the error..

If you want to continue using the problematic plugin, upload the latest version of the plugin with FTP and then enable it. This will update the plugin. If updating doesn't work, try the following:

  • Search for the plugin in the WordPress plugin repository on wordpress.org. On your plugin's homepage, select View support forum. Search the forum for a solution specific to your issue.
  • If you purchased your plugin from somewhere else, review the documentation provided by the plugin's developer.

Re-upload WordPress core files

Note: If your site is on Managed WordPress hosting, skip this section because WordPress core files come preinstalled with the hosting plan. They are automatically updated to keep your site secure, and you can't replace them with FTP.

In some situations your WordPress core files can be corrupted during an update, causing the internal server error. Try re-uploading WordPress core files to make sure they are not causing the issue.

Download the same version of WordPress you currently use from the WordPress repository, unzip it on your local computer, connect to your hosting account with FTP, and transfer (overwrite) the wp-admin and wp-includes folders.

Note: If you're not sure which WordPress version your site uses, you can check in the wp-version.php file found in the wp-includes folder.

Switch to a default WordPress theme

If the options above didn’t help fix the issue, your theme might be causing the conflict. To test, you can change to one of the default WordPress themes, like TwentyTwenty or TwentyTwentyOne.

Note: If you don't have a default WordPress theme installed, you can install it with FTP and then activate it in the database.

If your site loads properly after switching to the default theme, you can update your normal theme to the latest version and activate it.

If updating the theme doesn't work, try the following:

  • Search for the theme in the WordPress theme repository on wordpress.org. On your theme's homepage, select View support forum. Search the forum for a solution specific to your issue.
  • If you purchased your theme from somewhere else, review the documentation provided by the theme's developer.

More info