Does the debug.log do log rotation?

This is more like of an inquiry.
So I enabled my WP_DEBUG_LOG to true.
It does work though, debug.log is in my wp-content's directory.
But does it also do log rotation like different file for each day?

Example:

Today's file - debug.log
Yesterday's - 2019-12-18-101010-debug.log

Does it work like this? Or just debug.log all through out?

Topic apache logging php debug Wordpress

Category Web


No, it creates only one file. There is no log rotation involved.

But... Sometimes “but” can be a good thing ;)

WP uses error_log for its debug log, so you can change its location using:

ini_set( 'error_log', WP_CONTENT_DIR . '/debug-' . date('Y-m-d') . '.log' );

About

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