I have used Wordpress instances on many servers from many different hosts and never had this issue. For some reason, only on Digital Ocean droplets, I am unable to turn on Wordpress logs, no matter what I do.

Does anybody else have this issue? How to fix it?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
2 answers

Well the test of ‘braking it’ would be to ensure that the file itself is being honored, if so there is no reason PHP would not enable the logging unless its being turned off further down the stack somehow.

Also, if you change

define( 'WPDEBUGDISPLAY’, false);

to true, do you see errors on the screen?

If so, I would again, check the permissions on the log file and make sure that the file / directory have write access from the server to actually write / create that file.

When you turn it on does anything display on the page itself? I suppose it could be permission based, maybe no write permission on the wp-content to print to the log itself?

Have you looked at the apache / nginx logs to see if there is anything happening there?

Lastly, are you sure it the correct wp-config file? I know sometimes these can be symlinked to another location etc so you may want to ensure it is the correct one.

Lastly, what does you wp-config look like for your debug?

  • Nothing displays at all.
    Whenever I force the trigger_error() function, that message shows up on Apache’s error_log but that'all. No other log messages anywhere.

    I took a look at PHP.ini and Apache’s files besides wp-config. Nothing clearly causing the issue (at least for me).

    define( 'WP_DEBUG', true);
    define( 'WP_DEBUG_LOG', true);
    define( 'WP_DEBUG_DISPLAY', false);
    
    root@host:/html/wp-content# ll debug.log
    -rw------- 1 www-data www-data 0 Oct 14 12:43 debug.log
    
    • I’m wondering if you may simply not have an WP errors. You mention triggering the error manually however wp debug is in the context of WP not all PHP errors, so if you say create a php file specifically to cause an error, it’s not going to show in the wp error logs.

      Out of curiosity, if you purposely break the config does it break the site?

      • What kind of modification would you suggest? I can try it out. It wouldnt last long enough to hurt.

        Besides, do you suggest any modification that could force a WP debug? I noticed that php.ini is setup to skip deprecation logs so I believe it reflects in WP itself, right?

Submit an Answer