SlideShare a Scribd company logo
Diagnosing WordPress
Presented by Tim Butler
What do to when things go wrong
Who am I?
● IT professional with 20 years experience
● Head of infrastructure at Conetix
● NGINX Cookbook author
● Certified beer judge
Infrequent ramblings on Twitter: @timbutler
Probably seen more errors than Stack Overflow!
About this talk….
Aimed at developers and agencies
Just as applicable to business owners
Start with the basics and work our way up
Before we get started…..
One quick takeaway….
Make sure you have a backup!!
How you usually find out there’s a
problem...
“WHY IS MY WEBSITE DOWN!!!!”
Additional management “assistance”
Software equivalent of what you’re facing
What you actually need….
The path to Zen
Where we’ll be focussing
Preparation
Preparation
● Having a known state to compare to
○ Known plugins and versions installed
○ Known errors or PHP warnings
https://en-au.wordpress.org/plugins/stream/
● Ability to track changes
Preparation
Monitoring
Monitoring
Forearmed is forewarned
Monitoring
● You want to know of issues before your clients
● System MUST have a point of presence in Australia
https://statuscake.com https://www.panopta.com/
Monitoring
Diagnostics
Diagnostics
OR
Catastrophic error…..
Diagnostics - Server Logs
Diagnostics - Server Logs
Let's look in the logs...
Diagnostics - Server Logs
80% of your issues will be identified in the logs
wp-content/plugins/tims-shady-plugin/tims-shady-plugin.php
Diagnostics - Server Logs
Consider centralised logging
SaaS Open Source
(host yourself)
https://papertrailapp.com/ https://www.graylog.org/
Diagnostics - Server Logs
24 hour snapshot
Diagnostics
Hard failures = easy to find
“Sometimes the site is slow to load”
“Two out of the 5,000 products in my store have an issue”
“My site seems slower this month”
“My site works perfectly for my customers but wp-admin takes forever”
Soft failures = harder...
WordPress Debugging
Diagnostics - WordPress Debugging
Great way to see more info on soft failures eg,
“Two out of the 5,000 products in my store have an issue”
Diagnostics - WordPress Debugging
PHP / WordPress Log levels
Normal Debug enabled
Diagnostics - WordPress Debugging
Enable via management tools:
Or in the wp-config.php:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
Diagnostics - WordPress Debugging
By default: wp-content/debug.log
[23-Jul-2018 06:32:09 UTC] PHP Notice: Undefined index: country in
/var/www/vhosts/wcsyd2.conetixtest.com/httpdocs/wp-content/plugins/woocommerce/includes/class-wc-geolite-integration.php on line 60
[23-Jul-2018 06:32:09 UTC] PHP Stack trace:
[23-Jul-2018 06:32:09 UTC] PHP 1. {main}() /var/www/vhosts/wcsyd2.conetixtest.com/httpdocs/index.php:0
[23-Jul-2018 06:32:09 UTC] PHP 2. require() /var/www/vhosts/wcsyd2.conetixtest.com/httpdocs/index.php:17
[23-Jul-2018 06:32:09 UTC] PHP 3. require_once() /var/www/vhosts/wcsyd2.conetixtest.com/httpdocs/wp-blog-header.php:13
[23-Jul-2018 06:32:09 UTC] PHP 4. require_once() /var/www/vhosts/wcsyd2.conetixtest.com/httpdocs/wp-load.php:37
[23-Jul-2018 06:32:09 UTC] PHP 5. require_once() /var/www/vhosts/wcsyd2.conetixtest.com/httpdocs/wp-config.php:80
[23-Jul-2018 06:32:09 UTC] PHP 6. do_action() /var/www/vhosts/wcsyd2.conetixtest.com/httpdocs/wp-settings.php:450
[23-Jul-2018 06:32:09 UTC] PHP 7. WP_Hook->do_action() /var/www/vhosts/wcsyd2.conetixtest.com/httpdocs/wp-includes/plugin.php:453
[23-Jul-2018 06:32:09 UTC] PHP 8. WP_Hook->apply_filters() /var/www/vhosts/wcsyd2.conetixtest.com/httpdocs/wp-includes/class-wp-hook.php:310
[23-Jul-2018 06:32:09 UTC] PHP 9. WooCommerce->init() /var/www/vhosts/wcsyd2.conetixtest.com/httpdocs/wp-includes/class-wp-hook.php:286
[23-Jul-2018 06:32:09 UTC] PHP 10. WC_Customer->__construct()
/var/www/vhosts/wcsyd2.conetixtest.com/httpdocs/wp-content/plugins/woocommerce/includes/class-woocommerce.php:480
[23-Jul-2018 06:32:09 UTC] PHP 11. WC_Data_Store->read()
/var/www/vhosts/wcsyd2.conetixtest.com/httpdocs/wp-content/plugins/woocommerce/includes/class-wc-customer.php:116
[23-Jul-2018 06:32:09 UTC] PHP 12. WC_Customer_Data_Store_Session->read()
/var/www/vhosts/wcsyd2.conetixtest.com/httpdocs/wp-content/plugins/woocommerce/includes/class-wc-data-store.php:156
[23-Jul-2018 06:32:09 UTC] PHP 13. WC_Customer_Data_Store_Session->set_defaults()
…...
Diagnostics - Diving a little deeper
Diagnostics
Make sure you have a backup!
Next items - run on staging / dev copy
Diagnostics - Diving a little deeper
https://en-au.wordpress.org/plugins/query-monitor/
What if there’s no errors in the logs?
Diagnostics - Query Monitor
● Shows database queries
● See WordPress hooks
● See Theme templates used
● See HTTP calls
● … And more!
Diagnostics - Query Monitor
0.06 second page load
3.8MB peak memory
0.003 second db queries
19 database queries
Diagnostics - Query Monitor
Database
Diagnostics - Query Monitor
Templates
Diagnostics - Query Monitor
HTTP Calls
Diagnostics - Query Monitor
“Something’s loading JQuery twice….”
Diagnostics - Query Monitor
What’s the impact of WooCommerce?
Diagnostics - Query Monitor
“Admin is slower..”
Some premium plugins can have issues refreshing,
with a 30 second timeout
HTTP Calls
We need to go deeper
Diagnostics - Query Monitor
Diagnostics
Warning: These examples require root access to a server
(your dev server!) or a localised, development install.
Diagnostics - Digging Deeper
Option 1 - XDebug
“Xdebug is an extension for PHP to assist with debugging and development. It contains a
single step debugger to use with IDEs; it upgrades PHP's var_dump() function; it adds
stack traces for Notices, Warnings, Errors and Exceptions; it features functionality for
recording every function call and variable assignment to disk; it contains a profiler; and
it provides code coverage functionality for use with PHPUnit.”
https://xdebug.org/
Diagnostics - XDebug
Debugging WordPress with xDebug
2:10 pm - Alex Bishop
Diagnostics - XDebug
If it’s compiled in:
zend_extension=xdebug.so
xdebug.profiler_enable_trigger=1
xdebug.profiler_enable_trigger_value=wordcamptest
Diagnostics - XDebug
“My website is slow”
Not database queries…. Must be code
Diagnostics - XDebug
Creates /tmp/cachegrind.out.26139.07d29e
Diagnostics - XDebug KCachegrind / QCachegrind
Webgrind
IDE (PHPStorm)
72.45% time was in apply_filters
This was a single call to excellent_coding
In this function was 100 calls to
password_hash
Diagnostics - XDebug
z
Really shouldn’t let this developer near an editor
wp-content/plugins/tims-shady-plugin/tims-shady-plugin.php
Diagnostics - XDebug
Debugging WordPress with xDebug
2:10 pm - Alex Bishop
Diagnostics - Digging Deeper
Option 2 - New Relic / APM
https://newrelic.com/
“A complete view of your applications and operating environment”
APM = Application Performance Management
Diagnostics - New Relic
WordPress specific Tools
Other APM’s also available
Diagnostics - New Relic (Lite)
Option 2 - New Relic
Diagnostics - New Relic (Lite)
Diagnostics - New Relic (Lite)
Diagnostics - New Relic (Essentials)
Hooks
Diagnostics - New Relic (Essentials)
Plugins and Themes
Diagnostics - New Relic (Essentials)
Database
Two quick, get out of jail free cards
Get out of Jail free cards
Check wp_options table for expired transients
Check WordPress core files via WP-CLI
wp core verify-checksums
Summary
Summary
1. Remember your path to Zen
2. Find your server log locations
3. Familiarise yourself with the tools before you need them
One final reminder...
Make sure you have a backup!!
Questions?
Feel free to ask in person
or via @timbutler

