D E B U G G I N G W O R D P R E S S
B R E C H T RY C K A E R T
B R E C H T
RY C K A E R T
• Works at combell.com
• WP user since 1.5
• Passionate about
WordPress Security &
Performance



@brechtryckaert

brechtryckaert.com
W H E N L A U N C H I N G
Y O U R N E W W E B S I T E
O R W H E N U P D AT I N G Y O U R
P L U G I N S O R T H E M E S
… O R E V E N M I G R AT I N G
Y O U R W E B S I T E …
Debugging WordPress
Debugging WordPress
W H O ’ S E X P E R I E N C E D
T H I S B E F O R E ?
Debugging WordPress
T W O K I N D S O F 

E R R O R C O D E S …
4 0 0 - C O D E S 

5 0 0 - C O D E S
4 0 0 - C O D E S 

5 0 0 - C O D E S
You stuffed up (client errors)
Your server stuffed up (server errors)
400 Bad Request
401 Unauthorized (RFC 7235)
402 Payment Required
403 Forbidden
404 Not Found
405 Method Not Allowed
…
500 Internal Server Error
501 Not Implemented
502 Bad Gateway
503 Service Unavailable
504 Gateway Timeout
…
H O W T O D E B U G ?
- S E R V E R L O G S 

- W P _ D E B U G 

