Forum archive
Turnkey Wordpress doesnt log information
Hello,. im using latest Turnkey Wordpress 16.0.
I want to have a log file with information, to debug possible problems and monitoring VM.
As wordpress documentation i write in wp-config:
// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
//define( 'WP_DEBUG_LOG', 'wp-errors.log' );
// 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 );
This should create and log to default file debug.log.
But i had to create manually the file, and always is empty. So no logging.
I have also changed permissions of wordpress folder to www-data:www-data.
Any help would be apreciated.
DId you restart the Apache webserver? As far as I'm aware, restarting the webserver is required to apply the updated setting. You can do that like this:
By default, the permissions should be as required for this to "just work". Although if you have manually made changes to files/directories within the WordPress root (/var/www/wordpress) such as manually creating the file/directory, please ensure that it is owned by the 'www-data' user (the webserver user). It sounds like you may have already done that, but just in case, to ensure that all the WordPress files are owned by the webserver, you can run this:
If you have already followed those steps, and it still doesn't work as expected, please let me know and I'll see if I can get it to work as it should on a test server.
It may also be worth checking the Apache logs (/var/log/apache2) as they may contain some hint to what the issue may be?
Alternatively, if you have managed to fix it yourself (or do), please post back with whatever was required. That way the info will be available for others. Also, if there is a tweak that we can pre-configure to improve the appliance out of the box, then we'll do so.