More Related Content

What's hot

Hybrid app
Hybrid appHybrid app
Hybrid app
hyun soomyung
 
Introduction to PhoneGap and PhoneGap Build
Introduction to PhoneGap and PhoneGap BuildIntroduction to PhoneGap and PhoneGap Build
Introduction to PhoneGap and PhoneGap Build
Martin de Keijzer
 
Automatic testing and quality assurance for WordPress plugins
Automatic testing and quality assurance for WordPress pluginsAutomatic testing and quality assurance for WordPress plugins
Automatic testing and quality assurance for WordPress plugins
Otto Kekäläinen
 
Testing and updating WordPress - Advanced techniques for avoiding regressions
Testing and updating WordPress - Advanced techniques for avoiding regressionsTesting and updating WordPress - Advanced techniques for avoiding regressions
Testing and updating WordPress - Advanced techniques for avoiding regressions
Otto Kekäläinen
 
html5 & phonegap
html5 & phonegaphtml5 & phonegap
html5 & phonegap
Caesar Chi
 
Google在Web前端方面的经验
Google在Web前端方面的经验Google在Web前端方面的经验
Google在Web前端方面的经验yiditushe
 
Drupal Development Tips
Drupal Development TipsDrupal Development Tips
Drupal Development Tips
Chris Tankersley
 
Nahlédněte za oponu VersionPressu
Nahlédněte za oponu VersionPressuNahlédněte za oponu VersionPressu
Nahlédněte za oponu VersionPressu
Jan Voracek
 
Even Faster Web Sites at jQuery Conference '09
Even Faster Web Sites at jQuery Conference '09Even Faster Web Sites at jQuery Conference '09
Even Faster Web Sites at jQuery Conference '09
Steve Souders
 
Leveraging Continuous Integration For Fun And Profit!
Leveraging Continuous Integration For Fun And Profit!Leveraging Continuous Integration For Fun And Profit!
Leveraging Continuous Integration For Fun And Profit!
Jess Chadwick
 
Magento with Composer
Magento with ComposerMagento with Composer
Magento with Composer
AOE
 
Passo a Passo para criar uma aplicação Móvel Híbrida
Passo a Passo para criar uma aplicação Móvel HíbridaPasso a Passo para criar uma aplicação Móvel Híbrida
Passo a Passo para criar uma aplicação Móvel Híbrida
Juliano Martins
 