- W P - C L I
S E R V E R L O G S
T Y P E S O F E R R O R S I N T H E L O G S
• FATAL ERROR
• WARNING/NOTICE
• LIMIT-RELATED
[Sat Feb 10 02:05:22.490389 2018] [error] [pid 5740] mod_proxy_fcgi.c(954): (70007)The timeout specified has expired: [client
141.101.77.82:32531] AH01075: Error dispatching request to : (polling)
[Sat Feb 10 03:42:55.356581 2018] [error] [pid 34419] mod_authz_core.c(873): [client 176.62.169.28:27736] AH01630: client
denied by server configuration: /data/sites/web/somewebsite.com/.user.ini
[Sat Feb 10 10:50:24.838424 2018] [error] [pid 41100] mod_proxy_fcgi.c(954): (70007)The timeout specified has expired: [client
162.158.111.75:24677] AH01075: Error dispatching request to : (polling)
[Sat Feb 10 10:50:36.741167 2018] [error] [pid 48392] apache2_util.c(271): [client 172.68.65.254:35087] [client 172.68.65.254]
ModSecurity: Access denied with code 403 (phase 2). Matched phrase "SemrushBot" at REQUEST_HEADERS:User-Agent.
[file "/usr/local/httpd/conf/modsecurity-crs/activated-rules/modsecurity_crs_35_bad_robots.conf"] [line "20"] [id "990002"]
[rev "2"] [msg "Request Indicates a Security Scanner Scanned the Site"] [data "mozilla/5.0 (compatible; semrushb
ot/1.2~bl; +http://www.semrush.com/bot.html)"] [severity "CRITICAL"] [ver "OWASP_CRS/2.2.9"] [maturity "9"] [accuracy
"9"] [tag "OWASP_CRS/AUTOMATION/SECURITY_SCANNER"] [tag "WASCTC/WASC-21"] [tag "OWASP_TOP_10/A7"] [tag
"PCI/6.5.10"] [h
ostname “www.somewebsite.com”] [uri "/tag/romeinen/"] [unique_id "Wn7AbE4XLPnYH7fIxTBlGwAAAcY"]
[Sat Feb 10 02:05:22.490389 2018] [error] [pid 5740] mod_proxy_fcgi.c(954): (70007)The timeout specified has expired: [client
141.101.77.82:32531] AH01075: Error dispatching request to : (polling)
[Sat Feb 10 03:42:55.356581 2018] [error] [pid 34419] mod_authz_core.c(873): [client 176.62.169.28:27736] AH01630:
client denied by server configuration:/data/sites/web/somewebsite.com/.user.ini
[Sat Feb 10 10:50:24.838424 2018] [error] [pid 41100] mod_proxy_fcgi.c(954): (70007)The timeout specified has expired: [client
162.158.111.75:24677] AH01075: Error dispatching request to : (polling)
[Sat Feb 10 10:50:36.741167 2018] [error] [pid 48392] apache2_util.c(271): [client 172.68.65.254:35087] [client 172.68.65.254]
ModSecurity: Access denied with code 403 (phase 2). Matched phrase "SemrushBot" at REQUEST_HEADERS:User-Agent.
[file "/usr/local/httpd/conf/modsecurity-crs/activated-rules/modsecurity_crs_35_bad_robots.conf"] [line "20"] [id "990002"]
[rev "2"] [msg "Request Indicates a Security Scanner Scanned the Site"] [data "mozilla/5.0 (compatible; semrushb
ot/1.2~bl; +http://www.semrush.com/bot.html)"] [severity "CRITICAL"] [ver "OWASP_CRS/2.2.9"] [maturity "9"] [accuracy
"9"] [tag "OWASP_CRS/AUTOMATION/SECURITY_SCANNER"] [tag "WASCTC/WASC-21"] [tag "OWASP_TOP_10/A7"] [tag
"PCI/6.5.10"] [h
ostname “www.somewebsite.com”] [uri "/tag/romeinen/"] [unique_id "Wn7AbE4XLPnYH7fIxTBlGwAAAcY"]
[Sat Feb 10 02:05:22.490389 2018] [error] [pid 5740] mod_proxy_fcgi.c(954): (70007)The timeout specified has expired: [client
141.101.77.82:32531] AH01075: Error dispatching request to : (polling)
[Sat Feb 10 03:42:55.356581 2018] [error] [pid 34419] mod_authz_core.c(873): [client 176.62.169.28:27736] AH01630: client
denied by server configuration: /data/sites/web/somewebsite.com/.user.ini
[Sat Feb 10 10:50:24.838424 2018] [error] [pid 41100] mod_proxy_fcgi.c(954): (70007)The timeout
specified has expired: [client 162.158.111.75:24677]
AH01075: Error dispatching request to : (polling)
[Sat Feb 10 10:50:36.741167 2018] [error] [pid 48392] apache2_util.c(271): [client 172.68.65.254:35087] [client 172.68.65.254]
ModSecurity: Access denied with code 403 (phase 2). Matched phrase "SemrushBot" at REQUEST_HEADERS:User-Agent.
[file "/usr/local/httpd/conf/modsecurity-crs/activated-rules/modsecurity_crs_35_bad_robots.conf"] [line "20"] [id "990002"]
[rev "2"] [msg "Request Indicates a Security Scanner Scanned the Site"] [data "mozilla/5.0 (compatible; semrushb
ot/1.2~bl; +http://www.semrush.com/bot.html)"] [severity "CRITICAL"] [ver "OWASP_CRS/2.2.9"] [maturity "9"] [accuracy
"9"] [tag "OWASP_CRS/AUTOMATION/SECURITY_SCANNER"] [tag "WASCTC/WASC-21"] [tag "OWASP_TOP_10/A7"] [tag
"PCI/6.5.10"] [h
ostname “www.somewebsite.com”] [uri "/tag/romeinen/"] [unique_id "Wn7AbE4XLPnYH7fIxTBlGwAAAcY"]
Tue Jan 16 15:10:55.316779 2018] [error] [pid 6002] mod_proxy_fcgi.c(848): [client
178.119.78.83:63467] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught Error: Call to
undefined method SitePress::is_display_as_translated_taxonomy() in /data/sites/web/somewebsite/
www/wp-content/plugins/woocommerce-multilingual/inc/class-wcml-dependencies.php:365nStack
trace:n#0 /data/sites/web/somewebsite/www/wp-includes/class-wp-hook.php(286):
WCML_Dependencies->check_wpml_config('')n#1 /data/sites/web/somewebsite/www/wp-includes/
class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)n#2 /data/sites/web/somewebsite/
www/wp-includes/plugin.php(453): WP_Hook->do_action(Array)n#3 /data/sites/web/somewebsite/
www/wp-settings.php(450): do_action('init')n#4 /data/sites/web/somewebsite/www/wp-
config.php(83): require_once('/data/sites/web...')n#5 /data/sites/web/somewebsite/www/wp-
load.php(37): require_once('/data/sites/web...')n#6 /data/sites/web/somewebsite/www/wp-admin/
admin-ajax.php(22): require_once('/data/sites/web...')n#7 {main}n  thrown in /data/sites/web/
somewebsite/www/wp-content/plugins/woocommerce-multilingua...n'
Tue Jan 16 15:10:55.316779 2018] [error] [pid 6002] mod_proxy_fcgi.c(848): [client
178.119.78.83:63467] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught
Error: Call to undefined method SitePress::is_display_as_translated_taxonomy() in /data/sites/web/
somewebsite/www/wp-content/plugins/woocommerce-multilingual/inc/class-wcml-dependencies.php:
365nStack trace:n#0 /data/sites/web/somewebsite/www/wp-includes/class-wp-hook.php(286):
WCML_Dependencies->check_wpml_config('')n#1 /data/sites/web/somewebsite/www/wp-includes/
class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)n#2 /data/sites/web/somewebsite/
www/wp-includes/plugin.php(453): WP_Hook->do_action(Array)n#3 /data/sites/web/somewebsite/
www/wp-settings.php(450): do_action('init')n#4 /data/sites/web/somewebsite/www/wp-
config.php(83): require_once('/data/sites/web...')n#5 /data/sites/web/somewebsite/www/wp-
load.php(37): require_once('/data/sites/web...')n#6 /data/sites/web/somewebsite/www/wp-admin/
admin-ajax.php(22): require_once('/data/sites/web...')n#7 {main}n  thrown in /data/sites/web/
somewebsite/www/wp-content/plugins/woocommerce-multilingua...n'
T H E P O W E R O F
W P _ D E B U G
W P _ D E B U G
In wp-config.php:
define( 'WP_DEBUG', false );
Enable debugging:
define( 'WP_DEBUG', true );
W P _ D E B U G
Extra statements:
define('WP_DEBUG_LOG', true);
Creates logfile in:
/wp-content/debug.log
W P _ D E B U G
Prevent public displaying of errors:
define('WP_DEBUG_DISPLAY', false);
W P _ D E B U G
Ideal setup:
define('WP_DEBUG', true);

