Debug.log dosen't apper in wp-content

when i wrote define(‘WP_DEBUG’, true);
define(‘WP_DEBUG_LOG’, true);
define(‘WP_DEBUG_DISPLAY’, false);
and saveed the fille the debug file didn’t apper

Please make sure it is indeed

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

Can you provide a screenshot?

4 Likes


if it will help…

Are you sure the settings are taking effect? If you set WP_DEBUG_DISPLAY to true, do you see output in your browser?

You may want to configure this higher up in the file, just below the comment For developers: WordPress debugging mode.. In some cases, WP_DEBUG may already be set there, in which case setting it again may not work.

4 Likes

Under that comment isn’t any line of code.
Should I reinstall WordPress or maybe delete this account and create a new one?

Please provide answer to this first

6 Likes

You’re welcome to try. But right now, we have no idea what’s actually happening that’s causing the log file to not be created. So reinstalling on a new account sounds like a lot of work which may not have any effect.

7 Likes

So in wp-confing.php I have this lines:

// Enable WP_DEBUG mode

define( 'WP_DEBUG', true );

// Enable Debug logging to the /wp-content/debug.log file

define( 'WP_DEBUG_LOG', true );

// Disable display of errors and warnings

define( 'WP_DEBUG_DISPLAY', false );

@ini_set( 'display_errors', 0 );

// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)

define( 'SCRIPT_DEBUG', true );

(And yes I put this lines before “stop editing comment”)

What can cause this problem?
And how to fix it?

Hi AexJeman,

Check the file again to see if you have defined these constants before in the same file above this code syntax. Meanwhile using @ini_set might hinder error logging.

Cheers!

3 Likes

Hello chiusc123

So you what to say that I should change @ini_set( ‘display_errors’, 0 ); to 1?

Sorry if I look stupid its my frist time working with wordpress

Hi AlexJeman,

Maybe, you can try changing it to 1 or remove the line entirely, as certain directives operate differently on free hosting.

Cheers!

3 Likes

Hello

I tired booth options but still in wp-content there is no debug.log

But Thank you for you’re interest in helping me out!

Changing to

define( 'WP_DEBUG_DISPLAY', true );

What do you see?

2 Likes

Hello KangJL

I changed the value to true and no still I dont see anything.

But still thank you!

Hi AlexJeman,

If you have any sort of debugging plugin or security plugins enabled, please have those disabled first. Some security plugins may see error messages as things that leak your info (which is not wrong btw), but in your case you want to see them for debugging, please disable those plugins (if involved) to see if that’s the case you ain’t seeing any error messages.

Cheers!

3 Likes

Hi there

I dont have any plungins activated at the moment, but I had some but I deleted them

Did you try this already?

6 Likes

It would seem so:

If no error displays even with display set to true, does the error exist in the first place? Or is there a chance something else is preventing it from appearing?

4 Likes

Hello there

Frist of all, yes there is a fatal error because I try to develop a wordpress plugin and something is wrong and thats why I need debug.log. Second I don’t think there is something else preventing it from appearing because I don’t have any plugins installed or activated at the moment and I didn’t edit and wordpress files except wp-confing

Actual file is wp-config.php. Are you editing the correct file?

3 Likes