From d90fb63a97c105e1b53aa23f286c9b3f7ded73a9 Mon Sep 17 00:00:00 2001 From: Ryan Dewhurst Date: Mon, 4 Jan 2021 10:19:47 +0100 Subject: [PATCH] Updated WordPress Plugin Security Testing Cheat Sheet (markdown) --- WordPress-Plugin-Security-Testing-Cheat-Sheet.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/WordPress-Plugin-Security-Testing-Cheat-Sheet.md b/WordPress-Plugin-Security-Testing-Cheat-Sheet.md index 4048c7b..9b62956 100644 --- a/WordPress-Plugin-Security-Testing-Cheat-Sheet.md +++ b/WordPress-Plugin-Security-Testing-Cheat-Sheet.md @@ -30,7 +30,20 @@ When doing dynamic testing for XSS the following setting in the wp-config.php fi ``` define( 'DISALLOW_UNFILTERED_HTML', true ); -``` +``` + +### Enable error logging + +Add the following to your wp-config.php file: + +``` +define( 'WP_DEBUG', true ); +define( 'WP_DEBUG_LOG', true ); +``` + +The PHP errors will be saved to the `/wp-content/debug.log` file. + +To do some logging yourself, you can use the `error_log( 'This is a log' );` function. ## Cross-Site Scripting (XSS)