define('WP_DEBUG_LOG', true);

define('WP_DEBUG_DISPLAY', false);
A D D I N G W P - C L I 

T O Y O U R T O O L K I T
W P - C L I
wp plugin list

wp plugin deactivate

wp plugin activate
wp theme list

wp theme deactivate

wp theme activate
wp checksum core

wp checksum plugin (from version 1.5)
W P T H E M E L I S T R E S U LT
Parse error: syntax error, unexpected '$z9973449' (T_VARIABLE) in /data/sites/web/somewebsite/
www/wp-includes/post-template.php on line 1
Warning: array_splice() expects parameter 1 to be array, string given in /data/sites/web/somewebsite/
www/wp-content/plugins/akismet/favicon_316779.ico(105) : eval()'d code(165) : eval()'d code(202) :
eval()'d code on line 206
Warning: Invalid argument supplied for foreach() in /data/sites/web/somewebsite/www/wp-content/
plugins/akismet/favicon_316779.ico(105) : eval()'d code(165) : eval()'d code(202) : eval()'d code on
line 207
W P T H E M E L I S T R E S U LT
Parse error: syntax error, unexpected '$z9973449' (T_VARIABLE) in /data/sites/web/somewebsite/
www/wp-includes/post-template.php on line 1
Warning: array_splice() expects parameter 1 to be array, string given in /data/sites/web/somewebsite/
www/wp-content/plugins/akismet/favicon_316779.ico(105) :
eval()'d code(165) : eval()'d code(202) : eval()'d code on line 206
Warning: Invalid argument supplied for foreach() in /data/sites/web/somewebsite/www/wp-content/
plugins/akismet/favicon_316779.ico(105) : eval()'d code(165) : eval()'d code(202) : eval()'d code on
line 207
T Y P I C A L E R R O R S 

A N D H O W T O F I X T H E M
Debugging WordPress
Debugging WordPress
Debugging WordPress
Debugging WordPress
Warning: Cannot modify header information - headers already sent by (output started at /data/sites/
web/somewebsite/www/wp-settings.php:84) in /data/sites/web/somewebsite/www/wp-includes/
option.php on line 920
Warning: Cannot modify header information - headers already sent by
(output started at /data/sites/web/somewebsite/www/wp-settings.php:84) in /data/sites/web/
somewebsite/www/wp-includes/option.php on line 920
Warning: Cannot modify header information - headers already sent by
(output started at /data/sites/web/somewebsite/www/wp-settings.php:84) in /data/sites/web/
somewebsite/www/wp-includes/option.php on line 920
Fix: 

