WordPress knowledge sharing

How to solve the white screen problem of WordPress website _ How to repair the white screen error page of WordPress

WordPress website white screen WordPress background white screen It is one of the most common errors in WordPress. There is no error message in the white screen page, and you cannot log in to the WordPress dashboard. Another type of WordPress white screen error will only affect a certain part of the website, such as the white screen of the dashboard, while the front page is normal. Some articles and pages will also be blank, while other pages will work normally. In this article, Lao Wei will summarize the white screen problem of WordPress website and different solutions, and try to help people find solutions to the problem.

Before carrying out any (opening), any (starting), change (turning) or upgrade (vacating) of the website, Lao Wei strongly suggests that everyone Backup WordPress website There are many backup methods, WordPress plug-in backup , virtual host management panel backup, pagoda panel backup, etc. Even if you cannot access the WordPress dashboard, you can use the above method to successfully back up the website.

Besides, if you use Alibaba Cloud Tencent Cloud have access to AliCloud Snapshot Tencent Cloud Snapshot Backing up the data of the entire server is simpler and more stable.

Daily backup of Siteground virtual host The website files and databases can be backed up manually if the website is modified temporarily.

Why you see a blank screen in WordPress

Most of the reasons are that the website script ran out of php memory limit. The unresponsive php script either timed out or was forced to close by the environment panel. As a result, you only see pure white pages. Sometimes you will see an error message, there has a critical error on your website, It is also a similar problem.

There are various reasons for the white screen error, which may be caused by a problem with the website plug-in, a code you have just modified, or even the exhaustion of the host server resources.

Observe whether other websites on the same server are normal

If there are multiple websites on the server, check whether other websites also have a white screen problem. If so, the server has a problem. If the problem only occurs in a certain website, then only look for solutions in this website.

First of all, we try to solve the problem by starting with some simple operations. If we can't do that, we can do those complicated operation steps.

Increase the memory limit of WordPress

Edit the wp-config.php file in the root directory of the WordPress website, and add the code in the last line as follows:

define( ‘WP_MEMORY_LIMIT’, ‘256M’ );

The meaning of this code is to tell WordPress to increase the PHP memory limit to 256MB.

However, many times this operation still fails to solve the white screen problem, so we will continue to find the reason.

If this does not work, remember to delete the code to restore the original wp-config.php file.

Clear WordPress cache

Sometimes the foreground page is blank and you can access the WordPress dashboard. This may be caused by the cache plug-in. Just clear the cache.

Clearing the cache includes clearing the cache of the current browser and the cache of cache plug-ins.

Disable plug-in

The reason why WordPress is most likely to cause white screen during the establishment of the site is that plug-ins are the first. Many people like to study plug-ins and themes, which is easy to cause WordPress white screen problems during installation and setting.

According to long-term experience, most of the time it is related to the compatibility of a certain plug-in and theme. You can disable all plug-ins to troubleshoot.

There are tens of thousands of WordPress themes and plug-ins in the official market of WordPress, and more are not uploaded. No one can guarantee that there will be no compatibility problems between some themes, plug-ins, themes and plug-ins.

If you can log in to the WordPress dashboard, click "Plug ins>Installed Plug ins", check all installed plug-ins, select "Disable" in the "Batch Operation" drop-down menu, and click Apply.

If you encounter a white screen on the WordPress dashboard, you can disable all plug-ins through ftp. Use the ftp client to connect to the website directory, go to the/wp content directory, right-click the plugins directory, and select Rename, such as 1plugins or other names (temporary). WordPress cannot find the plugin directory, so it will disable all plug-ins. If this can solve the white screen problem, you can restore the plug-in directory name to plugins, and then modify the name of each plug-in directory one by one until the white screen problem no longer occurs. This plug-in is the cause. Find the plug-in that causes the white screen and replace it with similar plug-ins, or use code to achieve the same function.

Replace the current theme with the default theme

If the above plug-in exclusion method fails to solve the white screen problem, then try to use the default theme replacement method.

1. WordPress Dashboard>Appearance>Theme, enable the default theme and replace the existing theme.

2. The existing theme can also be deleted. Connect to the server with the FTP client, enter/wp content/themes/, back up the existing theme, and then delete it.

If you still keep the default WordPress theme, the system will automatically enable it. If you don't have it, you can select it from the Download from wordpress official website One copy will be uploaded again.

You can try both of the above methods. If you can solve the white screen problem, you can go to the functions.php file in the theme/plugins/to delete the extra space at the bottom of the file or manually add code. Sometimes you can solve the white screen problem.

Enable WordPress debug mode

If the above operations have not helped yet, try to open the WordPress debugging function, and you will see specific error prompts.

Add the following code to the wp-config.php file.

define( ‘WP_DEBUG’, true);

After adding, the blank page will display errors, warnings and notifications, which may help you find the problem.

Lao Wei did the same thing when he encountered an error in actual operation. For example, the error prompt showed that there was an XXX error in the XXX line of the XXX file. When he found the line, he found that it was all code, which most people could not understand. If you are lucky enough to see a plug-in displayed in the error prompt path, you will know that the problem is with the plug-in. It is difficult to display it in the/wp includes/directory.

Therefore, the method of debugging is only helpful for those who understand the code, but not for novices and Xiaobai.

Lao Wei's summary

The above is summarized by Lao Wei WordPress website white screen WordPress background white screen And corresponding solutions. Most of what Lao Wei has encountered personally are in the process of tossing about plug-ins (some plug-ins are not updated in time and incompatible with WordPress programs). Just stop plug-ins and replace them with the same kind to solve the problem. Replacing the default theme is also a common solution. Adding code to the functions.php file without authorization is another reason that can easily cause a blank screen. In short, some of your changes to the WordPress file have caused a blank screen. Follow the ideas in this article to try to solve it one by one.

Like( zero )
Article name: How to solve the problem of white screen in WordPress website _ How to repair the error page of white screen in WordPress
Article link: https://www.vpsss.net/23930.html
Copyright notice: The resources of this website are only for personal learning and exchange, and are not allowed to be reproduced and used for commercial purposes, otherwise, legal issues will be borne by yourself.
The copyright of the pictures belongs to their respective creators, and the picture watermark is for the purpose of preventing unscrupulous people from stealing the fruits of labor.