Follow

White Screen of Death (Blank Page)

Troubleshooting the WordPress White Screen of Death (WSOD).

 

So what causes WSOD.

  1. An error being generated by a plugin.

  2. An error being generated by a theme.

  3. Some type of database error.

  4. PHP memory limit being reached.

  5. WP core being corrupted.

 

A WSOD on a WordPress site can be caused by a number of things, but a common cause is a recently updated theme or plugin.

To see the actual cause of a WSOD, enable WP_DEBUG"

define( 'WP_DEBUG', true );

Just add this into the wp-config.php file right after the “That’s it stop editing” message is displayed.

https://codex.wordpress.org/Debugging_in_WordPress

https://codex.wordpress.org/WP_DEBUG

 

So now that you have debugging enabled in wp-config.php.

You need to understand what the debug results mean. So the error reference will show a path to a theme or plugin and the line of that file.

So if the case that an event plugin was just updated on the site, but the current version of that plugin has a issue.

You can try to fix this by reverting the plugin to a previous version using this command.

https://wp-cli.org/commands/plugin/update/

wp plugin update plugin-slug --version=2.6.7 --force

Where 2.6.7 is the previous version of the plugin causing the trouble. This forces an forced update to the specific version of the plugin.

 

Example of a plugin issue on a site

Warning: require_once(/www/wp-content/plugins/the-events-calendar/src/Tribe/Main_new.php): failed to open stream: No such file or directory in /www/wp-content/plugins/the-events-calendar/the-events-calendar.php on line 33

Fatal error: require_once(): Failed opening required '/www/wp-content/plugins/the-events-calendar/src/Tribe/Main_new.php' (include_path='.:/usr/share/php') in /www/wp-content/plugins/the-events-calendar/the-events-calendar.php on line 33

 

So if the issue is with the active theme, change to a default theme such as Twenty Seventeen and then see if the WSOD issue has gone away.

https://wordpress.org/themes/twentyseventeen/

So if using a default theme on the site fixed the issue with WSOD, then the issue is with the active theme on the site.

Check to see if the theme has been recently updated. You can use the Same approach as plugins to force it back to a specific version.
This does not work for premium themes.

Updating the theme should fix the issue. If the site was using a child theme, then updating the parent theme will not cause any customer customizations to be lost.

Example error message

Parse error: syntax error, unexpected $end in /home/name/public_html/wordpress/wp-content/themes/your_theme/functions.php on line 231

 

So if WP Debug show that the issue was with an active plugin, then to look which plugin the issue is in.

The first simple fix is to rename to active plugin which is causing the issue to say pluginname_inactive in the wp-content plugins folder.

Then refresh the website in the browser and see if the site now loads.

So after finding that a specific plugin caused the issue. Check on the repo if there is an updated version of the plugin if the plugin was on the WP repo. Reload the plugins screen in WP Admin, the plugin will show as being inactive. Then rename the plugin folder back without the _inactive. Then update the plugin from the plugins screen.

 

There might be a plugin which needs more resources, so the set memory may not be enough. Since it might have caused the memory to be depleted.

So in PHP.ini the memory on certain plans can be increased from the default.

memory_limit = 128M ; Maximum amount of memory a script may consume (64MB)

 

If the WSOD issue was not being caused by a plugin, theme, memory or database issue. Then the next step is to update WordPress core.

This can be done manually by downloading WordPress, extracting the zip file and then sFTP in and manually update WP or you can do so from WP-CLI.

http://wp-cli.org/commands/core/update/

wp core update

or

wp core update --force

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk