Categories
All

White Screen Of Death

While browsing the web you may come across this error multiple times. You will see that you are locked on a white screen with nothing on it. White screen of death is one such error it is caused due to many undesirable reasons.

Many a times you are not able to access your admin due to white screen of death error. It is extremely irritating as you are stuck out of WordPress. Being a WordPress starter you may find it horrible to deal with it. In this article you will be provided with an ultimate answer to your problem.

Note: Before making any WordPress changes, you must have your website’s backup.

Reasons
  1. PHP code faults
  2. Overcrossing memory limits
  3. Defective theme/plugin
  4. Issues with updates
  5. Problem with ownership/permission
  6. Enable debugging
Solution

1. PHP code faults

The very first thing to do is to examine and go through your websites PHP code. After finding an error with your code you can simply fix it or take help from your trusted developer. If you find no fault in your code the the problem could be something else.

1. PHP code faults

2. Overcrossing memory limits

 

One of the reasons for having a white screen can be due to crossing your memory limits. You may increase or add more memory to your application. It can be done by adding the following line to your wp-config.php file.

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

To increase your memory limit you of few other choice

1.Use your .htaccess file in the WordPress root directory and add the code given below

 php_value memory_limit 64M

2.Use your php.ini file and add the code given below anywhere in your file

memory_limit = 64M

3. Defective theme/plugin

Even after making the following changes and you are not able to see the results the problem is with your theme or plugin. Your site may go down due to a bad plugin/theme update.

If you are able to access your WordPress admin then you can simply disable all your plugins by going to Plugins→Installed Plugins→Bulk Actions→Deactivate

If you are not able to access your admin area you can disable your plugins by connecting your WP site to a FTP client. After the connection go to wp_content folder→plugins folder→right click→Rename

After renaming WordPress automatically deactivates all the plugins. If this solves the problem then activate the plugins one by one and reload the site after each activation. Once you find the faulty plugin you can report the issue to your plugin authors or replace it.

If this doesnt help you should try replacing your theme by connecting your WordPress site to a FTP client and go to wp-content folder→ themes folder→right click→download current theme as backup→right click→themes folder→delete.

If you have a default theme(twenty nineteen etc.,) WordPress will automatically use it. Now check your site’s functions.php file and see if you have any extra space below. If yes then remove those. If this doesn’t help you then you should download a fresh copy of your theme and install it on your site.

4. Issues with updates

Sometimes WordPress may have issues with updates and to fix this go to WordPress root directory→.maintenance file→delete the file. If these doesn’t help you you can refer to manual update procedure.

5. Problem with ownership/permission

Many a times there can be an issue regarding permission or ownership which cause white screen of death errors. WP has some basic rules for this. they are as follows-

  • files should be 664 or 644,
  • folders should be 775 or 755
  • and the wp-config.php file should be 660, 600, or 644

If you have SSH access to your server then apply suitable rules with proper command and run it through the WP root directory. You can even consult your host, some hosts my also fix the problem regarding permission.

6. Enable debugging

Enabling debug mode and adding the following code to your wp-config.php file may also help you-

define( 'WP_DEBUG', true);
define( 'WP_DEBUG_LOG', true );

After this you’ll see many warnings/notices etc., which may help you fix the errors. If you cant see the errors visit the FTP client→wp-content folder you’ll see a new file named debug.log containing all the warnings and notices.

How to avoid this error in the future?

There isn’t any perfect way to prevent white screen of death but you can take the following precautions to atleast be safe-

  • well coded plugin/themes. Working with well coded plugins and themes have proved to be one of the best ways to stay away fro any WP errors.
  • Have backups. Install a simple backup plugin like UpdraftPlus (it works automatically) and you should always have a working WordPress backup that you can restore in case everything else fails.

Leave a Reply

Your email address will not be published. Required fields are marked *