Skip to content
Technology for businesses since 2008

Help center · WordPress

WordPress 500 error or white screen: how to find the cause and fix it

A 500 error or white screen on WordPress almost always comes from a PHP error: a faulty plugin or theme, an .htaccess file with an invalid rule, running out of memory, or an update that didn’t finish. The fastest way to fix it is to find the cause in the error log and, if the WordPress dashboard won’t open, disable the plugins from cPanel’s File Manager.

This article follows the order that usually works: first read the error message, then test the most common causes, from most likely to least likely.

Before you start

  • You need access to your hosting’s cPanel. The WordPress dashboard may be down, and that’s fine.
  • Before changing any file, download a copy of it or rename it instead of deleting it. That way, every step can be undone.
  • If the site is a store that is selling, let your team know: make each change calmly, one at a time, and test the site after each one.

500 error and white screen: what’s the difference?

What you see What it usually means
Page with “Error 500” or “Internal Server Error” The server ran into a problem and didn’t show details. It can be PHP or the .htaccess file
Completely white page, no message A PHP fatal error with error display turned off, which is normal on a live site
“There has been a critical error on this website.” WordPress caught a PHP fatal error. It usually emails the administrator with the plugin or theme involved
Only the dashboard (/wp-admin) is down Usually a plugin or the theme used by the dashboard
Only one page is down A block, plugin, or code tied to that page

In the first three cases, the path is the same: find the error message.

Step 1: check the WordPress email

When WordPress detects a fatal error, it sends the administrator’s email a message titled “Your site is experiencing a technical issue”, with the name of the plugin or theme that caused the error and a link to enter recovery mode. Also check your spam folder. If you find the email, you already know what to disable and can skip to step 4.

Step 2: read the error log

The error log says exactly which file and which line failed.

  1. Log in to cPanel and open File Manager.
  2. Go to your site’s folder. On a main domain, it’s usually public_html; on an addon domain, it’s the folder created for that domain.
  3. Look for a file named error_log in that folder and in the wp-admin and wp-content folders. If it exists, open it and read the last lines, which are the most recent.
  4. If your cPanel has the Errors option (in the Metrics section), it shows the latest lines of the domain’s log without you having to look for the file.

What the messages mean:

Log excerpt What it means
PHP Fatal error: ... in /wp-content/plugins/plugin-name/... The error is in that plugin. Disable it (step 4)
PHP Fatal error: ... in /wp-content/themes/theme-name/... The error is in that theme (step 5)
Allowed memory size of ... bytes exhausted PHP ran out of memory (step 7)
Call to undefined function ... A plugin or theme is using a function that doesn’t exist in the PHP or WordPress version in use
Parse error: syntax error Code with a typo, common after pasting a snippet into functions.php
.htaccess: ... Invalid command or RewriteRule ... not allowed here An invalid rule in the .htaccess file (step 6)

Save the entire message: it’s what support will ask for, and what you can paste into a search.

Step 3: if there’s no log, turn on debug mode

WordPress has a debug mode that writes errors to a file without showing them to visitors.

  1. In File Manager, open wp-config.php with the Edit option. Download a copy first.
  2. Look for the line define( 'WP_DEBUG', false );. If it doesn’t exist, use the spot just above the comment /* That's all, stop editing! */.
  3. Change or add these lines:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
  1. Save and reload the site to reproduce the error.
  2. WordPress creates the debug.log file inside wp-content. Open it and read the last lines, as in step 2.

Setting WP_DEBUG_DISPLAY to false keeps the error from appearing on screen for visitors. When you’re done, set WP_DEBUG back to false and delete debug.log, because it may contain paths and server information.

Step 4: disable plugins from File Manager

A faulty plugin is the most common cause. Since the dashboard may be down, disable plugins by their folders:

  1. In File Manager, open wp-content.
  2. Rename the plugins folder to plugins-disabled. WordPress then treats all plugins as deactivated.
  3. Open the site. If it’s back, the cause is one of the plugins.
  4. Rename the folder back to plugins. The plugins stay deactivated, but now they appear in the dashboard.
  5. Go to Plugins in the dashboard and activate them one at a time, opening the site after each activation. When the error comes back, the last plugin you activated is the culprit.
  6. Keep that plugin deactivated, look for a newer version, and check that it’s compatible with your WordPress and PHP versions. If the log already pointed to the plugin, you can rename just that plugin’s folder inside plugins, without touching the others.

If the site has an important plugin (a store, a form, a cache), note beforehand which ones were active and their settings. When you deactivate everything at once, some plugin settings may not show up until the plugin is reactivated.

Step 5: test the theme

If the site didn’t come back with the plugins disabled, or if the log points to the theme:

  1. In wp-content/themes, rename the active theme’s folder, for example mytheme to mytheme-disabled.
  2. Open the site. WordPress switches to a default theme (such as Twenty Twenty-Five), if one is installed in the themes folder.
  3. If the site came back, the problem is in the theme. Check whether there’s an update, or whether someone recently changed its functions.php.

