SlideShare a Scribd company logo
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 …
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 ?
D O E S N ’ T I T M A K E Y O U
F E E L L I K E …
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
…
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
…
500 Internal Server Error
501 Not Implemented
502 Bad Gateway
503 Service Unavailable
504 Gateway Timeout
…
D O N ’ T A S K M E . 

I ’ M C L U E L E S S ; - )
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 C R I P T _ D E B U G
- S AV E Q U E R I E S
- P L U G I N S
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
S C R I P T _ D E B U G
S C R I P T _ D E B U G
Forces WordPress to use the “dev” versions of some
core CSS and JavaScript files rather than the minified
versions that are normally loaded. This is useful when you
are testing modifications to any built-in .js or .css files.
define( 'SCRIPT_DEBUG', true );

S AV E Q U E R I E S
S AV E Q U E R I E S
Force WordPress to store information about queries in a
$wpdb array.
define( 'SAVEQUERIES', true );

S AV E Q U E R I E S
Visualize by adding this to footer.php:
if ( current_user_can( 'administrator' ) ) {
global $wpdb;
echo '<pre>';
print_r( $wpdb->queries );
echo '</pre>';
}

U S E F U L P L U G I N S
C O R E
C O N T R O L
• verify crons
• taking manual control of
upgrades
• do HTTP-logging
• Test HTTP-transport-
methods (GET/POST
requests)
https://wordpress.org/plugins/core-control/
W P D E B U G
B A R
• Verify queries
• Verify cache
• Verify requests
https://wordpress.org/plugins/debug-bar/
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
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
H E A D E R S A L R E A D Y S E N T
P O S S I B L E C A U S E S
• Whitespace before <?php or after ?>
• print, echo and other functions producing output
• Raw <html> sections prior <?php code.
B A C K T O T H E 

( N E A R B Y ) F U T U R E
T I D E
https://make.wordpress.org/tide/
W H AT C A N Y O U D O ?
W H AT C A N Y O U D O ?
Report bugs and issues to the developer
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 T 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

What's hot

Dilon ki Islaah
Dilon ki IslaahDilon ki Islaah
Dilon ki Islaah
Fahad Javed
 
Aimp3 memory manager_eventlog
Aimp3 memory manager_eventlog Aimp3 memory manager_eventlog
Aimp3 memory manager_eventlog
Ahmad Shabri
 
Command
CommandCommand
Command
gajshield
 
Tecnicas de sql injection
Tecnicas de sql injectionTecnicas de sql injection
Tecnicas de sql injection
Alan Resendiz
 
papa pump off grid water pump far away from public utilities - papa ram pump
papa pump   off grid water pump   far away from public utilities - papa ram pumppapa pump   off grid water pump   far away from public utilities - papa ram pump
papa pump off grid water pump far away from public utilities - papa ram pump
tapanma
 
Gi2c FAQ
Gi2c FAQGi2c FAQ
Stalin and soviet industrialisation vox, cepr policy portal
Stalin and soviet industrialisation   vox, cepr policy portalStalin and soviet industrialisation   vox, cepr policy portal
Stalin and soviet industrialisation vox, cepr policy portal
tapanma
 
Joseph stalin national hero or cold blooded murderer- - bbc teach
Joseph stalin  national hero or cold blooded murderer- - bbc teachJoseph stalin  national hero or cold blooded murderer- - bbc teach
Joseph stalin national hero or cold blooded murderer- - bbc teach
tapanma
 
A Little Bit Of Insight 2011
A Little Bit Of Insight 2011A Little Bit Of Insight 2011
A Little Bit Of Insight 2011
Marrianne Garbutt
 
Linuxカーネルを読んで改めて知るプロセスとスレッドの違い
Linuxカーネルを読んで改めて知るプロセスとスレッドの違いLinuxカーネルを読んで改めて知るプロセスとスレッドの違い
Linuxカーネルを読んで改めて知るプロセスとスレッドの違い
Retrieva inc.
 
Ação do MPSC e liminar da justiça sobre esgoto em condomínio de Chapecó
Ação do MPSC e liminar da justiça sobre esgoto em condomínio de ChapecóAção do MPSC e liminar da justiça sobre esgoto em condomínio de Chapecó
Ação do MPSC e liminar da justiça sobre esgoto em condomínio de Chapecó
Ministério Público de Santa Catarina
 