Sara Harkousse - "Web Components: It's all rainbows and unicorns! Is it?"
Sara Harkousse - "Web Components: It's all rainbows and unicorns! Is it?"Sara Harkousse - "Web Components: It's all rainbows and unicorns! Is it?"
Sara Harkousse - "Web Components: It's all rainbows and unicorns! Is it?"
IT Event
 
How QCLean Works? Introduction to Browser Extensions
How QCLean Works? Introduction to Browser ExtensionsHow QCLean Works? Introduction to Browser Extensions
How QCLean Works? Introduction to Browser Extensions
Qing-Cheng Li
 
Puppeteer - Headless Chrome Node API
Puppeteer - Headless Chrome Node APIPuppeteer - Headless Chrome Node API
Puppeteer - Headless Chrome Node API
ubunturk
 
Desarrollo Profesional con PHP 2014/15 - Nivel Bajo / Medio
Desarrollo Profesional con PHP 2014/15 - Nivel Bajo / MedioDesarrollo Profesional con PHP 2014/15 - Nivel Bajo / Medio
Desarrollo Profesional con PHP 2014/15 - Nivel Bajo / Medio
Carlos Buenosvinos
 
Mykhailo Bodnarchuk "The history of the Codeception project"
Mykhailo Bodnarchuk "The history of the Codeception project"Mykhailo Bodnarchuk "The history of the Codeception project"
Mykhailo Bodnarchuk "The history of the Codeception project"
Fwdays
 
Puppeteer - A web scraping & UI Testing Tool
Puppeteer - A web scraping & UI Testing ToolPuppeteer - A web scraping & UI Testing Tool
Puppeteer - A web scraping & UI Testing Tool
Miki Lombardi
 

What's hot (20)

Hybrid app
Hybrid appHybrid app
Hybrid app
 
Introduction to PhoneGap and PhoneGap Build
Introduction to PhoneGap and PhoneGap BuildIntroduction to PhoneGap and PhoneGap Build
Introduction to PhoneGap and PhoneGap Build
 
Automatic testing and quality assurance for WordPress plugins
Automatic testing and quality assurance for WordPress pluginsAutomatic testing and quality assurance for WordPress plugins
Automatic testing and quality assurance for WordPress plugins
 
Testing and updating WordPress - Advanced techniques for avoiding regressions
Testing and updating WordPress - Advanced techniques for avoiding regressionsTesting and updating WordPress - Advanced techniques for avoiding regressions
Testing and updating WordPress - Advanced techniques for avoiding regressions
 
html5 & phonegap
html5 & phonegaphtml5 & phonegap
html5 & phonegap
 
Sxsw 20090314
Sxsw 20090314Sxsw 20090314
Sxsw 20090314
 
Google在Web前端方面的经验
Google在Web前端方面的经验Google在Web前端方面的经验
Google在Web前端方面的经验
 
Drupal Development Tips
Drupal Development TipsDrupal Development Tips
Drupal Development Tips
 
Nahlédněte za oponu VersionPressu
Nahlédněte za oponu VersionPressuNahlédněte za oponu VersionPressu
Nahlédněte za oponu VersionPressu
 
Even Faster Web Sites at jQuery Conference '09
Even Faster Web Sites at jQuery Conference '09Even Faster Web Sites at jQuery Conference '09
Even Faster Web Sites at jQuery Conference '09
 
Leveraging Continuous Integration For Fun And Profit!
Leveraging Continuous Integration For Fun And Profit!Leveraging Continuous Integration For Fun And Profit!
Leveraging Continuous Integration For Fun And Profit!
 
Magento with Composer
Magento with ComposerMagento with Composer
Magento with Composer
 
Passo a Passo para criar uma aplicação Móvel Híbrida
Passo a Passo para criar uma aplicação Móvel HíbridaPasso a Passo para criar uma aplicação Móvel Híbrida
Passo a Passo para criar uma aplicação Móvel Híbrida
 
Js unit testing
Js unit testingJs unit testing
Js unit testing
 
Sara Harkousse - "Web Components: It's all rainbows and unicorns! Is it?"
Sara Harkousse - "Web Components: It's all rainbows and unicorns! Is it?"Sara Harkousse - "Web Components: It's all rainbows and unicorns! Is it?"
Sara Harkousse - "Web Components: It's all rainbows and unicorns! Is it?"
 
How QCLean Works? Introduction to Browser Extensions
How QCLean Works? Introduction to Browser ExtensionsHow QCLean Works? Introduction to Browser Extensions
How QCLean Works? Introduction to Browser Extensions
 
Puppeteer - Headless Chrome Node API
Puppeteer - Headless Chrome Node APIPuppeteer - Headless Chrome Node API
Puppeteer - Headless Chrome Node API
 
Desarrollo Profesional con PHP 2014/15 - Nivel Bajo / Medio
Desarrollo Profesional con PHP 2014/15 - Nivel Bajo / MedioDesarrollo Profesional con PHP 2014/15 - Nivel Bajo / Medio
Desarrollo Profesional con PHP 2014/15 - Nivel Bajo / Medio
 
Mykhailo Bodnarchuk "The history of the Codeception project"
Mykhailo Bodnarchuk "The history of the Codeception project"Mykhailo Bodnarchuk "The history of the Codeception project"
Mykhailo Bodnarchuk "The history of the Codeception project"
 
