Wordpress not writing error.log

My local development WordPress install on ServerPress is not writing error logs. I made changes to my wp-config.php file to enable error log writing for WordPress, and also tried editing the php.ini file for xampplite to try and enable error tracking, But still, I could not get any logs going, so I reverted that to its original settings. My website currently displays

There has been a critical error on your website.

in the front-end. I added the following code before the define( 'DB_NAME', 'blahblahblah'); configuration:

/**Enable WP Debug */
define( 'WP_DEBUG', true );

/** Enable WP Debug Log */
define( 'WP_DEBUG_LOG', true );

/**Display debug on HTML page*/
define( 'WP_DEBUG_DISPLAY', false );
@ini_set('display_errors',0);

Topic wp-debug Wordpress

Category Web


I also had troubles getting the logging to work, checked the wordpress site and found it to recommend some plugins for logging.

I used the Query Monitor plugin from https://wordpress.org/plugins/query-monitor/ and I finally got usable output from this.


You said you added the code in front of the file. In the wp-config.php I'm working with there's this line towards the end:

define('WP_DEBUG', false);

if your config file sets it to true first and then to false the problem could be that the last entry wins.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.