Ecuacionesfuncionales1 1
Ecuacionesfuncionales1 1Ecuacionesfuncionales1 1
Ecuacionesfuncionales1 1
Angélica Quiero Todavía
 
Ecuacionesfuncionales2 1
Ecuacionesfuncionales2 1Ecuacionesfuncionales2 1
Ecuacionesfuncionales2 1
Angélica Quiero Todavía
 

What's hot (13)

Dilon ki Islaah
Dilon ki IslaahDilon ki Islaah
Dilon ki Islaah
 
Aimp3 memory manager_eventlog
Aimp3 memory manager_eventlog Aimp3 memory manager_eventlog
Aimp3 memory manager_eventlog
 
Command
CommandCommand
Command
 
Tecnicas de sql injection
Tecnicas de sql injectionTecnicas de sql injection
Tecnicas de sql injection
 
papa pump off grid water pump far away from public utilities - papa ram pump
papa pump   off grid water pump   far away from public utilities - papa ram pumppapa pump   off grid water pump   far away from public utilities - papa ram pump
papa pump off grid water pump far away from public utilities - papa ram pump
 
Gi2c FAQ
Gi2c FAQGi2c FAQ
Gi2c FAQ
 
Stalin and soviet industrialisation vox, cepr policy portal
Stalin and soviet industrialisation   vox, cepr policy portalStalin and soviet industrialisation   vox, cepr policy portal
Stalin and soviet industrialisation vox, cepr policy portal
 
Joseph stalin national hero or cold blooded murderer- - bbc teach
Joseph stalin  national hero or cold blooded murderer- - bbc teachJoseph stalin  national hero or cold blooded murderer- - bbc teach
Joseph stalin national hero or cold blooded murderer- - bbc teach
 
A Little Bit Of Insight 2011
A Little Bit Of Insight 2011A Little Bit Of Insight 2011
A Little Bit Of Insight 2011
 
Linuxカーネルを読んで改めて知るプロセスとスレッドの違い
Linuxカーネルを読んで改めて知るプロセスとスレッドの違いLinuxカーネルを読んで改めて知るプロセスとスレッドの違い
Linuxカーネルを読んで改めて知るプロセスとスレッドの違い
 
Ação do MPSC e liminar da justiça sobre esgoto em condomínio de Chapecó
Ação do MPSC e liminar da justiça sobre esgoto em condomínio de ChapecóAção do MPSC e liminar da justiça sobre esgoto em condomínio de Chapecó
Ação do MPSC e liminar da justiça sobre esgoto em condomínio de Chapecó
 
Ecuacionesfuncionales1 1
Ecuacionesfuncionales1 1Ecuacionesfuncionales1 1
Ecuacionesfuncionales1 1
 
Ecuacionesfuncionales2 1
Ecuacionesfuncionales2 1Ecuacionesfuncionales2 1
Ecuacionesfuncionales2 1
 

Similar to WordCamp Antwerp - 3/3/2018 - Debugging WordPress by Brecht Ryckaert

Integrating WordPress With Web APIs
Integrating WordPress With Web APIsIntegrating WordPress With Web APIs
Integrating WordPress With Web APIs
randyhoyt
 
Integrating WordPress With Web APIs
Integrating WordPress With Web APIsIntegrating WordPress With Web APIs
Integrating WordPress With Web APIs
randyhoyt
 
Hacking Client Side Insecurities
Hacking Client Side InsecuritiesHacking Client Side Insecurities
Hacking Client Side Insecurities
amiable_indian
 
Real
RealReal
RefCard RESTful API Design
RefCard RESTful API DesignRefCard RESTful API Design
RefCard RESTful API Design
OCTO Technology
 
OAuth 2.0
OAuth 2.0OAuth 2.0
OAuth 2.0
Uwe Friedrichsen
 
Malware Detection with OSSEC HIDS - OSSECCON 2014
Malware Detection with OSSEC HIDS - OSSECCON 2014Malware Detection with OSSEC HIDS - OSSECCON 2014
Malware Detection with OSSEC HIDS - OSSECCON 2014
Santiago Bassett
 