Puppeteer - A web scraping & UI Testing Tool
Puppeteer - A web scraping & UI Testing ToolPuppeteer - A web scraping & UI Testing Tool
Puppeteer - A web scraping & UI Testing Tool
 

Similar to Diagnosing WordPress: What to do when things go wrong

WordPress Plugin Development 201
WordPress Plugin Development 201WordPress Plugin Development 201
WordPress Plugin Development 201ylefebvre
 
Effizientere WordPress-Plugin-Entwicklung mit Softwaretests
Effizientere WordPress-Plugin-Entwicklung mit SoftwaretestsEffizientere WordPress-Plugin-Entwicklung mit Softwaretests
Effizientere WordPress-Plugin-Entwicklung mit Softwaretests
DECK36
 
Xdebug - Derick Rethans - Barcelona PHP Conference 2008
Xdebug - Derick Rethans - Barcelona PHP Conference 2008Xdebug - Derick Rethans - Barcelona PHP Conference 2008
Xdebug - Derick Rethans - Barcelona PHP Conference 2008phpbarcelona
 
Debugging - Figuring it out yourself (WordCamp Dublin 2019)
Debugging - Figuring it out yourself (WordCamp Dublin 2019)Debugging - Figuring it out yourself (WordCamp Dublin 2019)
Debugging - Figuring it out yourself (WordCamp Dublin 2019)
Damien Carbery
 
PHP: Debugger, Profiler and more
PHP: Debugger, Profiler and morePHP: Debugger, Profiler and more
PHP: Debugger, Profiler and more
Võ Duy Tuấn
 
Improving qa on php projects
Improving qa on php projectsImproving qa on php projects
Improving qa on php projects
Michelangelo van Dam
 
Debugging PHP with xDebug inside of Eclipse PDT 2.1
Debugging PHP with xDebug inside of Eclipse PDT 2.1Debugging PHP with xDebug inside of Eclipse PDT 2.1
Debugging PHP with xDebug inside of Eclipse PDT 2.1
Bastian Feder
 
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Bastian Feder
 
Xdebug
XdebugXdebug
Xdebug
Bryce Embry
 
5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY
5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY
5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY
William Chong
 
Xdebug from a to x
Xdebug from a to xXdebug from a to x
Xdebug from a to x
Gennady Feldman
 
Zepplin_Pronko_Magento_Festival Hall 1_Final
Zepplin_Pronko_Magento_Festival Hall 1_FinalZepplin_Pronko_Magento_Festival Hall 1_Final
Zepplin_Pronko_Magento_Festival Hall 1_FinalMax Pronko
 
Spug pt session2 - debuggingl
Spug pt session2 - debugginglSpug pt session2 - debuggingl
Spug pt session2 - debuggingl
Comunidade Portuguesa de SharePoiint
 
IDE and Toolset For Magento Development
IDE and Toolset For Magento DevelopmentIDE and Toolset For Magento Development
IDE and Toolset For Magento Development
Abid Malik
 
Security, more important than ever!
Security, more important than ever!Security, more important than ever!
Security, more important than ever!
Marko Heijnen
 
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
Otto Kekäläinen
 
Php through the eyes of a hoster: PHPNW10
Php through the eyes of a hoster: PHPNW10Php through the eyes of a hoster: PHPNW10
Php through the eyes of a hoster: PHPNW10
Combell NV
 
Use Xdebug to profile PHP
Use Xdebug to profile PHPUse Xdebug to profile PHP
Use Xdebug to profile PHP
Seravo
 
Xdebug - Your first, last, and best option for troubleshooting PHP code
Xdebug - Your first, last, and best option for troubleshooting PHP codeXdebug - Your first, last, and best option for troubleshooting PHP code
Xdebug - Your first, last, and best option for troubleshooting PHP code
Adam Englander
 
The swiss knife of a word press developer
The swiss knife of a word press developerThe swiss knife of a word press developer
The swiss knife of a word press developer
Ivelina Dimova
 

Similar to Diagnosing WordPress: What to do when things go wrong (20)

WordPress Plugin Development 201
WordPress Plugin Development 201WordPress Plugin Development 201
WordPress Plugin Development 201
 
Effizientere WordPress-Plugin-Entwicklung mit Softwaretests
Effizientere WordPress-Plugin-Entwicklung mit SoftwaretestsEffizientere WordPress-Plugin-Entwicklung mit Softwaretests
Effizientere WordPress-Plugin-Entwicklung mit Softwaretests
 
Xdebug - Derick Rethans - Barcelona PHP Conference 2008
Xdebug - Derick Rethans - Barcelona PHP Conference 2008Xdebug - Derick Rethans - Barcelona PHP Conference 2008
Xdebug - Derick Rethans - Barcelona PHP Conference 2008
 
Debugging - Figuring it out yourself (WordCamp Dublin 2019)
Debugging - Figuring it out yourself (WordCamp Dublin 2019)Debugging - Figuring it out yourself (WordCamp Dublin 2019)
Debugging - Figuring it out yourself (WordCamp Dublin 2019)
 
PHP: Debugger, Profiler and more
PHP: Debugger, Profiler and morePHP: Debugger, Profiler and more
PHP: Debugger, Profiler and more
 
Improving qa on php projects
Improving qa on php projectsImproving qa on php projects
Improving qa on php projects
 
Debugging PHP with xDebug inside of Eclipse PDT 2.1
Debugging PHP with xDebug inside of Eclipse PDT 2.1Debugging PHP with xDebug inside of Eclipse PDT 2.1
Debugging PHP with xDebug inside of Eclipse PDT 2.1
 
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
 
