Friday, April 3, 2020

Does your WordPress page go blank? Solve it easy!

WordPress go blank

It is a common fault that a WordPress page goes blank and nothing can be displayed when accessing it, or that it shows a warning of Error 500 or Internal Server Error. This fault is not from your computer or the type of browser you are working on.

Today we will give you the tips to discover why it happens and how to correct it.

Why does this error happen?

There may be a problem with your hosting provider or your WordPress is not installed properly. Have you made any recent changes in WordPress that may be associated with this error? If so, revert the changes and you will see that it starts to work correctly.

1 The error is displayed after updating the WordPress version

If you updated automatically or did a manual WordPress update, some files may not have been overwritten because the file and directory permissions are not adequate.

In these cases, when you open the page, a PHP error or a blank page is displayed and a file is downloaded. When you open it in the notepad you will see the following code:

If your website has the robots.txt file or sitemap.xml

Check by entering the address corresponding to the robots and sitemap of your domain. If they are displayed correctly instead of the blank screen, there is no error in the database.

Check the .htaccess file

The .htaccess file may be corrupted. The way to check it is to create another clean .htaccess file. To do this you must first rename the old .htaccess

When creating this new file, enter the address of your website again and if it works correctly, the root of the problem is the .htaccess file. You must find out in which line of the code the error is located.

2 Your WordPress needs more memory

Another reason for the blank page in your WordPress may be the lack of memory. In this case, some plugins may be demanding a high memory and CPU consumption.

To solve this problem, instead of going through the conventional way to find the wp-config.php file, we will access the cPanel or via FTP and look for the file called default-constants.php that is found in the wp-includes folder.

When you click to edit it, you may notice that this file limits the memory to only 40 MB.

Change the 40M value in the define line (‘WP_MEMORY_LIMIT’, ’40M’); to 64M.
In any case, you should check which PHP memory is assigned to your hosting or install a plugin that shows you that data.

3 Error in the Theme or in a Plugin

Error in the Plugin

One reason for the failure may be the theme or a plugin. To discard it, look for the wp-content directory and rename the Plugins-Web folder. Then access again to check if the error is still shown. If your website does not depend on any plugin, it will be displayed correctly (remember that when renaming the folder, the plugins will be disabled).

To solve this, create another folder and name it Plugins. It begins to move within that folder one plugin at a time to detect which one is failing.

If you detect an error in a plugin, the failure can be an update or an error in the configuration. If it is an update error, you can delete the plugin and install it again. If the error is a configuration, check the official page of the plugin or the developer to solve the doubts and problems.

Theme Error

If the failure is not from a plugin, you can check if the error is from the theme you are using, since the topics tend to update and may bring an error.

To check if the problem is the Theme, go to the wp-content / themes directory and rename the folder of your theme. Go back to your website and if it loads correctly (with the default theme of WordPress) reinstall the theme again or change it to another one. If you purchased the item on a paid basis, contact the developer to resolve the problem.

4 Disable the wp-cron.php file

The WordPress wp-cron.php is a virtual task manager, which runs every time the pages are loaded. In general, it is responsible for:

  • Automatically search for WordPress updates, Plugins and installed Templates.
  • Send pingbacks.
  • Publish articles that you have scheduled on a specific date.
  • Make backup copies, among others.

The most common error in this execution is related to the performance of the server’s CPU resources. It is common for WordPress to deplete CPU resources quickly when the web has a lot of traffic, this results in an error of “500 Service not available” or in the worst case the suspension of the hosting account.

To disable wp-cron.php you have to access the root of your WordPress and edit the file wp-config.php adding the following line:

When saving the changes the wp-cron.php will not be executed repetitively without having created a cron-jobs from cPanel.

5 Activate the Debug mode

Another solution to the problematic of the blank page is to activate the WordPress debug mode. This will show the errors of the web when accessing it.

To make this change, access the wp-config file and look for the following line:

Save the changes. When you reload the web you will not see the blank page but warnings. The warnings that should worry you the most, are the ones that say Fatal Error. The Fatal Error indicates that there is an error in line 102, instead of changing the theme completely and losing the design, it is preferable to correct this line.

Did these tips help you? Tell us!
Jefferson Maldonado
the authorJefferson Maldonado
UX WordPress Designer
Ux & Web Designer. Portafolio: Divi Blogger, WordPress Expert, UX Designer, Business Consultant.

Leave a Reply