Expanding APIs beyond the Web
Expanding APIs beyond the WebExpanding APIs beyond the Web
Expanding APIs beyond the Web
Tim Messerschmidt
 
Advanced and Hidden WordPress APIs
Advanced and Hidden WordPress APIsAdvanced and Hidden WordPress APIs
Advanced and Hidden WordPress APIs
andrewnacin
 
Building Web-API without Rails, Registration or SMS
Building Web-API without Rails, Registration or SMSBuilding Web-API without Rails, Registration or SMS
Building Web-API without Rails, Registration or SMS
Pivorak MeetUp
 
Fix me if you can - DrupalCon prague
Fix me if you can - DrupalCon pragueFix me if you can - DrupalCon prague
Fix me if you can - DrupalCon prague
hernanibf
 
Webinar - 2020-09-23 - Escape the ticketing turmoil with Teleport PagerDuty &...
Webinar - 2020-09-23 - Escape the ticketing turmoil with Teleport PagerDuty &...Webinar - 2020-09-23 - Escape the ticketing turmoil with Teleport PagerDuty &...
Webinar - 2020-09-23 - Escape the ticketing turmoil with Teleport PagerDuty &...
Teleport
 
OAuth 2.0 – A standard is coming of age by Uwe Friedrichsen
OAuth 2.0 – A standard is coming of age by Uwe FriedrichsenOAuth 2.0 – A standard is coming of age by Uwe Friedrichsen
OAuth 2.0 – A standard is coming of age by Uwe Friedrichsen
Codemotion
 
PHP SA 2014 - Releasing Your Open Source Project
PHP SA 2014 - Releasing Your Open Source ProjectPHP SA 2014 - Releasing Your Open Source Project
PHP SA 2014 - Releasing Your Open Source Project
xsist10
 
Logstash for SEO: come monitorare i Log del Web Server in realtime
Logstash for SEO: come monitorare i Log del Web Server in realtimeLogstash for SEO: come monitorare i Log del Web Server in realtime
Logstash for SEO: come monitorare i Log del Web Server in realtime
Andrea Cardinale
 
3DConsulting_Presentation
3DConsulting_Presentation3DConsulting_Presentation
3DConsulting_Presentation
Joseph Baca
 
Real World Lessons on the Pain Points of Node.js Applications
Real World Lessons on the Pain Points of Node.js ApplicationsReal World Lessons on the Pain Points of Node.js Applications
Real World Lessons on the Pain Points of Node.js Applications
Ben Hall
 
Practical Secure Coding Workshop - {DECIPHER} Hackathon
Practical Secure Coding Workshop - {DECIPHER} HackathonPractical Secure Coding Workshop - {DECIPHER} Hackathon
Practical Secure Coding Workshop - {DECIPHER} Hackathon
Stefan Streichsbier
 
Platform agnostic information systems development
Platform agnostic information systems developmentPlatform agnostic information systems development
Platform agnostic information systems development
Mark Jayson Fuentes
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
Wim Godden
 

Similar to WordCamp Antwerp - 3/3/2018 - Debugging WordPress by Brecht Ryckaert (20)

Integrating WordPress With Web APIs
Integrating WordPress With Web APIsIntegrating WordPress With Web APIs
Integrating WordPress With Web APIs
 
Integrating WordPress With Web APIs
Integrating WordPress With Web APIsIntegrating WordPress With Web APIs
Integrating WordPress With Web APIs
 
Hacking Client Side Insecurities
Hacking Client Side InsecuritiesHacking Client Side Insecurities
Hacking Client Side Insecurities
 
Real
RealReal
Real
 
RefCard RESTful API Design
RefCard RESTful API DesignRefCard RESTful API Design
RefCard RESTful API Design
 
OAuth 2.0
OAuth 2.0OAuth 2.0
OAuth 2.0
 
Malware Detection with OSSEC HIDS - OSSECCON 2014
Malware Detection with OSSEC HIDS - OSSECCON 2014Malware Detection with OSSEC HIDS - OSSECCON 2014
Malware Detection with OSSEC HIDS - OSSECCON 2014
 