Xdebug
XdebugXdebug
Xdebug
 
5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY
5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY
5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY
 
Xdebug from a to x
Xdebug from a to xXdebug from a to x
Xdebug from a to x
 
Zepplin_Pronko_Magento_Festival Hall 1_Final
Zepplin_Pronko_Magento_Festival Hall 1_FinalZepplin_Pronko_Magento_Festival Hall 1_Final
Zepplin_Pronko_Magento_Festival Hall 1_Final
 
Spug pt session2 - debuggingl
Spug pt session2 - debugginglSpug pt session2 - debuggingl
Spug pt session2 - debuggingl
 
IDE and Toolset For Magento Development
IDE and Toolset For Magento DevelopmentIDE and Toolset For Magento Development
IDE and Toolset For Magento Development
 
Security, more important than ever!
Security, more important than ever!Security, more important than ever!
Security, more important than ever!
 
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
 
Php through the eyes of a hoster: PHPNW10
Php through the eyes of a hoster: PHPNW10Php through the eyes of a hoster: PHPNW10
Php through the eyes of a hoster: PHPNW10
 
Use Xdebug to profile PHP
Use Xdebug to profile PHPUse Xdebug to profile PHP
Use Xdebug to profile PHP
 
Xdebug - Your first, last, and best option for troubleshooting PHP code
Xdebug - Your first, last, and best option for troubleshooting PHP codeXdebug - Your first, last, and best option for troubleshooting PHP code
Xdebug - Your first, last, and best option for troubleshooting PHP code
 
The swiss knife of a word press developer
The swiss knife of a word press developerThe swiss knife of a word press developer
The swiss knife of a word press developer
 

More from WordCamp Sydney

Don’t Panic: How To Troubleshoot Your WordPress Site
Don’t Panic: How To Troubleshoot Your WordPress SiteDon’t Panic: How To Troubleshoot Your WordPress Site
Don’t Panic: How To Troubleshoot Your WordPress Site
WordCamp Sydney
 
WordPress Hosting Survival Guide
WordPress Hosting Survival Guide WordPress Hosting Survival Guide
WordPress Hosting Survival Guide
WordCamp Sydney
 
Preparing For The Flood. How Do You Conduct Load Testing To Ready Your WordPr...
Preparing For The Flood. How Do You Conduct Load Testing To Ready Your WordPr...Preparing For The Flood. How Do You Conduct Load Testing To Ready Your WordPr...
Preparing For The Flood. How Do You Conduct Load Testing To Ready Your WordPr...
WordCamp Sydney
 
Goodbye Themes, Hello Elementor – Beyond Creating Basic Websites
Goodbye Themes, Hello Elementor – Beyond Creating Basic WebsitesGoodbye Themes, Hello Elementor – Beyond Creating Basic Websites
Goodbye Themes, Hello Elementor – Beyond Creating Basic Websites
WordCamp Sydney
 
Divi 4.x and WooCommerce Changes
Divi 4.x and WooCommerce ChangesDivi 4.x and WooCommerce Changes
Divi 4.x and WooCommerce Changes
WordCamp Sydney
 
Why No One Is Reading Your Blog Posts (And How To Change That)
Why No One Is Reading Your Blog Posts (And How To Change That)Why No One Is Reading Your Blog Posts (And How To Change That)
Why No One Is Reading Your Blog Posts (And How To Change That)
WordCamp Sydney
 
Our Wild Journey Implementing A Headless WordPress Blog
Our Wild Journey Implementing A Headless WordPress BlogOur Wild Journey Implementing A Headless WordPress Blog
Our Wild Journey Implementing A Headless WordPress Blog
WordCamp Sydney
 
Escaping Client Hell: 6 Practical Tips To Make Freelancing Fun Again
Escaping Client Hell: 6 Practical Tips To Make Freelancing Fun AgainEscaping Client Hell: 6 Practical Tips To Make Freelancing Fun Again
Escaping Client Hell: 6 Practical Tips To Make Freelancing Fun Again
WordCamp Sydney
 
Planning Your Website Roadmap: Why Every Website Project Needs One To Save It...
Planning Your Website Roadmap: Why Every Website Project Needs One To Save It...Planning Your Website Roadmap: Why Every Website Project Needs One To Save It...
Planning Your Website Roadmap: Why Every Website Project Needs One To Save It...
WordCamp Sydney
 
Website Delivered – It’s The START Of The Relationship!
Website Delivered – It’s The START Of The Relationship!Website Delivered – It’s The START Of The Relationship!
Website Delivered – It’s The START Of The Relationship!
WordCamp Sydney
 
5 Steps To Avoiding Burnout: Creating A Healthy Work/Life Balance
5 Steps To Avoiding Burnout: Creating A Healthy Work/Life Balance5 Steps To Avoiding Burnout: Creating A Healthy Work/Life Balance
5 Steps To Avoiding Burnout: Creating A Healthy Work/Life Balance
WordCamp Sydney
 
The Healthy Baker - Flipping the Brief
The Healthy Baker - Flipping the BriefThe Healthy Baker - Flipping the Brief
The Healthy Baker - Flipping the Brief
WordCamp Sydney
 
Gutenberg Block Editor Tips & Tricks
Gutenberg Block Editor Tips & Tricks Gutenberg Block Editor Tips & Tricks
Gutenberg Block Editor Tips & Tricks
WordCamp Sydney
 
Let's Get Engaged
Let's Get EngagedLet's Get Engaged
Let's Get Engaged
WordCamp Sydney
 
