Log WordPress Database Queries To File
By OutsourcedContent — on August 2, 2021 Useful to see what changes are made in the WordPress database by a plugin, theme or other code. /** * Log database queries to the /wp-content/sql.log file. * * @link https://wordpress.stackexchange.com/a/144353/90061 */ add_filter( ‘query’, function( $query ){ // Filter out everything that shouldn’t be logged. if…











