Skip to content

WordPress

White screen and 500 after a plugin

Rename the last plugin, read debug.log with display off, and fix .htaccess only when PHP is clean.

Updated Aug 29, 20263 min read10 reads

Tags

White screen and 500 after a plugin
Fix a white screen or 500 after a plugin change

A white screen of death after a plugin install or update is usually a PHP fatal error, and a 500 can be the same problem or a broken .htaccess rule. Start with the last plugin you changed, not a full core reinstall. Rename that plugin folder through SFTP or cPanel File Manager, reload the site, and only then turn on logging so you can read the real error.

Rename one plugin folder at a time

Disabling every plugin at once throws away the only clue you had. Open cPanel File Manager, go to wp-content/plugins, and rename the folder you just added or updated by appending .off to the name. Reload the site. If the page still fails, rename the next likely folder the same way. Themes can cause fatals too. Rename the active theme folder and WordPress will fall back to a default theme when one is present.

Enable the debug log and read the first fatal

Once you have narrowed the cause, edit wp-config.php and set WP_DEBUG to true, WP_DEBUG_LOG to true, and WP_DEBUG_DISPLAY to false. Reload once so the error is written, then check the log:

bash
tail -n 40 ~/public_html/wp-content/debug.log

The first fatal line is the one that matters. Memory exhausted is a real fatal, so raise memory_limit only within reason. A plugin that loads hundreds of megabytes in admin is still the bug. Notices from a deprecated plugin mean you should replace it, not hide the log forever. Keep display off when you are done. The debug.log file under wp-content is often web-readable, so deny public access to it or move it.

Check .htaccess if PHP looks clean

A 500 with no PHP fatal is often a bad .htaccess from a security plugin or a leftover rule. Rename .htaccess and load a plain permalink such as /?p=12. If that works, restore a default WordPress .htaccess and flush permalinks in the admin. Avoid pasting a random forum .htaccess that uses php_flag directives, because LiteSpeed on our shared hosting does not handle those the way older Apache setups did.

When the site is back, delete or replace the bad plugin. Do not leave a renamed folder forever without a note. Test the next update of that plugin on staging instead of on production late on a Friday.

Share

Send this article

Need someone else to do this? Send them the link — the commands are in the article.

Tagged

Was this article helpful?

Be the first to rate this article.