The Science Of WordPress
The Science Of WordPressThe Science Of WordPress
The Science Of WordPress
WordCamp Sydney
 
Basics of Search Engine Optimisation
Basics of Search Engine OptimisationBasics of Search Engine Optimisation
Basics of Search Engine Optimisation
WordCamp Sydney
 
The Future of Web Content (an introduction to the new WordPress editor)
The Future of Web Content (an introduction to the new WordPress editor)The Future of Web Content (an introduction to the new WordPress editor)
The Future of Web Content (an introduction to the new WordPress editor)
WordCamp Sydney
 
Beyond the Theme: Affirming the role of the designer in the WordPress ecosystem
Beyond the Theme: Affirming the role of the designer in the WordPress ecosystemBeyond the Theme: Affirming the role of the designer in the WordPress ecosystem
Beyond the Theme: Affirming the role of the designer in the WordPress ecosystem
WordCamp Sydney
 
5 Ecommerce Trends to Implement Now
5 Ecommerce Trends to Implement Now5 Ecommerce Trends to Implement Now
5 Ecommerce Trends to Implement Now
WordCamp Sydney
 
Modern Local Environment for WordPress in 2018
Modern Local Environment for WordPress in 2018Modern Local Environment for WordPress in 2018
Modern Local Environment for WordPress in 2018
WordCamp Sydney
 

More from WordCamp Sydney (20)

Don’t Panic: How To Troubleshoot Your WordPress Site
Don’t Panic: How To Troubleshoot Your WordPress SiteDon’t Panic: How To Troubleshoot Your WordPress Site
Don’t Panic: How To Troubleshoot Your WordPress Site
 
WordPress Hosting Survival Guide
WordPress Hosting Survival Guide WordPress Hosting Survival Guide
WordPress Hosting Survival Guide
 
Preparing For The Flood. How Do You Conduct Load Testing To Ready Your WordPr...
Preparing For The Flood. How Do You Conduct Load Testing To Ready Your WordPr...Preparing For The Flood. How Do You Conduct Load Testing To Ready Your WordPr...
Preparing For The Flood. How Do You Conduct Load Testing To Ready Your WordPr...
 
Goodbye Themes, Hello Elementor – Beyond Creating Basic Websites
Goodbye Themes, Hello Elementor – Beyond Creating Basic WebsitesGoodbye Themes, Hello Elementor – Beyond Creating Basic Websites
Goodbye Themes, Hello Elementor – Beyond Creating Basic Websites
 
Divi 4.x and WooCommerce Changes
Divi 4.x and WooCommerce ChangesDivi 4.x and WooCommerce Changes
Divi 4.x and WooCommerce Changes
 
Why No One Is Reading Your Blog Posts (And How To Change That)
Why No One Is Reading Your Blog Posts (And How To Change That)Why No One Is Reading Your Blog Posts (And How To Change That)
Why No One Is Reading Your Blog Posts (And How To Change That)
 
Our Wild Journey Implementing A Headless WordPress Blog
Our Wild Journey Implementing A Headless WordPress BlogOur Wild Journey Implementing A Headless WordPress Blog
Our Wild Journey Implementing A Headless WordPress Blog
 
Escaping Client Hell: 6 Practical Tips To Make Freelancing Fun Again
Escaping Client Hell: 6 Practical Tips To Make Freelancing Fun AgainEscaping Client Hell: 6 Practical Tips To Make Freelancing Fun Again
Escaping Client Hell: 6 Practical Tips To Make Freelancing Fun Again
 
Planning Your Website Roadmap: Why Every Website Project Needs One To Save It...
Planning Your Website Roadmap: Why Every Website Project Needs One To Save It...Planning Your Website Roadmap: Why Every Website Project Needs One To Save It...
Planning Your Website Roadmap: Why Every Website Project Needs One To Save It...
 
Website Delivered – It’s The START Of The Relationship!
Website Delivered – It’s The START Of The Relationship!Website Delivered – It’s The START Of The Relationship!
Website Delivered – It’s The START Of The Relationship!
 
5 Steps To Avoiding Burnout: Creating A Healthy Work/Life Balance
5 Steps To Avoiding Burnout: Creating A Healthy Work/Life Balance5 Steps To Avoiding Burnout: Creating A Healthy Work/Life Balance
5 Steps To Avoiding Burnout: Creating A Healthy Work/Life Balance
 
The Healthy Baker - Flipping the Brief
The Healthy Baker - Flipping the BriefThe Healthy Baker - Flipping the Brief
The Healthy Baker - Flipping the Brief
 
Gutenberg Block Editor Tips & Tricks
Gutenberg Block Editor Tips & Tricks Gutenberg Block Editor Tips & Tricks
Gutenberg Block Editor Tips & Tricks
 
Let's Get Engaged
Let's Get EngagedLet's Get Engaged
Let's Get Engaged
 
The Science Of WordPress
The Science Of WordPressThe Science Of WordPress
The Science Of WordPress
 
Basics of Search Engine Optimisation
Basics of Search Engine OptimisationBasics of Search Engine Optimisation
Basics of Search Engine Optimisation
 
The Future of Web Content (an introduction to the new WordPress editor)
The Future of Web Content (an introduction to the new WordPress editor)The Future of Web Content (an introduction to the new WordPress editor)
The Future of Web Content (an introduction to the new WordPress editor)
 