Expanding APIs beyond the Web
Expanding APIs beyond the WebExpanding APIs beyond the Web
Expanding APIs beyond the Web
 
Advanced and Hidden WordPress APIs
Advanced and Hidden WordPress APIsAdvanced and Hidden WordPress APIs
Advanced and Hidden WordPress APIs
 
Building Web-API without Rails, Registration or SMS
Building Web-API without Rails, Registration or SMSBuilding Web-API without Rails, Registration or SMS
Building Web-API without Rails, Registration or SMS
 
Fix me if you can - DrupalCon prague
Fix me if you can - DrupalCon pragueFix me if you can - DrupalCon prague
Fix me if you can - DrupalCon prague
 
Webinar - 2020-09-23 - Escape the ticketing turmoil with Teleport PagerDuty &...
Webinar - 2020-09-23 - Escape the ticketing turmoil with Teleport PagerDuty &...Webinar - 2020-09-23 - Escape the ticketing turmoil with Teleport PagerDuty &...
Webinar - 2020-09-23 - Escape the ticketing turmoil with Teleport PagerDuty &...
 
OAuth 2.0 – A standard is coming of age by Uwe Friedrichsen
OAuth 2.0 – A standard is coming of age by Uwe FriedrichsenOAuth 2.0 – A standard is coming of age by Uwe Friedrichsen
OAuth 2.0 – A standard is coming of age by Uwe Friedrichsen
 
PHP SA 2014 - Releasing Your Open Source Project
PHP SA 2014 - Releasing Your Open Source ProjectPHP SA 2014 - Releasing Your Open Source Project
PHP SA 2014 - Releasing Your Open Source Project
 
Logstash for SEO: come monitorare i Log del Web Server in realtime
Logstash for SEO: come monitorare i Log del Web Server in realtimeLogstash for SEO: come monitorare i Log del Web Server in realtime
Logstash for SEO: come monitorare i Log del Web Server in realtime
 
3DConsulting_Presentation
3DConsulting_Presentation3DConsulting_Presentation
3DConsulting_Presentation
 
Real World Lessons on the Pain Points of Node.js Applications
Real World Lessons on the Pain Points of Node.js ApplicationsReal World Lessons on the Pain Points of Node.js Applications
Real World Lessons on the Pain Points of Node.js Applications
 
Practical Secure Coding Workshop - {DECIPHER} Hackathon
Practical Secure Coding Workshop - {DECIPHER} HackathonPractical Secure Coding Workshop - {DECIPHER} Hackathon
Practical Secure Coding Workshop - {DECIPHER} Hackathon
 
Platform agnostic information systems development
Platform agnostic information systems developmentPlatform agnostic information systems development
Platform agnostic information systems development
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
 

More from Brecht Ryckaert

Using WordPress as a Static Site Generator
Using WordPress as a Static Site GeneratorUsing WordPress as a Static Site Generator
Using WordPress as a Static Site Generator
Brecht Ryckaert
 
The Anatomy Of A Hack - WordCamp Sofia 2018
The Anatomy Of A Hack - WordCamp Sofia 2018The Anatomy Of A Hack - WordCamp Sofia 2018
The Anatomy Of A Hack - WordCamp Sofia 2018
Brecht Ryckaert
 
Scaling WordPress On A Small Budget
Scaling WordPress On A Small BudgetScaling WordPress On A Small Budget
Scaling WordPress On A Small Budget
Brecht Ryckaert
 
WordPress Meetup Ieper - 15/03/2018 - WordPress Security Best Practices
WordPress Meetup Ieper - 15/03/2018 - WordPress Security Best PracticesWordPress Meetup Ieper - 15/03/2018 - WordPress Security Best Practices
WordPress Meetup Ieper - 15/03/2018 - WordPress Security Best Practices
Brecht Ryckaert
 
WordPress Security - A Top Down Approach
WordPress Security - A Top Down ApproachWordPress Security - A Top Down Approach
WordPress Security - A Top Down Approach
Brecht Ryckaert
 
WordPress Performantie Optimalisatie
WordPress Performantie OptimalisatieWordPress Performantie Optimalisatie
WordPress Performantie Optimalisatie
Brecht Ryckaert
 
