blog posts

Solving the problem of the WordPress white page in the site and administration

The WordPress White page of Death is one of the problems that may happen to your WordPress site; in this case, as the name indicates, you can go to any part of the site, including the WordPress counter or pages. Go to the main site; you will not be shown any content except a white page. This problem can happen to you in two possible situations:

  • In the most optimistic case, one of the site’s sections, namely the WordPress counter or the site’s pages, will be like this.
  • In the most pessimistic case, both the WordPress counter sections and the site pages will be in such a way that it will take some time to fix the problem.

The white page of death of WordPress usually occurs due to PHP programming errors or restrictions imposed on the memory. If there is a problem on the user side and the WordPress counter is completely healthy and normal, you will have a better chance to fix the error on the white page of the death of WordPress. Now, I will review and teach you how to fix WordPress’s white page of death, so stay with us until the end.

Solve the WordPress white page of death problem

As I mentioned, the white page of the death of WordPress is mostly due to programming errors that can occur due to the incompatibility of several plugins or the incompatibility of site codes with the template and limitations in WordPress memory. Fix it from where it is. The white page of the death of WordPress will be displayed in different ways in each browser, for example, you will see it in the Google Chrome browser as shown below.

Solve the WordPress white page of death problem

In other browsers, such as Firefox, you will be faced with a white page without any content, and no special text or content will be displayed on it. Now that you have come across this page, we will discuss the solutions that exist to fix it.

Enable WordPress debug mode

WordPress debug mode is the best solution that we can use to know where our problem comes from. Therefore, to activate it, it is enough to go to the File Manager host and then the wp-config.php file located in the public_html it by right-clicking and selecting Edit. Look for the following code snippet on the open file editing page.

define( 'WP_DEBUG', false );

to enable it true , so in order for the debug mode to be active, you must change the above code to the following form, with the value of true instead of false . .

define( 'WP_DEBUG', true);

Now, after saving the file, refresh the site, in this case, instead of the white page that was displayed to you, you will now be faced with writings like the following, where the error path and error line are shown to you, and for Fixing the problem is enough to refer to the paths mentioned in each line to fix the problem.

Cannot redeclare get_posts() (previously declared in /var/www/html/wordpress/wp-includes/post.php:1874) in /var/www/html/wordpress/wp-content/plugins/my-test-plugin/my-test-plugin.php on line 38

In the example above, our error occurred in one of the plugins, which is called my-test-plugin , and this error occurred exactly on line 38 of the my -test-plugin.php in this plugin, which is line 38 of this file. Let’s check and see where the problem is and fix it. If you are not familiar with coding, it is enough to disable the plugin by changing the name of the desired plugin folder, which you will learn in the next step, if you do not have access to the WordPress counter, to solve the problem, and then ask the plugin author to guide you.

Disable plugins

The main reason for the occurrence of the white page of death of WordPress is due to plugins, to fix it, it is enough to disable the plugins and by activating the plugins one by one, you can reach the plugin that caused the problem and fix it. But as I mentioned, this error may occur in two different situations, either one of the user side sections and the WordPress counter have this problem, or both sections have this problem, so if access to the WordPress counter You path plugins and disable all the plugins at once by selecting all the active plugins of the site and in the next step activate the plugins one by one and open the site and refresh each time until the plugin that causes the problem has been found.

In the cPanel host

But if you don’t have access to the WordPress dashboard, you, through the host, disable all plugins at once. For this purpose, first, log in to your host and then go to the File Manager host.

Solve the WordPress white page of death problem

Now, after entering the file management in the host, enter the /public_html/wp-content/ path , as you can see in the picture, there is a folder called plugins , in which every plugin you install will be placed.

Solve the WordPress white page of death problem

Now it is enough to right-click and select the Rename option to folder plugins to another name such as pligins_old and then rename it to plugins that all plugins are disabled and in this way if the problem of the white page of WordPress dies on your site. If it is from the side of the plugin, you will be able to access the WordPress counter, and now you can activate and test the plugins one by one to reach and identify the plugin that caused the problem on the site.

In Host Direct Admin

To perform the above tasks in Host Direct Admin, first log in to your host and then click on the File Manager button as shown in the image below in Host Direct Admin, to be redirected to the file management page in Direct Admin. Then refer to the directory /public_html/wp-content/ in the direct admin host.

Solve the WordPress white page of death problem

After going to the above path, click on the Rename button in front plugins , to be redirected to the folder renaming page.

Solve the WordPress white page of death problem

After this step, you will enter a page similar to the image below, just change the plugins to another name such as pligins_old and then rename it to plugins that all plugins are disabled, and in this way, if the problem of the white page of WordPress dies in If your site is from the plugins side, you will be able to access the WordPress counter.

Solve the WordPress white page of death problem

Disable the theme and use the default WordPress theme

Another reason that can cause the white page of WordPress to die may be the current template of your site that you are using. For this purpose, similar to what we do in plugins, we can make sure that the problem is by using the default WordPress template. Is it from the mold or not? So if you have access to the WordPress dashboard, go to View > Folders and then activate one of the default WordPress themes and open the site and see if the problem persists.

In the cPanel host

But if you don’t have access to the WordPress dashboard log CPanel host in the File Manager go to /public_html/wp-content/themes/ , then right-click and select the Rename option in this folder to rename the template that is on the site. active , change it to another name so that the default WordPress template is selected as the template.

Solve the WordPress white page of death problem

In this case, if the problem is with the template, the error on this page has been fixed, and now you can check your template codes and see where the problem came from when you encountered the white page of death of WordPress.

In Host Direct Admin

To perform the above tasks in Host Direct Admin, first log in to your host and then click on the File Manager button as shown in the image below in Host Direct Admin to be redirected to the file management page in Direct Admin. Then go to the directory /public_html/wp-content/themes/ in the direct admin host.

Solve the WordPress white page of death problem

After going to the above path, click on the Rename button  template folder that is currently active on the site , to be redirected to the folder renaming page.

Solve the WordPress white page of death problem

After this step, you will enter a page similar to the image below, just choose a desired name for the template folder and rename it to another name such as rename it and then previous name to disable the desired template. and in this way, if the problem of the white page of death of WordPress on your site is from the template side, you will be able to access the WordPress counter.

Solve the WordPress white page of death problem

Increase WordPress memory

Sometimes it happens that due to the need for more memory in WordPress, a white page of death error is shown to us, and to fix it in this case, it is enough to add the amount of WordPress php memory. For this purpose, there will be three solutions in front of you, if these three solutions do not increase the amount of memory of your WordPress and the problem persists, it is necessary to ask your hosts to add the amount of memory to solve the problem.

1- Increase WordPress memory with wp-config.php file

Log in to your host, and after entering the File Manager, go to the public_html and then find the wp-config.php file, right-click on it, and select the Edit option to be redirected to the file editing page and then the following code put in the right place of the file.

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

Then save the file and check the site to see if the problem is fixed or not.