Beyond the Theme: Affirming the role of the designer in the WordPress ecosystem
Beyond the Theme: Affirming the role of the designer in the WordPress ecosystemBeyond the Theme: Affirming the role of the designer in the WordPress ecosystem
Beyond the Theme: Affirming the role of the designer in the WordPress ecosystem
 
5 Ecommerce Trends to Implement Now
5 Ecommerce Trends to Implement Now5 Ecommerce Trends to Implement Now
5 Ecommerce Trends to Implement Now
 
Modern Local Environment for WordPress in 2018
Modern Local Environment for WordPress in 2018Modern Local Environment for WordPress in 2018
Modern Local Environment for WordPress in 2018
 

Recently uploaded

原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
3ipehhoa
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
laozhuseo02
 
Latest trends in computer networking.pptx
Latest trends in computer networking.pptxLatest trends in computer networking.pptx
Latest trends in computer networking.pptx
JungkooksNonexistent
 
ER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAEER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAE
Himani415946
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Sanjeev Rampal
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
3ipehhoa
 
Output determination SAP S4 HANA SAP SD CC
Output determination SAP S4 HANA SAP SD CCOutput determination SAP S4 HANA SAP SD CC
Output determination SAP S4 HANA SAP SD CC
ShahulHameed54211
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
Arif0071
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
Rogerio Filho
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
3ipehhoa
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
Gal Baras
 
BASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptxBASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptx
natyesu
 
This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!
nirahealhty
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
JeyaPerumal1
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
laozhuseo02
 
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptxLiving-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
TristanJasperRamos
 

Recently uploaded (16)

原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
 
Latest trends in computer networking.pptx
Latest trends in computer networking.pptxLatest trends in computer networking.pptx
Latest trends in computer networking.pptx
 
ER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAEER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAE
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
 
Output determination SAP S4 HANA SAP SD CC
Output determination SAP S4 HANA SAP SD CCOutput determination SAP S4 HANA SAP SD CC
Output determination SAP S4 HANA SAP SD CC
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
 
BASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptxBASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptx
 
This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
 
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptxLiving-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
 

