White screen error for a custom theme

This answer will be long, but can be helpful in some way.

First of all, detect why you’re getting this error:

Majority of the time when you see a WordPress’ White Screen of Death, it means that you exhausted the memory limit of your server settings.

This could be caused by a plugin that you may be using that is not functioning properly.

It could also be caused by a poorly coded theme that you are using – usually free themes download on the web.

It could also mean that there is an issue with your web hosting server.

Since the problem can be caused by any number of things, it may require a lot of troubleshooting.

Detect if the problem occur in other WordPress websites:

If you have multiple sites, then the first thing you should do is to make sure that the white screen of death is happening across the board or just on this one domain.

If the issue is with all of your sites, then it is a strong indicator that your web hosting provider is having some issues.

However, if the issue is only with one of your sites, then this could be an issue with a plugin or theme that you are running. If the issue is only happening with a single post or page, then you know it is definitely a problem with your specific site.

If possible, increase the Memory Limit:

Usually this issue happens because your memory is being exhausted.

If increasing the memory limit did not help, or if you have a high memory limit like 256M or 512M, then you need to start troubleshooting. In our experience of troubleshooting this issue, we have always found that the issue is either with a specific plugin or a theme. Go ahead and disable all the plugins.

If this fixes the issue, then enable one plugin at a time to get to the bottom of the issue.

Try to replace Theme with a Default Theme and see if the problem persists:

If the plugin troubleshooting doesn’t fix the issue, then you should try replacing your current theme with a default twenty ten theme.

The best way to do this is by backing up your theme folder. Then deleting the theme. WordPress will automatically fall back to the default theme.

Alternatively, you can go in your phpMyAdmin and update the database tables in wp_options table. The following table names would have to be updated:

template, stylesheet, and current_theme. Change the value to twentyeleven.

If this fixes the issue, then you should look at your theme’s functions.php file.

If there are extra spaces at the bottom, then you should consider fixing it.

If you are using a poorly coded function in your theme’s functions.php file, then it can cause this as well.

Debug your code:

If none of the above fixes it, then you should try to re-install a fresh copy of WordPress. While it is unlikely, but it is always possible that a core file may have been corrupted.

You can also use the WordPress debug function to see what type of errors are being outputted. Add the following code in your wp-config.php file.

define( 'WP_DEBUG', true);

Once you add this, the blank screen will now have errors, warnings, and notices generated by PHP. These may be able to help you determine the root cause of the problem.

Make sure you’re running on a Linux server:

WordPress usually don’t work well on servers running Windows – so make sure you’re using a server running Linux (this can be checked with your hosting company).

Leave a Comment