79186227

Date: 2024-11-13 18:33:10
Score: 0.5
Natty:
Report link

Thanks to helgatheviking comment, Go this:

1- Create "debug.log" file in "wp-content" folder: /wp-content/debug.log

2- Make sure that the "debug.log" file is writable by anyone (all users not only admin) (permission 777)

3- In main wordpress directory in "wp-config.php" file, uncomment and change:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );

4- Inside the hook function or in functions.php use this code to log any variable:

error_log(json_encode($array));

5- Read /wp-content/debug.log

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Ehsan Paknejad