Diagnosing WordPress: What to do when things go wrong

  • 1. Diagnosing WordPress Presented by Tim Butler What do to when things go wrong
  • 2. Who am I? ● IT professional with 20 years experience ● Head of infrastructure at Conetix ● NGINX Cookbook author ● Certified beer judge Infrequent ramblings on Twitter: @timbutler Probably seen more errors than Stack Overflow!
  • 3. About this talk…. Aimed at developers and agencies Just as applicable to business owners Start with the basics and work our way up
  • 4. Before we get started…..
  • 5. One quick takeaway…. Make sure you have a backup!!
  • 6. How you usually find out there’s a problem...
  • 7. “WHY IS MY WEBSITE DOWN!!!!”
  • 9. Software equivalent of what you’re facing
  • 10. What you actually need….
  • 11. The path to Zen Where we’ll be focussing
  • 13. Preparation ● Having a known state to compare to ○ Known plugins and versions installed ○ Known errors or PHP warnings https://en-au.wordpress.org/plugins/stream/ ● Ability to track changes
  • 17. Monitoring ● You want to know of issues before your clients ● System MUST have a point of presence in Australia https://statuscake.com https://www.panopta.com/
  • 22. Diagnostics - Server Logs Let's look in the logs...
  • 23. Diagnostics - Server Logs 80% of your issues will be identified in the logs wp-content/plugins/tims-shady-plugin/tims-shady-plugin.php
  • 24. Diagnostics - Server Logs Consider centralised logging SaaS Open Source (host yourself) https://papertrailapp.com/ https://www.graylog.org/
  • 25. Diagnostics - Server Logs 24 hour snapshot
  • 26. Diagnostics Hard failures = easy to find “Sometimes the site is slow to load” “Two out of the 5,000 products in my store have an issue” “My site seems slower this month” “My site works perfectly for my customers but wp-admin takes forever” Soft failures = harder...
  • 28. Diagnostics - WordPress Debugging Great way to see more info on soft failures eg, “Two out of the 5,000 products in my store have an issue”
  • 29. Diagnostics - WordPress Debugging PHP / WordPress Log levels Normal Debug enabled
  • 30. Diagnostics - WordPress Debugging Enable via management tools: Or in the wp-config.php: define('WP_DEBUG', true); define('WP_DEBUG_LOG', true); define('WP_DEBUG_DISPLAY', false);
  • 31. Diagnostics - WordPress Debugging By default: wp-content/debug.log [23-Jul-2018 06:32:09 UTC] PHP Notice: Undefined index: country in /var/www/vhosts/wcsyd2.conetixtest.com/httpdocs/wp-content/plugins/woocommerce/includes/class-wc-geolite-integration.php on line 60 [23-Jul-2018 06:32:09 UTC] PHP Stack trace: [23-Jul-2018 06:32:09 UTC] PHP 1. {main}() /var/www/vhosts/wcsyd2.conetixtest.com/httpdocs/index.php:0 [23-Jul-2018 06:32:09 UTC] PHP 2. require() /var/www/vhosts/wcsyd2.conetixtest.com/httpdocs/index.php:17 [23-Jul-2018 06:32:09 UTC] PHP 3. require_once() /var/www/vhosts/wcsyd2.conetixtest.com/httpdocs/wp-blog-header.php:13 [23-Jul-2018 06:32:09 UTC] PHP 4. require_once() /var/www/vhosts/wcsyd2.conetixtest.com/httpdocs/wp-load.php:37 [23-Jul-2018 06:32:09 UTC] PHP 5. require_once() /var/www/vhosts/wcsyd2.conetixtest.com/httpdocs/wp-config.php:80 [23-Jul-2018 06:32:09 UTC] PHP 6. do_action() /var/www/vhosts/wcsyd2.conetixtest.com/httpdocs/wp-settings.php:450 [23-Jul-2018 06:32:09 UTC] PHP 7. WP_Hook->do_action() /var/www/vhosts/wcsyd2.conetixtest.com/httpdocs/wp-includes/plugin.php:453 [23-Jul-2018 06:32:09 UTC] PHP 8. WP_Hook->apply_filters() /var/www/vhosts/wcsyd2.conetixtest.com/httpdocs/wp-includes/class-wp-hook.php:310 [23-Jul-2018 06:32:09 UTC] PHP 9. WooCommerce->init() /var/www/vhosts/wcsyd2.conetixtest.com/httpdocs/wp-includes/class-wp-hook.php:286 [23-Jul-2018 06:32:09 UTC] PHP 10. WC_Customer->__construct() /var/www/vhosts/wcsyd2.conetixtest.com/httpdocs/wp-content/plugins/woocommerce/includes/class-woocommerce.php:480 [23-Jul-2018 06:32:09 UTC] PHP 11. WC_Data_Store->read() /var/www/vhosts/wcsyd2.conetixtest.com/httpdocs/wp-content/plugins/woocommerce/includes/class-wc-customer.php:116 [23-Jul-2018 06:32:09 UTC] PHP 12. WC_Customer_Data_Store_Session->read() /var/www/vhosts/wcsyd2.conetixtest.com/httpdocs/wp-content/plugins/woocommerce/includes/class-wc-data-store.php:156 [23-Jul-2018 06:32:09 UTC] PHP 13. WC_Customer_Data_Store_Session->set_defaults() …...
  • 32. Diagnostics - Diving a little deeper
  • 33. Diagnostics Make sure you have a backup! Next items - run on staging / dev copy
  • 34. Diagnostics - Diving a little deeper https://en-au.wordpress.org/plugins/query-monitor/ What if there’s no errors in the logs?
  • 35. Diagnostics - Query Monitor ● Shows database queries ● See WordPress hooks ● See Theme templates used ● See HTTP calls ● … And more!
  • 36. Diagnostics - Query Monitor 0.06 second page load 3.8MB peak memory 0.003 second db queries 19 database queries
  • 37. Diagnostics - Query Monitor Database
  • 38. Diagnostics - Query Monitor Templates
  • 39. Diagnostics - Query Monitor HTTP Calls
  • 40. Diagnostics - Query Monitor “Something’s loading JQuery twice….”
  • 41. Diagnostics - Query Monitor What’s the impact of WooCommerce?
  • 42. Diagnostics - Query Monitor “Admin is slower..” Some premium plugins can have issues refreshing, with a 30 second timeout HTTP Calls
  • 43. We need to go deeper
  • 45. Diagnostics Warning: These examples require root access to a server (your dev server!) or a localised, development install.
  • 46. Diagnostics - Digging Deeper Option 1 - XDebug “Xdebug is an extension for PHP to assist with debugging and development. It contains a single step debugger to use with IDEs; it upgrades PHP's var_dump() function; it adds stack traces for Notices, Warnings, Errors and Exceptions; it features functionality for recording every function call and variable assignment to disk; it contains a profiler; and it provides code coverage functionality for use with PHPUnit.” https://xdebug.org/
  • 47. Diagnostics - XDebug Debugging WordPress with xDebug 2:10 pm - Alex Bishop
  • 48. Diagnostics - XDebug If it’s compiled in: zend_extension=xdebug.so xdebug.profiler_enable_trigger=1 xdebug.profiler_enable_trigger_value=wordcamptest
  • 49. Diagnostics - XDebug “My website is slow” Not database queries…. Must be code
  • 50. Diagnostics - XDebug Creates /tmp/cachegrind.out.26139.07d29e
  • 51. Diagnostics - XDebug KCachegrind / QCachegrind Webgrind IDE (PHPStorm) 72.45% time was in apply_filters This was a single call to excellent_coding In this function was 100 calls to password_hash
  • 52. Diagnostics - XDebug z Really shouldn’t let this developer near an editor wp-content/plugins/tims-shady-plugin/tims-shady-plugin.php
  • 53. Diagnostics - XDebug Debugging WordPress with xDebug 2:10 pm - Alex Bishop
  • 54. Diagnostics - Digging Deeper Option 2 - New Relic / APM https://newrelic.com/ “A complete view of your applications and operating environment” APM = Application Performance Management
  • 55. Diagnostics - New Relic WordPress specific Tools Other APM’s also available
  • 56. Diagnostics - New Relic (Lite) Option 2 - New Relic
  • 57. Diagnostics - New Relic (Lite)
  • 58. Diagnostics - New Relic (Lite)
  • 59. Diagnostics - New Relic (Essentials) Hooks
  • 60. Diagnostics - New Relic (Essentials) Plugins and Themes
  • 61. Diagnostics - New Relic (Essentials) Database
  • 62. Two quick, get out of jail free cards
  • 63. Get out of Jail free cards Check wp_options table for expired transients Check WordPress core files via WP-CLI wp core verify-checksums
  • 65. Summary 1. Remember your path to Zen 2. Find your server log locations 3. Familiarise yourself with the tools before you need them
  • 66. One final reminder... Make sure you have a backup!!
  • 67. Questions? Feel free to ask in person or via @timbutler