Enabe output_buffering
Q U E S T I O N S ?
T H A N K Y O U ! 

S L I D E S W I L L B E T W E E T E D O N 

@ B R E C H RY C K A E R T 



A N D P U B L I S H E D O N
H T T P S : / / B R E C H T RY C K A E R T. C O M

More Related Content

PDF
WordCamp Antwerp - 3/3/2018 - Debugging WordPress by Brecht Ryckaert
PDF
Systems and methods for visual presentation and selection of ivr menu
PDF
Interofficeag.ch
PPT
Windows update
TXT
Saii log
PDF
Marketing pra fotógrafos
DOCX
CM_TX_Devices
PDF
MANUAL PHOTOSHOP CS5
WordCamp Antwerp - 3/3/2018 - Debugging WordPress by Brecht Ryckaert
Systems and methods for visual presentation and selection of ivr menu
Interofficeag.ch
Windows update
Saii log
Marketing pra fotógrafos
CM_TX_Devices
MANUAL PHOTOSHOP CS5

Similar to Debugging WordPress (20)

PDF
Integrating WordPress With Web APIs
PDF
Integrating WordPress With Web APIs
PPTX
Malware Detection with OSSEC HIDS - OSSECCON 2014
PDF
ChatOps: Automating your Company with HipChat, Bitbucket and JIRA Service Desk
PPS
Hacking Client Side Insecurities
PDF
Smashing the stats for fun (and profit)
PDF
OAuth 2.0
PPTX
3DConsulting_Presentation
PPTX
Building a WiFi Hotspot with NodeJS: Cisco Meraki - ExCap API
PDF
Logstash for SEO: come monitorare i Log del Web Server in realtime
PDF
Minor Mistakes In Web Portals
PPTX
Platform agnostic information systems development
PPTX
Real World Lessons on the Pain Points of Node.js Applications
PPT
Derek Pearcy - Reading Users' Minds For Fun And Profit
PDF
OAuth 2.0 – A standard is coming of age by Uwe Friedrichsen
PPT
Widget Summit 2008
PDF
[convergese] Adaptive Images in Responsive Web Design
PPTX
PPTX
Hacking Wordpress Plugins
PPTX
Webinar: Extend The Power of The ForgeRock Identity Platform Through Scripting
Integrating WordPress With Web APIs
Integrating WordPress With Web APIs
Malware Detection with OSSEC HIDS - OSSECCON 2014
ChatOps: Automating your Company with HipChat, Bitbucket and JIRA Service Desk
Hacking Client Side Insecurities
Smashing the stats for fun (and profit)
OAuth 2.0
3DConsulting_Presentation
Building a WiFi Hotspot with NodeJS: Cisco Meraki - ExCap API
Logstash for SEO: come monitorare i Log del Web Server in realtime
Minor Mistakes In Web Portals
Platform agnostic information systems development
Real World Lessons on the Pain Points of Node.js Applications
Derek Pearcy - Reading Users' Minds For Fun And Profit
OAuth 2.0 – A standard is coming of age by Uwe Friedrichsen
Widget Summit 2008
[convergese] Adaptive Images in Responsive Web Design
Hacking Wordpress Plugins
Webinar: Extend The Power of The ForgeRock Identity Platform Through Scripting
Ad

More from Brecht Ryckaert (13)

PDF
Using WordPress as a Static Site Generator
PDF
The Anatomy Of A Hack - WordCamp Sofia 2018
PDF
Scaling WordPress On A Small Budget
PDF
WordPress Meetup Ieper - 15/03/2018 - WordPress Security Best Practices
PDF
WordPress Security - A Top Down Approach
PDF
WordPress Performantie Optimalisatie
PDF
WordPress Performance optimization
PPTX
WordPress Security - Battening down the hatches
PPTX
Speeding up WordPress
PDF
WordPress Security
PPTX
De valkuilen bij het migreren of publiceren van je WordPress website
PPT
Combell Academy - Exchange 2010
PPT
Presentatie Ebook
Using WordPress as a Static Site Generator
The Anatomy Of A Hack - WordCamp Sofia 2018
Scaling WordPress On A Small Budget
WordPress Meetup Ieper - 15/03/2018 - WordPress Security Best Practices
WordPress Security - A Top Down Approach
WordPress Performantie Optimalisatie
WordPress Performance optimization
WordPress Security - Battening down the hatches
Speeding up WordPress
WordPress Security
De valkuilen bij het migreren of publiceren van je WordPress website
Combell Academy - Exchange 2010
Presentatie Ebook
Ad

