Created
September 8, 2025 00:50
-
-
Save mateusreis/3588f51caa9fcab560c46f5312056888 to your computer and use it in GitHub Desktop.
Wordpress Debug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. no wp-config.php: | |
| // Enable WP_DEBUG mode | |
| define('WP_DEBUG', true); | |
| // Enable Debug logging to the /wp-content/debug.log file | |
| define('WP_DEBUG_LOG', true); | |
| // Disable display of errors and warnings | |
| define( 'WP_DEBUG_DISPLAY', false ); | |
| @ini_set('display_errors',1); | |
| // Use dev versions of core JS and CSS files (only needed if you are modifying these core files) | |
| define('SCRIPT_DEBUG', true); | |
| /* That's all, stop editing! Happy publishing. */ | |
| 2. No debug.log: | |
| 3. Create "debug.log" file in "wp-content" folder: /wp-content/debug.log | |
| 4. Make sure that the "debug.log" file is writable by anyone (all users not only admin) (permission 777) | |
| $ sudo chmod 777 debug.log | |
| 5. Run | |
| $ tail -f debug.log | |
| 6. Add this to the code: | |
| error_log( 'Hello World!' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment