Hi,
Could you please try to add the following code in the ‘wp-config.php’ file:
define( ‘WP_DEBUG’, true );
define( ‘WP_DEBUG_DISPLAY’, false );
define( ‘WP_DEBUG_LOG’, true );
See also:
Debugging on WordPress – https://wordpress.org/support/article/debugging-in-wordpress/
Editing wp-config.php – https://wordpress.org/support/article/editing-wp-config-php/
Hello,
Thank you for the resonse. I already have those definitions in my wp-config.php file.
I also have
define( ‘WP_DEBUG_LOG’, ‘wp-errors.log’ );
Thank you for your help.
Best Regards
Hi,
Please try
1) replacing:
define (‘WP_DEBUG_LOG’, ‘wp-errors.log’);
on
define ('WP_DEBUG_LOG', dirname(__FILE__). '/wp-errors.log');
2) create wp-errors.log file manually
3) perhaps WordPress lacks file permissions. With your FTP program or through Сpanel go to the folder of your site and check the rights to the folders – 755 rights must be set, and 644 for all files.
Here is the documentation – http://codex.wordpress.org/Changing_File_Permissions#Shared_Hosting_with_suexec
Hello,
Thank you for the response.
1.
I changed the debug log filename define command as you suggested to the following.
define (‘WP_DEBUG_LOG’, dirname(__FILE__). ‘/wp-errors.log’);
It changed the debug file location from
/mydomain/wp-content/debug.log
to
/mydomain/wp-errors.log
However error log monitor plugin still displayed the wp-errors.log (debug log) as the PHP Error Log.
This change did not fix the issue.
2.
I deleted the wordpress created debug.log and recreated it manually. It made no difference.
3.
I also checked File and Folder permissions they were already correct.
Thank you for your help.
Best Regards
I see that when WP_DEBUG_LOG is set to true, the PHP error_log filename is overwritten.
From WordPress codebase
if ( WP_DEBUG_LOG ) {
ini_set( ‘log_errors’, 1 );
ini_set( ‘error_log’, WP_CONTENT_DIR . ‘/debug.log’ );
}
I was not aware that this was taking place and that the ini_set definition takes precedence over error_log defines within php.ini or .user.ini.
It’s clearly not an issue with your plugin.
I am sorry that I have wasted your time. Thank you for your help.
Best Regards
-
This reply was modified 4 years, 1 month ago by
iapprentice.
Hi,
Thank you for your reply. Glad that you have found the solution.