Recently uploaded (20)

PPTX
Database Information System - Management Information System
PDF
Exploring VPS Hosting Trends for SMBs in 2025
PPTX
artificialintelligenceai1-copy-210604123353.pptx
PPTX
Internet Safety for Seniors presentation
PDF
Containerization lab dddddddddddddddmanual.pdf
PDF
Uptota Investor Deck - Where Africa Meets Blockchain
PDF
si manuel quezon at mga nagawa sa bansang pilipinas
PDF
mera desh ae watn.(a source of motivation and patriotism to the youth of the ...
PDF
Exploring The Internet Of Things(IOT).ppt
PPTX
module 1-Part 1.pptxdddddddddddddddddddddddddddddddddddd
PDF
The Ikigai Template _ Recalibrate How You Spend Your Time.pdf
PDF
Alethe Consulting Corporate Profile and Solution Aproach
PDF
The Evolution of Traditional to New Media .pdf
PDF
📍 LABUAN4D EXCLUSIVE SERVER STAR GAMING ASIA NO.1 TERPOPULER DI INDONESIA ! 🌟
PPTX
curriculumandpedagogyinearlychildhoodcurriculum-171021103104 - Copy.pptx
PPTX
AI_Cyberattack_Solutions AI AI AI AI .pptx
PDF
Smart Home Technology for Health Monitoring (www.kiu.ac.ug)
PPTX
Cyber Hygine IN organizations in MSME or
PPTX
Layers_of_the_Earth_Grade7.pptx class by
PPTX
Top Website Bugs That Hurt User Experience – And How Expert Web Design Fixes
Database Information System - Management Information System
Exploring VPS Hosting Trends for SMBs in 2025
artificialintelligenceai1-copy-210604123353.pptx
Internet Safety for Seniors presentation
Containerization lab dddddddddddddddmanual.pdf
Uptota Investor Deck - Where Africa Meets Blockchain
si manuel quezon at mga nagawa sa bansang pilipinas
mera desh ae watn.(a source of motivation and patriotism to the youth of the ...
Exploring The Internet Of Things(IOT).ppt
module 1-Part 1.pptxdddddddddddddddddddddddddddddddddddd
The Ikigai Template _ Recalibrate How You Spend Your Time.pdf
Alethe Consulting Corporate Profile and Solution Aproach
The Evolution of Traditional to New Media .pdf
📍 LABUAN4D EXCLUSIVE SERVER STAR GAMING ASIA NO.1 TERPOPULER DI INDONESIA ! 🌟
curriculumandpedagogyinearlychildhoodcurriculum-171021103104 - Copy.pptx
AI_Cyberattack_Solutions AI AI AI AI .pptx
Smart Home Technology for Health Monitoring (www.kiu.ac.ug)
Cyber Hygine IN organizations in MSME or
Layers_of_the_Earth_Grade7.pptx class by
Top Website Bugs That Hurt User Experience – And How Expert Web Design Fixes

Debugging WordPress

  • 1. D E B U G G I N G W O R D P R E S S B R E C H T RY C K A E R T
  • 2. B R E C H T RY C K A E R T • Works at combell.com • WP user since 1.5 • Passionate about WordPress Security & Performance
 
 @brechtryckaert
 brechtryckaert.com
  • 3. W H E N L A U N C H I N G Y O U R N E W W E B S I T E
  • 4. O R W H E N U P D AT I N G Y O U R P L U G I N S O R T H E M E S
  • 5. … O R E V E N M I G R AT I N G Y O U R W E B S I T E …
  • 8. W H O ’ S E X P E R I E N C E D T H I S B E F O R E ?
  • 10. T W O K I N D S O F 
 E R R O R C O D E S …
  • 11. 4 0 0 - C O D E S 
 5 0 0 - C O D E S
  • 12. 4 0 0 - C O D E S 
 5 0 0 - C O D E S You stuffed up (client errors) Your server stuffed up (server errors)
  • 13. 400 Bad Request 401 Unauthorized (RFC 7235) 402 Payment Required 403 Forbidden 404 Not Found 405 Method Not Allowed …
  • 14. 500 Internal Server Error 501 Not Implemented 502 Bad Gateway 503 Service Unavailable 504 Gateway Timeout …
  • 15. H O W T O D E B U G ?
  • 16. - S E R V E R L O G S 
 - W P _ D E B U G 
 - W P - C L I
  • 17. S E R V E R L O G S
  • 18. T Y P E S O F E R R O R S I N T H E L O G S • FATAL ERROR • WARNING/NOTICE • LIMIT-RELATED
  • 19. [Sat Feb 10 02:05:22.490389 2018] [error] [pid 5740] mod_proxy_fcgi.c(954): (70007)The timeout specified has expired: [client 141.101.77.82:32531] AH01075: Error dispatching request to : (polling) [Sat Feb 10 03:42:55.356581 2018] [error] [pid 34419] mod_authz_core.c(873): [client 176.62.169.28:27736] AH01630: client denied by server configuration: /data/sites/web/somewebsite.com/.user.ini [Sat Feb 10 10:50:24.838424 2018] [error] [pid 41100] mod_proxy_fcgi.c(954): (70007)The timeout specified has expired: [client 162.158.111.75:24677] AH01075: Error dispatching request to : (polling) [Sat Feb 10 10:50:36.741167 2018] [error] [pid 48392] apache2_util.c(271): [client 172.68.65.254:35087] [client 172.68.65.254] ModSecurity: Access denied with code 403 (phase 2). Matched phrase "SemrushBot" at REQUEST_HEADERS:User-Agent. [file "/usr/local/httpd/conf/modsecurity-crs/activated-rules/modsecurity_crs_35_bad_robots.conf"] [line "20"] [id "990002"] [rev "2"] [msg "Request Indicates a Security Scanner Scanned the Site"] [data "mozilla/5.0 (compatible; semrushb ot/1.2~bl; +http://www.semrush.com/bot.html)"] [severity "CRITICAL"] [ver "OWASP_CRS/2.2.9"] [maturity "9"] [accuracy "9"] [tag "OWASP_CRS/AUTOMATION/SECURITY_SCANNER"] [tag "WASCTC/WASC-21"] [tag "OWASP_TOP_10/A7"] [tag "PCI/6.5.10"] [h ostname “www.somewebsite.com”] [uri "/tag/romeinen/"] [unique_id "Wn7AbE4XLPnYH7fIxTBlGwAAAcY"]
  • 20. [Sat Feb 10 02:05:22.490389 2018] [error] [pid 5740] mod_proxy_fcgi.c(954): (70007)The timeout specified has expired: [client 141.101.77.82:32531] AH01075: Error dispatching request to : (polling) [Sat Feb 10 03:42:55.356581 2018] [error] [pid 34419] mod_authz_core.c(873): [client 176.62.169.28:27736] AH01630: client denied by server configuration:/data/sites/web/somewebsite.com/.user.ini [Sat Feb 10 10:50:24.838424 2018] [error] [pid 41100] mod_proxy_fcgi.c(954): (70007)The timeout specified has expired: [client 162.158.111.75:24677] AH01075: Error dispatching request to : (polling) [Sat Feb 10 10:50:36.741167 2018] [error] [pid 48392] apache2_util.c(271): [client 172.68.65.254:35087] [client 172.68.65.254] ModSecurity: Access denied with code 403 (phase 2). Matched phrase "SemrushBot" at REQUEST_HEADERS:User-Agent. [file "/usr/local/httpd/conf/modsecurity-crs/activated-rules/modsecurity_crs_35_bad_robots.conf"] [line "20"] [id "990002"] [rev "2"] [msg "Request Indicates a Security Scanner Scanned the Site"] [data "mozilla/5.0 (compatible; semrushb ot/1.2~bl; +http://www.semrush.com/bot.html)"] [severity "CRITICAL"] [ver "OWASP_CRS/2.2.9"] [maturity "9"] [accuracy "9"] [tag "OWASP_CRS/AUTOMATION/SECURITY_SCANNER"] [tag "WASCTC/WASC-21"] [tag "OWASP_TOP_10/A7"] [tag "PCI/6.5.10"] [h ostname “www.somewebsite.com”] [uri "/tag/romeinen/"] [unique_id "Wn7AbE4XLPnYH7fIxTBlGwAAAcY"]
  • 21. [Sat Feb 10 02:05:22.490389 2018] [error] [pid 5740] mod_proxy_fcgi.c(954): (70007)The timeout specified has expired: [client 141.101.77.82:32531] AH01075: Error dispatching request to : (polling) [Sat Feb 10 03:42:55.356581 2018] [error] [pid 34419] mod_authz_core.c(873): [client 176.62.169.28:27736] AH01630: client denied by server configuration: /data/sites/web/somewebsite.com/.user.ini [Sat Feb 10 10:50:24.838424 2018] [error] [pid 41100] mod_proxy_fcgi.c(954): (70007)The timeout specified has expired: [client 162.158.111.75:24677] AH01075: Error dispatching request to : (polling) [Sat Feb 10 10:50:36.741167 2018] [error] [pid 48392] apache2_util.c(271): [client 172.68.65.254:35087] [client 172.68.65.254] ModSecurity: Access denied with code 403 (phase 2). Matched phrase "SemrushBot" at REQUEST_HEADERS:User-Agent. [file "/usr/local/httpd/conf/modsecurity-crs/activated-rules/modsecurity_crs_35_bad_robots.conf"] [line "20"] [id "990002"] [rev "2"] [msg "Request Indicates a Security Scanner Scanned the Site"] [data "mozilla/5.0 (compatible; semrushb ot/1.2~bl; +http://www.semrush.com/bot.html)"] [severity "CRITICAL"] [ver "OWASP_CRS/2.2.9"] [maturity "9"] [accuracy "9"] [tag "OWASP_CRS/AUTOMATION/SECURITY_SCANNER"] [tag "WASCTC/WASC-21"] [tag "OWASP_TOP_10/A7"] [tag "PCI/6.5.10"] [h ostname “www.somewebsite.com”] [uri "/tag/romeinen/"] [unique_id "Wn7AbE4XLPnYH7fIxTBlGwAAAcY"]
  • 22. Tue Jan 16 15:10:55.316779 2018] [error] [pid 6002] mod_proxy_fcgi.c(848): [client 178.119.78.83:63467] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught Error: Call to undefined method SitePress::is_display_as_translated_taxonomy() in /data/sites/web/somewebsite/ www/wp-content/plugins/woocommerce-multilingual/inc/class-wcml-dependencies.php:365nStack trace:n#0 /data/sites/web/somewebsite/www/wp-includes/class-wp-hook.php(286): WCML_Dependencies->check_wpml_config('')n#1 /data/sites/web/somewebsite/www/wp-includes/ class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)n#2 /data/sites/web/somewebsite/ www/wp-includes/plugin.php(453): WP_Hook->do_action(Array)n#3 /data/sites/web/somewebsite/ www/wp-settings.php(450): do_action('init')n#4 /data/sites/web/somewebsite/www/wp- config.php(83): require_once('/data/sites/web...')n#5 /data/sites/web/somewebsite/www/wp- load.php(37): require_once('/data/sites/web...')n#6 /data/sites/web/somewebsite/www/wp-admin/ admin-ajax.php(22): require_once('/data/sites/web...')n#7 {main}n  thrown in /data/sites/web/ somewebsite/www/wp-content/plugins/woocommerce-multilingua...n'
  • 23. Tue Jan 16 15:10:55.316779 2018] [error] [pid 6002] mod_proxy_fcgi.c(848): [client 178.119.78.83:63467] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught Error: Call to undefined method SitePress::is_display_as_translated_taxonomy() in /data/sites/web/ somewebsite/www/wp-content/plugins/woocommerce-multilingual/inc/class-wcml-dependencies.php: 365nStack trace:n#0 /data/sites/web/somewebsite/www/wp-includes/class-wp-hook.php(286): WCML_Dependencies->check_wpml_config('')n#1 /data/sites/web/somewebsite/www/wp-includes/ class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)n#2 /data/sites/web/somewebsite/ www/wp-includes/plugin.php(453): WP_Hook->do_action(Array)n#3 /data/sites/web/somewebsite/ www/wp-settings.php(450): do_action('init')n#4 /data/sites/web/somewebsite/www/wp- config.php(83): require_once('/data/sites/web...')n#5 /data/sites/web/somewebsite/www/wp- load.php(37): require_once('/data/sites/web...')n#6 /data/sites/web/somewebsite/www/wp-admin/ admin-ajax.php(22): require_once('/data/sites/web...')n#7 {main}n  thrown in /data/sites/web/ somewebsite/www/wp-content/plugins/woocommerce-multilingua...n'
  • 24. T H E P O W E R O F W P _ D E B U G
  • 25. W P _ D E B U G In wp-config.php: define( 'WP_DEBUG', false ); Enable debugging: define( 'WP_DEBUG', true );
  • 26. W P _ D E B U G Extra statements: define('WP_DEBUG_LOG', true); Creates logfile in: /wp-content/debug.log
  • 27. W P _ D E B U G Prevent public displaying of errors: define('WP_DEBUG_DISPLAY', false);
  • 28. W P _ D E B U G Ideal setup: define('WP_DEBUG', true);
 define('WP_DEBUG_LOG', true);
 define('WP_DEBUG_DISPLAY', false);
  • 29. A D D I N G W P - C L I 
 T O Y O U R T O O L K I T
  • 30. W P - C L I wp plugin list
 wp plugin deactivate
 wp plugin activate wp theme list
 wp theme deactivate
 wp theme activate wp checksum core
 wp checksum plugin (from version 1.5)
  • 31. W P T H E M E L I S T R E S U LT Parse error: syntax error, unexpected '$z9973449' (T_VARIABLE) in /data/sites/web/somewebsite/ www/wp-includes/post-template.php on line 1 Warning: array_splice() expects parameter 1 to be array, string given in /data/sites/web/somewebsite/ www/wp-content/plugins/akismet/favicon_316779.ico(105) : eval()'d code(165) : eval()'d code(202) : eval()'d code on line 206 Warning: Invalid argument supplied for foreach() in /data/sites/web/somewebsite/www/wp-content/ plugins/akismet/favicon_316779.ico(105) : eval()'d code(165) : eval()'d code(202) : eval()'d code on line 207
  • 32. W P T H E M E L I S T R E S U LT Parse error: syntax error, unexpected '$z9973449' (T_VARIABLE) in /data/sites/web/somewebsite/ www/wp-includes/post-template.php on line 1 Warning: array_splice() expects parameter 1 to be array, string given in /data/sites/web/somewebsite/ www/wp-content/plugins/akismet/favicon_316779.ico(105) : eval()'d code(165) : eval()'d code(202) : eval()'d code on line 206 Warning: Invalid argument supplied for foreach() in /data/sites/web/somewebsite/www/wp-content/ plugins/akismet/favicon_316779.ico(105) : eval()'d code(165) : eval()'d code(202) : eval()'d code on line 207
  • 33. T Y P I C A L E R R O R S 
 A N D H O W T O F I X T H E M
  • 38. Warning: Cannot modify header information - headers already sent by (output started at /data/sites/ web/somewebsite/www/wp-settings.php:84) in /data/sites/web/somewebsite/www/wp-includes/ option.php on line 920
  • 39. Warning: Cannot modify header information - headers already sent by (output started at /data/sites/web/somewebsite/www/wp-settings.php:84) in /data/sites/web/ somewebsite/www/wp-includes/option.php on line 920
  • 40. Warning: Cannot modify header information - headers already sent by (output started at /data/sites/web/somewebsite/www/wp-settings.php:84) in /data/sites/web/ somewebsite/www/wp-includes/option.php on line 920 Fix: 
 Enabe output_buffering
  • 41. Q U E S T I O N S ?
  • 42. T H A N K Y O U ! 
 S L I D E S W I L L B E T W E E T E D O N 
 @ B R E C H RY C K A E R T 
 
 A N D P U B L I S H E D O N H T T P S : / / B R E C H T RY C K A E R T. C O M