WordPress Performance optimization
WordPress Performance optimizationWordPress Performance optimization
WordPress Performance optimization
Brecht Ryckaert
 
WordPress Security - Battening down the hatches
WordPress Security - Battening down the hatchesWordPress Security - Battening down the hatches
WordPress Security - Battening down the hatches
Brecht Ryckaert
 
Speeding up WordPress
Speeding up WordPressSpeeding up WordPress
Speeding up WordPress
Brecht Ryckaert
 
WordPress Security
WordPress SecurityWordPress Security
WordPress Security
Brecht Ryckaert
 
De valkuilen bij het migreren of publiceren van je WordPress website
De valkuilen bij het migreren of publiceren van je WordPress websiteDe valkuilen bij het migreren of publiceren van je WordPress website
De valkuilen bij het migreren of publiceren van je WordPress website
Brecht Ryckaert
 
Combell Academy - Exchange 2010
Combell Academy - Exchange 2010Combell Academy - Exchange 2010
Combell Academy - Exchange 2010
Brecht Ryckaert
 
Presentatie Ebook
Presentatie EbookPresentatie Ebook
Presentatie Ebook
Brecht Ryckaert
 

More from Brecht Ryckaert (13)

Using WordPress as a Static Site Generator
Using WordPress as a Static Site GeneratorUsing WordPress as a Static Site Generator
Using WordPress as a Static Site Generator
 
The Anatomy Of A Hack - WordCamp Sofia 2018
The Anatomy Of A Hack - WordCamp Sofia 2018The Anatomy Of A Hack - WordCamp Sofia 2018
The Anatomy Of A Hack - WordCamp Sofia 2018
 
Scaling WordPress On A Small Budget
Scaling WordPress On A Small BudgetScaling WordPress On A Small Budget
Scaling WordPress On A Small Budget
 
WordPress Meetup Ieper - 15/03/2018 - WordPress Security Best Practices
WordPress Meetup Ieper - 15/03/2018 - WordPress Security Best PracticesWordPress Meetup Ieper - 15/03/2018 - WordPress Security Best Practices
WordPress Meetup Ieper - 15/03/2018 - WordPress Security Best Practices
 
WordPress Security - A Top Down Approach
WordPress Security - A Top Down ApproachWordPress Security - A Top Down Approach
WordPress Security - A Top Down Approach
 
WordPress Performantie Optimalisatie
WordPress Performantie OptimalisatieWordPress Performantie Optimalisatie
WordPress Performantie Optimalisatie
 
WordPress Performance optimization
WordPress Performance optimizationWordPress Performance optimization
WordPress Performance optimization
 
WordPress Security - Battening down the hatches
WordPress Security - Battening down the hatchesWordPress Security - Battening down the hatches
WordPress Security - Battening down the hatches
 
Speeding up WordPress
Speeding up WordPressSpeeding up WordPress
Speeding up WordPress
 
WordPress Security
WordPress SecurityWordPress Security
WordPress Security
 
De valkuilen bij het migreren of publiceren van je WordPress website
De valkuilen bij het migreren of publiceren van je WordPress websiteDe valkuilen bij het migreren of publiceren van je WordPress website
De valkuilen bij het migreren of publiceren van je WordPress website
 
Combell Academy - Exchange 2010
Combell Academy - Exchange 2010Combell Academy - Exchange 2010
Combell Academy - Exchange 2010
 
Presentatie Ebook
Presentatie EbookPresentatie Ebook
Presentatie Ebook
 

Recently uploaded

一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理
k4ncd0z
 
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
xjq03c34
 
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
APNIC
 
Discover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to IndiaDiscover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to India
davidjhones387
 
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
APNIC
 
Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?
Paul Walk
 
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
3a0sd7z3
 
HijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process HollowingHijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process Hollowing
Donato Onofri
 
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
thezot
 
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
rtunex8r
 
Bengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal BrandingBengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal Branding
Tarandeep Singh
 
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
3a0sd7z3
 

Recently uploaded (12)

一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理
 
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
 
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
 
Discover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to IndiaDiscover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to India
 
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
 
Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?
 
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
 
HijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process HollowingHijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process Hollowing
 
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
 
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
 
Bengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal BrandingBengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal Branding
 
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
 

