16.5 C
Monday, July 22, 2024

How to activate debug mode on WordPress? Let’s proceed step by step

Must read

How to activate debug mode on WordPress? Let’s proceed step by step. What does debug mode mean? Debugging means identifying and correcting errors in the code so that they do not repeat themselves. WordPress software is written in PHP as well as plugins and themes.

At this point, I bet you already guessed what WP debugging is for, right? It helps you discover problems and leaves warnings and warnings. But let’s go deeper.

When to activate WordPress debugging?

The moment a critical error has occurred on your website. For example, if your online project crashes strangely or shows you a white screen, the so-called “White Screen of Death”.

Sure, uninstalling unnecessary plugins is recommended in this case, but you may still have a hard time identifying the problem. With debug mode, on the other hand, you narrow the field, get more precision and have the picture.

How do I activate WordPress debug mode manually?

How to activate debug mode in WordPress manually? You have to go through a few simple steps. The first step: go to your CPanel and click on “File Manager”. This will take you to your website files.

Then double click on the “public_html” folder which contains all your WordPress files. Now select the “wp-config.php” entry. Next, go to: define (‘WP_DEBUG’, false) and change it to: define (‘WP_DEBUG’, true).

Finally, click on “Save changes”. In a few moments you just need to log into the site to see the PHP error.

according to video animation service Once you have discovered the source of the anomaly, download the file via FTP correct it and reload it. If you are unfamiliar, paste the line in which the error is present on Google.

If you have a bit of luck it will be a problem that other users have already dealt with and you will understand how to solve. After the resolution of the anomaly it is good to refresh the site.

WordPress debugging plugin

How to activate debug mode on WordPress in an easy way? You can install the WP Debugging plugin . As soon as activated this component is set to:

  • define (‘WP_DEBUG_LOG’, true).
  • define (‘SCRIPT_DEBUG’, true).
  • define (‘SAVEQUERIES’, true).

In the settings page you can change the items. How to enable WordPress debug plugin? Log into Tools and then go to WP Debugging. To disable the debug mode on WordPress just disable the plugin.

It is important to remember this last detail. The risk is that text from the PHP code is discovered by those who visit the site. Yet another plugin to enable debugging on WordPress: I want to recommend Query Monitor , a free tool that acts in many areas of the CMS and enjoys excellent credibility.

And how to enable WP debug log?

Now that you understand how to activate debug mode on WordPress, you will notice that messages appear on the site warning you of a problem even if it is not causing immediate damage.

It is definitely a good thing to receive notifications to take precautions, too bad these warnings are not kept.

Is there a solution to have memory of the anomalies found? Yes, you need to know how to enable WordPress debug log to save errors and messages. Just open wp-config.php and insert the line define (‘WP_DEBUG_LOG’, true) under define (“WP_DEBUG”, true).

And here is WP will log the problems in the file: wp-content / debug.log.

Do you want to keep track of anomalies but don’t want to see them in the HTLML code of your pages? Having said that, you must disable WP_DEBUG_DISPLAY in the wp-config.php file by inserting the line define (‘WP_DEBUG_DISPLAY’, false) under the heading define (‘WP_DEBUG’, true).

How to activate debug mode on WordPress: your experience

Knowing how to activate the debug mode on WordPress is essential and it is an installation that must be done from the first moment you open your blog.

In this way you have nothing to fear: a possible white screen will be a difficulty that can be faced.

What’s more, you won’t have to waste valuable time figuring out what the anomaly is because the problem will be identified.


- Advertisement -spot_img

More articles

- Advertisement -spot_img

Latest article