If no default theme is installed, WordPress shows a message that the theme wasn’t found. In that case, download a default theme from wordpress.org/themes and upload its folder to wp-content/themes.

Step 6: test the .htaccess file

The .htaccess file stores WordPress address rules and sometimes cache, security, and redirect rules. An invalid rule causes a 500 error across the whole site.

  1. In File Manager, click Settings (top right corner) and check Show Hidden Files. The .htaccess file is in the same folder as wp-config.php.
  2. Rename .htaccess to .htaccess-old.
  3. Open the site. If the 500 error is gone, the problem was a rule in the file.
  4. Log in to the WordPress dashboard, go to Settings > Permalinks, and click Save Changes without changing anything. WordPress creates a new .htaccess with the default rules.

To see what the default file looks like and how to recreate it by hand, see WordPress .htaccess: how to find and create the default file. If the old file had your own rules (redirects, for example), compare the two and restore only what you need, one rule at a time.

Step 7: increase the memory limit

If the log shows Allowed memory size ... exhausted, PHP has hit the site’s memory limit. One way to raise it is in wp-config.php, above the comment /* That's all, stop editing! */:

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

The value that ends up applying is the one your hosting allows: WordPress can’t go past the server’s limit. If changing wp-config.php doesn’t help, the PHP limit needs to be adjusted in the hosting panel or by support. If a single plugin is consuming all the memory, the right move is to replace or fix that plugin, not just raise the limit.

Step 8: check the PHP version

Older plugins and themes can break on newer PHP versions, and newer ones on older versions. If the error appeared right after a PHP version change, switch back to the previous version in cPanel (under Select PHP Version or MultiPHP Manager, depending on your panel) and check whether the site comes back. Then update the plugins and theme so they work with the current version, and try again.

Step 9: restore from a backup

If nothing above worked, or if the error appeared after an update that didn’t finish, restore a recent copy of the site and database. Before restoring, download the current files and database, even though they’re faulty, in case you need to look for something in them later.

After the site is back

  1. Set WP_DEBUG back to false and delete debug.log, if you created that file.
  2. Update the plugin or theme that caused the error, or replace it with another one.
  3. Make a full copy of the site now that it’s working.
  4. To keep this from happening again, follow the steps in how to update WordPress, themes, and plugins safely.

If the 500 error appeared out of nowhere, with no update or change, and the log shows files that no one touched, also check whether the site was hacked: see how to use AI to remove viruses from a WordPress site.

When to contact support

Contact your hosting support if the log doesn’t exist or is empty, if the 500 error appears on every site in the account, if you see process or resource limit messages, or if you can’t access cPanel. Bring the error message, the date and time it appeared, and what you’ve already tested. If the site is critical and you’d rather not touch the files, get in touch with MigraCloud.

Frequently asked questions

What does error 500 mean in WordPress?

It’s a generic server response meaning “something went wrong, and I can’t say what.” In WordPress, the real cause almost always shows up in the error log: a faulty plugin or theme, an invalid rule in .htaccess, lack of memory, or an incompatible PHP version.

How do I disable plugins without logging in to the WordPress dashboard?

Through cPanel’s File Manager, in wp-content. Rename the plugins folder to another name (for example, plugins-disabled) to disable all of them, or rename just one plugin’s folder. Then restore the original name and activate the plugins one at a time from the dashboard.

Where is the WordPress error log?

In an error_log file, created by PHP in the site’s folder and in the wp-admin and wp-content folders, or in cPanel’s Errors option. If you turn on debug mode with WP_DEBUG_LOG, WordPress also creates debug.log inside wp-content.

Is a white screen in WordPress the same as a 500 error?

It’s usually the same cause: a PHP fatal error. The difference is that with a white screen, the server didn’t return the 500 code and the error wasn’t displayed. The error log and debug mode solve both cases.

Is it safe to leave WP_DEBUG turned on?

Not on a live site. It’s meant for finding the problem and should go back to false when you’re done. If you leave it on, keep display turned off (WP_DEBUG_DISPLAY set to false) and delete debug.log afterward, because it reveals server paths.

The error appeared after I updated a plugin. What do I do?

Rename that plugin’s folder in wp-content/plugins to deactivate it, then open the site. If it comes back, look for a newer version of the plugin, or restore a copy from before the update and wait for a fix. In the future, make a copy of the site before each update.

Did I lose my content when I disabled the plugins?

No. Deactivating a plugin doesn’t delete pages, posts, or the database. What may temporarily disappear are features that depend on the plugin, such as forms, blocks, and the store, which come back when the plugin is reactivated.

More on WordPress

See all →

Help center

Looking for something else?

See all tutorials, organized by topic.