WordCamp Antwerp - 3/3/2018 - Debugging WordPress by Brecht Ryckaert

  • 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 …
  • 6.
  • 7.
  • 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 ?
  • 9. D O E S N ’ T I T M A K E Y O U F E E L L I K E …
  • 10.
  • 11. T W O K I N D S O F 
 E R R O R C O D E S …
  • 12. 4 0 0 - C O D E S 
 5 0 0 - C O D E S
  • 13. 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)
  • 14. 400 Bad Request 401 Unauthorized (RFC 7235) 402 Payment Required 403 Forbidden 404 Not Found 405 Method Not Allowed …
  • 15. 400 Bad Request 401 Unauthorized (RFC 7235) 402 Payment Required 403 Forbidden 404 Not Found 405 Method Not Allowed …
  • 16. 500 Internal Server Error 501 Not Implemented 502 Bad Gateway 503 Service Unavailable 504 Gateway Timeout …
  • 17. 500 Internal Server Error 501 Not Implemented 502 Bad Gateway 503 Service Unavailable 504 Gateway Timeout … D O N ’ T A S K M E . 
 I ’ M C L U E L E S S ; - )
  • 18. H O W T O D E B U G ?
  • 19. - S E R V E R L O G S 
 - W P _ D E B U G 
 - W P - C L I - S C R I P T _ D E B U G - S AV E Q U E R I E S - P L U G I N S
  • 20. S E R V E R L O G S
  • 21. 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
  • 22. [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"]
  • 23. [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"]
  • 24. [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"]
  • 25. 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'
  • 26. 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'
  • 27. T H E P O W E R O F W P _ D E B U G
  • 28. W P _ D E B U G In wp-config.php: define( 'WP_DEBUG', false ); Enable debugging: define( 'WP_DEBUG', true );
  • 29. W P _ D E B U G Extra statements: define('WP_DEBUG_LOG', true); Creates logfile in: /wp-content/debug.log
  • 30. W P _ D E B U G Prevent public displaying of errors: define('WP_DEBUG_DISPLAY', false);
  • 31. W P _ D E B U G Ideal setup: define('WP_DEBUG', true);
 define('WP_DEBUG_LOG', true);
 define('WP_DEBUG_DISPLAY', false);
  • 32. A D D I N G W P - C L I 
 T O Y O U R T O O L K I T
  • 33. 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)
  • 34. 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
  • 35. 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
  • 36. S C R I P T _ D E B U G
  • 37. S C R I P T _ D E B U G Forces WordPress to use the “dev” versions of some core CSS and JavaScript files rather than the minified versions that are normally loaded. This is useful when you are testing modifications to any built-in .js or .css files. define( 'SCRIPT_DEBUG', true );

  • 38. S AV E Q U E R I E S
  • 39. S AV E Q U E R I E S Force WordPress to store information about queries in a $wpdb array. define( 'SAVEQUERIES', true );

  • 40. S AV E Q U E R I E S Visualize by adding this to footer.php: if ( current_user_can( 'administrator' ) ) { global $wpdb; echo '<pre>'; print_r( $wpdb->queries ); echo '</pre>'; }

  • 41. U S E F U L P L U G I N S
  • 42. C O R E C O N T R O L • verify crons • taking manual control of upgrades • do HTTP-logging • Test HTTP-transport- methods (GET/POST requests) https://wordpress.org/plugins/core-control/
  • 43. W P D E B U G B A R • Verify queries • Verify cache • Verify requests https://wordpress.org/plugins/debug-bar/
  • 44. 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
  • 45.
  • 46.
  • 47.
  • 48.
  • 49. 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
  • 50. 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
  • 51. H E A D E R S A L R E A D Y S E N T P O S S I B L E C A U S E S • Whitespace before <?php or after ?> • print, echo and other functions producing output • Raw <html> sections prior <?php code.
  • 52. B A C K T O T H E 
 ( N E A R B Y ) F U T U R E
  • 53. T I D E https://make.wordpress.org/tide/
  • 54. W H AT C A N Y O U D O ?
  • 55. W H AT C A N Y O U D O ? Report bugs and issues to the developer
  • 56. Q U E S T I O N S ?
  • 57. 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 T 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