SlideShare a Scribd company logo
IMPROVING
WORDPRESS
PERFORMANCE
Xdebug and PHP profiling
WordCamp Athens 2017
Otto Kekäläinen
Seravo.com
@ottokekalainen
● Linux and open source advocate
● Contributed to WordPress Core,
translations, Linux, Docker,
Nginx, Redis, MariaDB…
● CEO, sysadmin and developer at
Seravo.com – WordPress
hosting and upkeep
Otto Kekäläinen
Enterprise grade
hosting and upkeep
for WordPress
WORDPRESS SUCCESS FACTORS
1. Easy to use
2. Easy to extend

Recommended for you

Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...
Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...
Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...

WP-CLI is a command line interface for managing WordPress installations. It allows users to perform tasks like installing plugins and themes, updating WordPress core, managing users, and more through commands instead of using the WordPress dashboard. The tool saves time by automating repetitive tasks and allowing bulk operations. Developers can extend WP-CLI's functionality by creating their own commands and packages.

wordpresswordpress pluginwordcamp
(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014
(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014
(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014

Magento is a leading open source, eCommerce platform used by many global brands. However, architecting your Magento platform to grow with your business can sometimes be a challenge. This session walks through the steps needed to take an out-of-the-box, single-node Magento implementation and turn it into a highly available, elastic, and robust deployment. This includes an end-to-end caching strategy that provides an efficient front-end cache (including populated shopping carts) using Varnish on Amazon EC2 as well as offloading the Magento caches to separate infrastructure such as Amazon ElastiCache. We also look at strategies to manage the Magento Media library outside of the application instances, including EC2-based shared storage solutions and Amazon S3. At the data layer we look at Magento-specific Amazon RDSandndash;tuning strategies including configuring Magento to use read replicas for horizontal scalability. Finally, we look at proven techniques to manage your Magento implementation at scale, including tips on cache draining, appropriate cache separation, and utilizing AWS CloudFormation to manage your infrastructure and orchestrate predictable deployments.

aws cloudstartupelastera
Anthony Somerset - Site Speed = Success!
Anthony Somerset - Site Speed = Success!Anthony Somerset - Site Speed = Success!
Anthony Somerset - Site Speed = Success!

Find Site Performance from the server to WordPress. A look at how some good performance gains can be made in tuning MySQL and APC and getting the most of out W3 Total Cache.

w3 edgew3 total cacheanthony
COMMON CHALLENGES
1. Security
2. Speed
A WEB FULL OF WRONG ADVICE
Most of the guides and tutorials on
security and speed lack evidence.
I’ve done mythbusting at many WordCamps with
WordPress Security 101
seravo.com/wordpress-security-101/
Now it is time to make sense out of
WordPress Speed
Performance

Recommended for you

Developers, Be a Bada$$ with WP-CLI
Developers, Be a Bada$$ with WP-CLIDevelopers, Be a Bada$$ with WP-CLI
Developers, Be a Bada$$ with WP-CLI

How to improve your workflows via SSH gateway. Experts at WP Engine help you learn about how WordPress developers can make their work more efficient using WP-CLI via SSH gateway to improve workflows. On-demand webinar: https://hs.wpengine.com/webinar-improve-workflows-SSH-gateway

wp-clissh gatewaywordpress
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST APIWordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API

This document is an introduction to using Backbone.js in WordPress presentations. It discusses why to use Backbone over just jQuery, the basics of Backbone and Underscore, and how to create models, views, collections, and populate collections from the WordPress REST API. It also provides a demo of a Backbone plugin and resources for further learning.

apirestwordpress
Grunt and Bower
Grunt and BowerGrunt and Bower
Grunt and Bower

The document discusses Grunt and Bower, two JavaScript build tools. Grunt is a task runner that can be used to automate repetitive tasks like minification, compilation, unit testing, and linting. It uses a Gruntfile to configure tasks and load plugins. Bower is a package manager for front-end web development that allows installing dependencies directly from the command line. It uses a bower.json file to specify dependencies that will be downloaded from the Bower registry.

bowergrunt
STEP 1: Measure
STEP 2: Optimize
STEP 3: Validate
STEP 4: Rinse and repeat
STEP 1: Measure
Find out your baseline to make sure your
optimizations later at least do not worsen
the performance!
FULL PAGE LOAD
● Online tools
○ WebPageTest.org
○ GTMetrix.com
○ Pingdom Tools
○ Yellow Lab Tools
○ Pagelocity
○ KeyCDN Performance Test
○ …
● Visualize:
○ HTML load time
○ CSS rendering
○ JavaScript loading
○ image files download
○ …
HOW FAST IS WORDPRESS?
= How fast PHP code generates the HTML
= HTTP request time

Recommended for you

WordPress Performance optimization
WordPress Performance optimizationWordPress Performance optimization
WordPress Performance optimization

This document provides tips for optimizing a WordPress site for performance. It recommends analyzing the site using tools like Firebug and GTmetrix to identify issues. Common problems include slow initial page loads due to too many database queries and large image files. The document outlines plugins and code tweaks that can help, such as caching plugins, GZIP compression, and leveraging a content delivery network. An ideal setup is proposed using Varnish as a reverse proxy cache in front of Redis for object caching. Redis is preferred over Memcached due to its larger object size limits and broader language support.

wordpressperformancecms
My Database Skills Killed the Server
My Database Skills Killed the ServerMy Database Skills Killed the Server
My Database Skills Killed the Server

This document summarizes a presentation about optimizing database performance in ColdFusion applications. It discusses how to analyze query plans to understand how queries are executing and identify optimization opportunities. Specific tips covered include using query parameters to promote plan reuse, optimizing indexes, combining queries to reduce round trips to the database, and monitoring server resources and database statistics that can impact performance. The presentation also provides examples of inefficient SQL patterns to avoid, such as inline queries and over-joining of data.

sqlcoldfusion
Running and Scaling Magento on AWS
Running and Scaling Magento on AWSRunning and Scaling Magento on AWS
Running and Scaling Magento on AWS

This document discusses setting up a LAMP stack on an Ubuntu server using SSH and various commands like apt-get. It installs Apache, PHP, MySQL, Redis, and Varnish. It then discusses using rsync to copy files to the server and configuring the various components like enabling PHP modules and Apache rewrite rules.

 
by AOE
magentoscalingcloud
CURL
ssh example.com
curl -s -o /dev/null 
-w "%{time_total}n" https://example.com/
0,235
https://curl.haxx.se/docs/manpage.html#-w
CURL WITH NO CACHE
curl -s -o /dev/null 
-w "%{time_total}n" 
-H "Pragma: no-cache" https://example.com/
https://developers.google.com/web/fundamentals/performance/opti
mizing-content-efficiency/http-caching
CURL LOOP TO DETECT VARIATION
export LC_NUMERIC=C
for i in {1..20}
do
curl -so /dev/null -w "%{time_total}n" http://localhost/
done | awk '{ sum += $1; n++; print $1 } END { if (n > 0) print
"AVG: " sum / n; }'
0.209
0.107
0.152
AVG: 0.1378
LOG HTTP REQUEST TIME
[29/May/2017:10:02:45 +0300] "POST /wp-admin/admin-ajax.php
HTTP/1.1" 200 58 "Mozilla/5.0 (KHTML, like Gecko)
Chrome/58.0.3029.110 Safari/537.36" - - 0.028
nginx.conf
log_format extensive '$host '
'$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" '
'$upstream_cache_status - '
'$request_time';

Recommended for you

Single page apps with drupal 7
Single page apps with drupal 7Single page apps with drupal 7
Single page apps with drupal 7

It's no denying that rich Javascript applications (sometimes called One Page Applications) are a big thing, but what if you want to leverage Drupal on the backend, or have an existing site? Tools like Angular.JS and EmberJS are great when you have an API, but Drupal 7 doesn't really have an API layer. I'll explore the parts of a one page application and how to integrate it into either an existing or a new Drupal site, and the pitfalls that one must watch out for.

single page appsangularjsangular
Scale your Magento app with Elastic Beanstalk
Scale your Magento app with Elastic BeanstalkScale your Magento app with Elastic Beanstalk
Scale your Magento app with Elastic Beanstalk

This document discusses using ElasticBeanstalk to scale Magento applications. Some key points: ElasticBeanstalk allows automatically scaling web and worker applications by adding and removing instances as needed. It also allows running different environments like production, testing, and development. Deploying code updates can be done by pushing to Git or uploading ZIP files. Logs, configurations, and other customizations are managed through YAML files. ElasticBeanstalk simplifies scaling Magento by integrating with features like Composer, Redis, and S3.

phpecommercemagento
Bower - A package manager for the web
Bower - A package manager for the webBower - A package manager for the web
Bower - A package manager for the web

This document provides an overview of Bower, a package manager for the web. It discusses how to install Bower, commonly used Bower commands like install, search and uninstall, the bower.json and .bowerrc configuration files, and includes an appendix with additional reference information. The document is intended to teach users how to get started with and effectively use Bower to manage front-end web packages and dependencies.

bower
ANALYZE WITH GOACCESS
➔ Average load time
➔ Cumulative load time
= sum of all loads
STEP 2: Optimize
Find and solve the bottleneck
QUICK AND DIRTY: WP-CLI LOOP
for p in $(wp plugin list --fields=name --status=active)
do
echo $p
wp plugin deactivate $p
for i in {1..5}
do
curl -so /dev/null -w "%{time_total}n" 
-H "Pragma: no-cache" http://localhost/
done
wp plugin activate $p
done
QUICK AND DIRTY: WP-CLI LOOP
● Baseline ~550 ms
● Deactivating
wp-to-twitter or
polylang does not have
an effect
● When deactivating
advanced-custom-fields
-pro load times drop to
~65 ms

Recommended for you

Ryan Duff 2015 WordCamp US HTTP API
Ryan Duff 2015 WordCamp US HTTP APIRyan Duff 2015 WordCamp US HTTP API
Ryan Duff 2015 WordCamp US HTTP API

The document discusses the WordPress HTTP API, which provides wrapper functions for making HTTP requests from PHP that are easier to use than cURL. It introduces the main functions like wp_remote_get() and wp_remote_post() for making GET and POST requests. It also covers how to process responses by retrieving headers, body content, response codes. Useful API tools like Postman and PAW for testing requests are also mentioned.

programminghttpdeveloper
Automatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themesAutomatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themes

Talk given at WP Helsinki Meetup 7.11.2018 See also: * https://developer.wordpress.org/themes * https://developer.wordpress.org/plugins * https://travis-ci.org/Seravo * https://seravo.com/blog/coding-wordpress-in-style-with-phpcs/

wordpresssoftware testingsoftware quality assurance
Using WebSockets with ColdFusion
Using WebSockets with ColdFusionUsing WebSockets with ColdFusion
Using WebSockets with ColdFusion

Websockets allow for real-time, bi-directional communication between a client and server by maintaining an open connection. The document discusses how to use websockets with ColdFusion by defining channels and handlers, implementing the JavaScript API to publish and subscribe to messages, and options for security, filtering, and fallback support. Demos are provided to illustrate key features of ColdFusion's websocket implementation.

html5websocketscoldfusion
A LITTLE MORE DEPTH: DEBUG BAR
THE PROFESSIONAL WAY: XDEBUG
A tool for developers to
● analyze PHP
execution
● find bottle necks
● xdebug.org
XDEBUG INSTALLATION
$ sudo apt-get install php-xdebug
$ nano /etc/php/fpm/conf.d/20-xdebug.ini
; Enable Xdebug
zend_extension=xdebug.so
; Enable php profiling with get param XDEBUG_PROFILE=1
xdebug.profiler_output_dir=/tmp
xdebug.profiler_output_name=cachegrind.out.%t.%p
xdebug.profiler_enable_trigger=1
$ sudo service restart php-fpm
PROFILING RUN OF WORDPRESS
FRONT PAGE
/tmp $ curl -I http://localhost/?XDEBUG_PROFILE=1 
-w "%{time_total}n"
0.611
/tmp $ ll -h
11M cachegrind.out.1455198789.5601
/tmp $ head cachegrind.out.1455198789.5601
version: 1
creator: xdebug 2.2.3
cmd: /data/wordpress/htdocs/index.php
part: 1
positions: line
...

Recommended for you

Modern Web Application Development Workflow - EclipseCon US 2014
Modern Web Application Development Workflow - EclipseCon US 2014Modern Web Application Development Workflow - EclipseCon US 2014
Modern Web Application Development Workflow - EclipseCon US 2014

People often consider that creating a web application is done by creating a bunch of HTML, Javascript and CSS files together in a text editor and uploading them on the web. Well, things have changed and in this presentation, you will see how the workflow used to deliver web applications has evolved over the past few years! We will start by seeing how you can use Yeoman and its generators to kickstart your project. Then you will see how Bower let you manage the dependencies of your project. Downloading the JavaScript and CSS frameworks that you are using for you. After that we will have a look at Chrome Devtools in order to debug and edit our application. We will also see how to use remote debugging to inspect a web application running on a phone or a tablet. Finally we will see how you can set up your whole continuous integration workflow with Grunt. Compilation, static code analysis, unit tests, integration tests, minification, code coverage, you name it. This talk has been presented during EclipseCon North America 2014 in San Francisco

gulpboweryeoman
Optimising Your Front End Workflow With Symfony, Twig, Bower and Gulp
Optimising Your Front End Workflow With Symfony, Twig, Bower and GulpOptimising Your Front End Workflow With Symfony, Twig, Bower and Gulp
Optimising Your Front End Workflow With Symfony, Twig, Bower and Gulp

We take great care in our back end coding workflow, optimising, automating and abstracting as much as is possible. So why don't we do that with our front end code? We'll take a look at some tools to help us take our front end workflow to the next level, and hopefully optimise our load times in the process! We'll be looking at using Twig templates and optimising them for the different areas of your application, integrating Bower and Gulp for managing assets and processing our front-end code to avoid repetitive tasks - looking at how that impacts the typical Symfony workflow.

gulpnpmnode
Delivering Go.CD with Terraform and Docker
Delivering Go.CD with Terraform and DockerDelivering Go.CD with Terraform and Docker
Delivering Go.CD with Terraform and Docker

Containerization helps us bundle dependencies with applications instead of having to use configuration management to prepare machines for running them, hence making build once run anywhere easy. For legacy applications this can be quite hard though when they spread persistent data across the file system. In this talk I'll show how we can quickly set up a Go.CD server and agents for our Continuous Delivery pipelines on Google Cloud. The infrastructure creation is handled by Terraform, the server and agents are custom built Docker containers.

infrastructure as codedockercontinuous delivery
WEBGRIND INSTALLATION
$ cd /data/wordpress/htdocs
$ git clone https://github.com/jokkedk/webgrind
$ sudo apt-get install graphviz
PREINSTALLED IN VVV AND
SERAVO VAGRANT
laptop$ vagrant ssh
vagrant$ xdebug_on # Varying Vagrant Vagrants
vagrant$ wp-xdebug-on # Seravo Vagrant
Go profiling!
WEBGRIND UI EXPLAINED

Recommended for you

Write php deploy everywhere
Write php deploy everywhereWrite php deploy everywhere
Write php deploy everywhere

As a PHP developer building web applications is besides making a living a lot of fun too, especially when you can deploy your apps to any kind of environment and on any platform. In this session I take a non-standard PHP application (based on Zend Framework) and deploy it to a bare metal environment running LAMP, Windows 2008 Server with IIS7 and to cloud instances like Azure and Amazon. The goal is to provide information on how to deploy to these various environments manual and automatic, but also to show it doesn't really matter anymore what the targeted platform is, as long the apps are written in PHP.

phplinuxphing
Docker Security workshop slides
Docker Security workshop slidesDocker Security workshop slides
Docker Security workshop slides

Get hands-on with security features and best practices to protect your containerized services. Learn to push and verify signed images with Docker Content Trust, and collaborate with delegation roles. Intermediate to advanced level Docker experience recommended, participants will be building and pushing with Docker during the workshop. Led By Docker Security Experts: Riyaz Faizullabhoy David Lawrence Viktor Stanchev Experience Level: Intermediate to advanced level Docker experience recommended

protect containerized servicesdocker content trustsecurity features
Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018

This document discusses using CommandBox and Docker to deploy real projects. It covers background on the development workflow and environments, benefits of Docker and CommandBox, code cleanup tools like CFLint and git hooks, serving apps with CommandBox, server monitoring with Prometheus, dynamic configuration, caching, session storage, logging with Elasticsearch and Kibana, load balancing with Kubernetes, data changes, scheduled tasks, and canary/blue-green deployments. The overall message is that CommandBox and tools can provide structure and simplify transitions to help teams succeed in deploying applications.

coldfusioncfmlortus solutions
FILTER FOR USUAL SUSPECTS
● load
● open
● curl
● query
SHOW CALL GRAPH
UNDERSTAND
THE CODE
FLOW
Typical issues and
solutions

Recommended for you

Into The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and dockerInto The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and docker

This document discusses using CommandBox and Docker to deploy real projects. It covers background on the development workflow and environments, benefits of Docker and CommandBox, code cleanup tools like CFLint and git hooks, serving apps with CommandBox, server monitoring with Prometheus, dynamic configuration, caching, session storage, logging with Elasticsearch and Kibana, load balancing with Kubernetes, data changes, scheduled tasks, and canary/blue-green deployments. The overall message is that CommandBox and tools can provide structure and simplify transitions to help teams succeed in deploying applications.

ortus solutionscfmlcoldfusion
Minicurso de Vagrant
Minicurso de VagrantMinicurso de Vagrant
Minicurso de Vagrant

Vagrant is a tool that allows users to build and distribute development environments. It simplifies the process of creating and configuring virtual machine environments and allows development environments to be identical across different machines. Vagrant uses a file called the Vagrantfile to configure virtual machines and provision them automatically using tools like Puppet, Chef or Ansible.

vagrantprovisionamentodesenvolvimento
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer Toolbox

The document discusses the modern developer toolbox and outlines various tools that developers can use for development environments, testing, debugging, profiling, deployment, logging, and monitoring of applications. It provides recommendations for setting up development environments on different operating systems and with tools like Vagrant, Docker, Ansible, and Homebrew. It also discusses PHP installation and editors/IDEs to use. Testing with PHPUnit, Behat, and Jenkins is covered as well as debugging with XDebug, profiling with XHProf, and deployment with Ansible, Capistrano and other options. Logging with Monolog, Logstash and Kibana is also summarized along with monitoring metrics with StatsD, Graphite and Grafana.

deploymentphpdevelopment
FREQUENT OR LONG DB QUERIES?
Fix Avada theme
upgrade check
SWITCH
TO
POLYLANG
FOR FASTER
PAGE LOADS
EXTERNAL HTTP REQUESTS ON
EVERY PAGE LOAD?
DEVELOPERS: PLEASE LEARN TO
USE THE WP TRANSIENT API!
Most DB queries and external PHP::curl request can be cached easily:

Recommended for you

With one click
With one clickWith one click
With one click

This document discusses approaches for deploying Drupal websites from development to production environments. It covers considerations for initial site installation ("cold start") as well as ongoing updates. Simple setups can use basic scripts for deployment, but more complex enterprise sites require tools to manage multiple hosts, roles, environments and tasks. The document evaluates options like Webistrano, DrushDeploy, Jenkins and Aegir and discusses related tools for automation, testing and continuous integration.

drupaldrupalconwebistrano
Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)

The document discusses running Docker in development and production. It covers: - Using Docker containers to run individual services like Elasticsearch or web applications - Creating Dockerfiles to build custom images - Linking containers together and using environment variables for service discovery - Scaling with Docker Compose, load balancing with Nginx, and service discovery with Consul - Clustering containers together using Docker Swarm for high availability

dockerndc2015ndcoslo
The Enterprise Wor/d/thy/Press
The Enterprise Wor/d/thy/PressThe Enterprise Wor/d/thy/Press
The Enterprise Wor/d/thy/Press

Like many others, WordPress has been my personal blogging tool for a long time. A powerful tool for easy publishing! That is what everyone wants. Large sites like TechCrunch and TheNextWeb use it exactly for that reason. And more enterprises seem to discover it as good solution to their too-expensive publication tools. But keeping those WordPress instances running requires skills and knowledge. Because of WordPress extendibility and its very active community, you can do this too. This tutorial will teach you how use Ansible, Composer, WP-CLI, WP REST API, and Elasticsearch can push WordPress from a personal blogging tool into an enterprise-worthy level application. Out with FTP based SCM ... in with automated deployment, dependency management, and utterly fast search.

ansibletrellisroots.io
Hunt down that
rare beast
$ for i in {1..99};
do curl -IL -H "Pragma: no-cache"
-w "%{time_total}n" -o /dev/null
-s "http://localhost/?XDEBUG_PROFILE=1";
done
$ ll -Sh /tmp
-rw-r--r-- 111M cachegrind.out.1455200976.5601
-rw-r--r-- 91M cachegrind.out.1455200984.5601
-rw-r--r-- 89M cachegrind.out.1455200972.5604
-rw-r--r-- 89M cachegrind.out.1455200964.5604
-rw-r--r-- 88M cachegrind.out.1455200973.5604
-rw-r--r-- 87M cachegrind.out.1455200963.5601
-rw-r--r-- 87M cachegrind.out.1455200967.5601
STEP 3: Validate
STEP 4: Rinse & repeat

Recommended for you

Nodejs web,db,hosting
Nodejs web,db,hostingNodejs web,db,hosting
Nodejs web,db,hosting

This document provides information about Node.js, Express, and using Node.js with databases like MySQL. It describes Node.js as a JavaScript web framework that is fast and small. It explains that Express is a web application framework built on Node.js and Connect. It provides instructions for installing Express and a quick start guide. It also lists features of Express like routing, views, and sessions. Finally, it discusses hosting Node.js applications on platforms like Heroku and connecting Node.js to MySQL.

node.jsmysqlhosting
High Performance Drupal
High Performance DrupalHigh Performance Drupal
High Performance Drupal

"Drupal is always so fast!" ... said no one, ever. Drupal has a reputation as being a slow CMS, but that reputation is undeserved; there are many small things that impact a Drupal site's performance in sometimes substantial ways. This session will highlight many 'quick wins' that will get your site performing like a champ in no time! Then we'll take a demonstration site that has many elements of real-world 'slow' Drupal sites, show how to do a quick performance evaluation/triage, and change the site from loading in 4-5 seconds to loading in less than a second, and maxing out at 2 requests per second to a speedy 4,000+ requests per second! The session will also discuss the importance of a plan, benchmarking, and assumptions when you do performance work on your own Drupal site.

servermysqlscalability
EWD 3 Training Course Part 5a: First Steps in Building a QEWD Application
EWD 3 Training Course Part 5a: First Steps in Building a QEWD ApplicationEWD 3 Training Course Part 5a: First Steps in Building a QEWD Application
EWD 3 Training Course Part 5a: First Steps in Building a QEWD Application

This presentation is part 5 in the EWD 3 Training Course. It describes the first steps you should take when building a browser-based desktop QEWD application. This version of Part 5 is for anyone using QEWD on Windows with the Cache database.

databasenosqlnode.js
DEMO: How fast can we make
Twentyseventeen?
STEP 1: MEASURE
STEP 2: OPTIMIZE
Translation functions slowest. WP does not use native
gettext (https://core.trac.wordpress.org/ticket/17268).
Solution:
composer require aucor/dynamic-mo-loader
STEP 3: VALIDATE
Before: 500-600 ms After: 300-400 ms

Recommended for you

WordCamp Atlanta - April 15 2018 - dev team workflow and processes with word...
WordCamp Atlanta -  April 15 2018 - dev team workflow and processes with word...WordCamp Atlanta -  April 15 2018 - dev team workflow and processes with word...
WordCamp Atlanta - April 15 2018 - dev team workflow and processes with word...

This document summarizes some workflows and processes used by a development team for WordPress projects, including version control with Git, environment-aware configuration files, database migrations, and automated deployments. It discusses setting up local development environments, managing code standards and reviews, and deploying code from development to multiple environments.

wordpresswordcampworkflow
MeaNstack on Docker
MeaNstack on DockerMeaNstack on Docker
MeaNstack on Docker

This document discusses using the MEAN stack with Docker. It provides Dockerfiles to containerize MongoDB, a MongoDB replica set configurator, Node.js, sample applications, and MongoDB Management Service monitoring/backup agents. It also describes using Vagrant to set up a demo environment with Docker containers for a MongoDB replica set and sample app.

nodejsdockermongodb
Write php deploy everywhere tek11
Write php deploy everywhere   tek11Write php deploy everywhere   tek11
Write php deploy everywhere tek11

The document discusses using Phing, an XML-based build tool written in PHP, to automate the deployment of PHP applications to various platforms including Linux, Windows, and Windows Azure. It provides examples of using Phing tasks to export code from version control, deploy via SCP, FTP, or cloud services, and set up continuous integration and continuous deployment workflows. The key message is that Phing allows for easy, automated deployment of PHP code to any environment.

SEE IT YOURSELF!
github.com/ottok/wceu2017-demo
REMEMBER
● Nginx access logs easy
● Xdebug never in production
● xhprof/uprofiler can be production
● PCEL APD (2004)
● memory_get_usage(), microtime()
THANK YOU!
SERAVO.COM
facebook.com/Seravocom
Twitter: @Seravo @ottokekalainen

More Related Content

What's hot

Search in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize itSearch in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize it
Otto Kekäläinen
 
Improving WordPress Performance: Xdebug and PHP profiling
Improving WordPress Performance: Xdebug and PHP profilingImproving WordPress Performance: Xdebug and PHP profiling
Improving WordPress Performance: Xdebug and PHP profiling
Seravo
 
Xdebug, KCacheGrind and Webgrind with WampServer
Xdebug, KCacheGrind and Webgrind with WampServer  Xdebug, KCacheGrind and Webgrind with WampServer
Xdebug, KCacheGrind and Webgrind with WampServer
Mediovski Technology
 
Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...
Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...
Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...
Andrea Cardinali
 
(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014
(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014
(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014
Amazon Web Services
 
Anthony Somerset - Site Speed = Success!
Anthony Somerset - Site Speed = Success!Anthony Somerset - Site Speed = Success!
Anthony Somerset - Site Speed = Success!
WordCamp Cape Town
 
Developers, Be a Bada$$ with WP-CLI
Developers, Be a Bada$$ with WP-CLIDevelopers, Be a Bada$$ with WP-CLI
Developers, Be a Bada$$ with WP-CLI
WP Engine
 
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST APIWordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
Brian Hogg
 
Grunt and Bower
Grunt and BowerGrunt and Bower
Grunt and Bower
George Estebe
 
WordPress Performance optimization
WordPress Performance optimizationWordPress Performance optimization
WordPress Performance optimization
Brecht Ryckaert
 
My Database Skills Killed the Server
My Database Skills Killed the ServerMy Database Skills Killed the Server
My Database Skills Killed the Server
ColdFusionConference
 
Running and Scaling Magento on AWS
Running and Scaling Magento on AWSRunning and Scaling Magento on AWS
Running and Scaling Magento on AWS
AOE
 
Single page apps with drupal 7
Single page apps with drupal 7Single page apps with drupal 7
Single page apps with drupal 7
Chris Tankersley
 
Scale your Magento app with Elastic Beanstalk
Scale your Magento app with Elastic BeanstalkScale your Magento app with Elastic Beanstalk
Scale your Magento app with Elastic Beanstalk
Corley S.r.l.
 
Bower - A package manager for the web
Bower - A package manager for the webBower - A package manager for the web
Bower - A package manager for the web
Larry Nung
 
Ryan Duff 2015 WordCamp US HTTP API
Ryan Duff 2015 WordCamp US HTTP APIRyan Duff 2015 WordCamp US HTTP API
Ryan Duff 2015 WordCamp US HTTP API
ryanduff
 
Automatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themesAutomatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themes
Otto Kekäläinen
 
Using WebSockets with ColdFusion
Using WebSockets with ColdFusionUsing WebSockets with ColdFusion
Using WebSockets with ColdFusion
cfjedimaster
 
Modern Web Application Development Workflow - EclipseCon US 2014
Modern Web Application Development Workflow - EclipseCon US 2014Modern Web Application Development Workflow - EclipseCon US 2014
Modern Web Application Development Workflow - EclipseCon US 2014
Stéphane Bégaudeau
 
Optimising Your Front End Workflow With Symfony, Twig, Bower and Gulp
Optimising Your Front End Workflow With Symfony, Twig, Bower and GulpOptimising Your Front End Workflow With Symfony, Twig, Bower and Gulp
Optimising Your Front End Workflow With Symfony, Twig, Bower and Gulp
Matthew Davis
 

What's hot (20)

Search in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize itSearch in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize it
 
Improving WordPress Performance: Xdebug and PHP profiling
Improving WordPress Performance: Xdebug and PHP profilingImproving WordPress Performance: Xdebug and PHP profiling
Improving WordPress Performance: Xdebug and PHP profiling
 
Xdebug, KCacheGrind and Webgrind with WampServer
Xdebug, KCacheGrind and Webgrind with WampServer  Xdebug, KCacheGrind and Webgrind with WampServer
Xdebug, KCacheGrind and Webgrind with WampServer
 
Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...
Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...
Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...
 
(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014
(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014
(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014
 
Anthony Somerset - Site Speed = Success!
Anthony Somerset - Site Speed = Success!Anthony Somerset - Site Speed = Success!
Anthony Somerset - Site Speed = Success!
 
Developers, Be a Bada$$ with WP-CLI
Developers, Be a Bada$$ with WP-CLIDevelopers, Be a Bada$$ with WP-CLI
Developers, Be a Bada$$ with WP-CLI
 
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST APIWordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
 
Grunt and Bower
Grunt and BowerGrunt and Bower
Grunt and Bower
 
WordPress Performance optimization
WordPress Performance optimizationWordPress Performance optimization
WordPress Performance optimization
 
My Database Skills Killed the Server
My Database Skills Killed the ServerMy Database Skills Killed the Server
My Database Skills Killed the Server
 
Running and Scaling Magento on AWS
Running and Scaling Magento on AWSRunning and Scaling Magento on AWS
Running and Scaling Magento on AWS
 
Single page apps with drupal 7
Single page apps with drupal 7Single page apps with drupal 7
Single page apps with drupal 7
 
Scale your Magento app with Elastic Beanstalk
Scale your Magento app with Elastic BeanstalkScale your Magento app with Elastic Beanstalk
Scale your Magento app with Elastic Beanstalk
 
Bower - A package manager for the web
Bower - A package manager for the webBower - A package manager for the web
Bower - A package manager for the web
 
Ryan Duff 2015 WordCamp US HTTP API
Ryan Duff 2015 WordCamp US HTTP APIRyan Duff 2015 WordCamp US HTTP API
Ryan Duff 2015 WordCamp US HTTP API
 
Automatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themesAutomatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themes
 
Using WebSockets with ColdFusion
Using WebSockets with ColdFusionUsing WebSockets with ColdFusion
Using WebSockets with ColdFusion
 
Modern Web Application Development Workflow - EclipseCon US 2014
Modern Web Application Development Workflow - EclipseCon US 2014Modern Web Application Development Workflow - EclipseCon US 2014
Modern Web Application Development Workflow - EclipseCon US 2014
 
Optimising Your Front End Workflow With Symfony, Twig, Bower and Gulp
Optimising Your Front End Workflow With Symfony, Twig, Bower and GulpOptimising Your Front End Workflow With Symfony, Twig, Bower and Gulp
Optimising Your Front End Workflow With Symfony, Twig, Bower and Gulp
 

Similar to Improving WordPress performance (xdebug and profiling)

Delivering Go.CD with Terraform and Docker
Delivering Go.CD with Terraform and DockerDelivering Go.CD with Terraform and Docker
Delivering Go.CD with Terraform and Docker
Jorrit Salverda
 
Write php deploy everywhere
Write php deploy everywhereWrite php deploy everywhere
Write php deploy everywhere
Michelangelo van Dam
 
Docker Security workshop slides
Docker Security workshop slidesDocker Security workshop slides
Docker Security workshop slides
Docker, Inc.
 
Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018
Ortus Solutions, Corp
 
Into The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and dockerInto The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and docker
Ortus Solutions, Corp
 
Minicurso de Vagrant
Minicurso de VagrantMinicurso de Vagrant
Minicurso de Vagrant
Leandro Nunes
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer Toolbox
Pablo Godel
 
With one click
With one clickWith one click
With one click
Marcus Deglos
 
Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)
Ben Hall
 
The Enterprise Wor/d/thy/Press
The Enterprise Wor/d/thy/PressThe Enterprise Wor/d/thy/Press
The Enterprise Wor/d/thy/Press
Jeroen van Dijk
 
Nodejs web,db,hosting
Nodejs web,db,hostingNodejs web,db,hosting
Nodejs web,db,hosting
Kenu, GwangNam Heo
 
High Performance Drupal
High Performance DrupalHigh Performance Drupal
High Performance Drupal
Jeff Geerling
 
EWD 3 Training Course Part 5a: First Steps in Building a QEWD Application
EWD 3 Training Course Part 5a: First Steps in Building a QEWD ApplicationEWD 3 Training Course Part 5a: First Steps in Building a QEWD Application
EWD 3 Training Course Part 5a: First Steps in Building a QEWD Application
Rob Tweed
 
WordCamp Atlanta - April 15 2018 - dev team workflow and processes with word...
WordCamp Atlanta -  April 15 2018 - dev team workflow and processes with word...WordCamp Atlanta -  April 15 2018 - dev team workflow and processes with word...
WordCamp Atlanta - April 15 2018 - dev team workflow and processes with word...
Evan Mullins
 
MeaNstack on Docker
MeaNstack on DockerMeaNstack on Docker
MeaNstack on Docker
Daniel Ku
 
Write php deploy everywhere tek11
Write php deploy everywhere   tek11Write php deploy everywhere   tek11
Write php deploy everywhere tek11
Michelangelo van Dam
 
DevOps For Small Teams
DevOps For Small TeamsDevOps For Small Teams
DevOps For Small Teams
Joe Ferguson
 
Node.js Build, Deploy and Scale Webinar
Node.js Build, Deploy and Scale WebinarNode.js Build, Deploy and Scale Webinar
Node.js Build, Deploy and Scale Webinar
jguerrero999
 
WordPress Development Environments
WordPress Development Environments WordPress Development Environments
WordPress Development Environments
Ohad Raz
 
Improve your Java Environment with Docker
Improve your Java Environment with DockerImprove your Java Environment with Docker
Improve your Java Environment with Docker
HanoiJUG
 

Similar to Improving WordPress performance (xdebug and profiling) (20)

Delivering Go.CD with Terraform and Docker
Delivering Go.CD with Terraform and DockerDelivering Go.CD with Terraform and Docker
Delivering Go.CD with Terraform and Docker
 
Write php deploy everywhere
Write php deploy everywhereWrite php deploy everywhere
Write php deploy everywhere
 
Docker Security workshop slides
Docker Security workshop slidesDocker Security workshop slides
Docker Security workshop slides
 
Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018
 
Into The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and dockerInto The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and docker
 
Minicurso de Vagrant
Minicurso de VagrantMinicurso de Vagrant
Minicurso de Vagrant
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer Toolbox
 
With one click
With one clickWith one click
With one click
 
Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)
 
The Enterprise Wor/d/thy/Press
The Enterprise Wor/d/thy/PressThe Enterprise Wor/d/thy/Press
The Enterprise Wor/d/thy/Press
 
Nodejs web,db,hosting
Nodejs web,db,hostingNodejs web,db,hosting
Nodejs web,db,hosting
 
High Performance Drupal
High Performance DrupalHigh Performance Drupal
High Performance Drupal
 
EWD 3 Training Course Part 5a: First Steps in Building a QEWD Application
EWD 3 Training Course Part 5a: First Steps in Building a QEWD ApplicationEWD 3 Training Course Part 5a: First Steps in Building a QEWD Application
EWD 3 Training Course Part 5a: First Steps in Building a QEWD Application
 
WordCamp Atlanta - April 15 2018 - dev team workflow and processes with word...
WordCamp Atlanta -  April 15 2018 - dev team workflow and processes with word...WordCamp Atlanta -  April 15 2018 - dev team workflow and processes with word...
WordCamp Atlanta - April 15 2018 - dev team workflow and processes with word...
 
MeaNstack on Docker
MeaNstack on DockerMeaNstack on Docker
MeaNstack on Docker
 
Write php deploy everywhere tek11
Write php deploy everywhere   tek11Write php deploy everywhere   tek11
Write php deploy everywhere tek11
 
DevOps For Small Teams
DevOps For Small TeamsDevOps For Small Teams
DevOps For Small Teams
 
Node.js Build, Deploy and Scale Webinar
Node.js Build, Deploy and Scale WebinarNode.js Build, Deploy and Scale Webinar
Node.js Build, Deploy and Scale Webinar
 
WordPress Development Environments
WordPress Development Environments WordPress Development Environments
WordPress Development Environments
 
Improve your Java Environment with Docker
Improve your Java Environment with DockerImprove your Java Environment with Docker
Improve your Java Environment with Docker
 

More from Otto Kekäläinen

FOSDEM2021: MariaDB post-release quality assurance in Debian and Ubuntu
FOSDEM2021: MariaDB post-release quality assurance in Debian and UbuntuFOSDEM2021: MariaDB post-release quality assurance in Debian and Ubuntu
FOSDEM2021: MariaDB post-release quality assurance in Debian and Ubuntu
Otto Kekäläinen
 
MariaDB quality assurance in Debian and Ubuntu
MariaDB quality assurance in Debian and UbuntuMariaDB quality assurance in Debian and Ubuntu
MariaDB quality assurance in Debian and Ubuntu
Otto Kekäläinen
 
DebConf 2020: What’s New in MariaDB Server 10.5 and Galera 4?
DebConf 2020: What’s New in MariaDB Server 10.5 and Galera 4?DebConf 2020: What’s New in MariaDB Server 10.5 and Galera 4?
DebConf 2020: What’s New in MariaDB Server 10.5 and Galera 4?
Otto Kekäläinen
 
Technical SEO for WordPress - 2019 edition
Technical SEO for WordPress - 2019 editionTechnical SEO for WordPress - 2019 edition
Technical SEO for WordPress - 2019 edition
Otto Kekäläinen
 
How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...
How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...
How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...
Otto Kekäläinen
 
DebConf 2019 MariaDB packaging in Debian BoF
DebConf 2019 MariaDB packaging in Debian BoFDebConf 2019 MariaDB packaging in Debian BoF
DebConf 2019 MariaDB packaging in Debian BoF
Otto Kekäläinen
 
The 5 most common reasons for a slow WordPress site and how to fix them
The 5 most common reasons for a slow WordPress site and how to fix themThe 5 most common reasons for a slow WordPress site and how to fix them
The 5 most common reasons for a slow WordPress site and how to fix them
Otto Kekäläinen
 
Technical SEO for WordPress
Technical SEO for WordPressTechnical SEO for WordPress
Technical SEO for WordPress
Otto Kekäläinen
 
WordPress-tietoturvan perusteet
WordPress-tietoturvan perusteetWordPress-tietoturvan perusteet
WordPress-tietoturvan perusteet
Otto Kekäläinen
 
Technical SEO for WordPress - 2017 edition
Technical SEO for WordPress - 2017 editionTechnical SEO for WordPress - 2017 edition
Technical SEO for WordPress - 2017 edition
Otto Kekäläinen
 
MariaDB adoption in Linux distributions and development environments
MariaDB adoption in Linux distributions and development environmentsMariaDB adoption in Linux distributions and development environments
MariaDB adoption in Linux distributions and development environments
Otto Kekäläinen
 
WordPress security 101 - WP Jyväskylä Meetup 21.3.2017
WordPress security 101 - WP Jyväskylä Meetup 21.3.2017WordPress security 101 - WP Jyväskylä Meetup 21.3.2017
WordPress security 101 - WP Jyväskylä Meetup 21.3.2017
Otto Kekäläinen
 
WordPress security 101 - WP Turku Meetup 2.2.2017
WordPress security 101 - WP Turku Meetup 2.2.2017WordPress security 101 - WP Turku Meetup 2.2.2017
WordPress security 101 - WP Turku Meetup 2.2.2017
Otto Kekäläinen
 
Find WordPress performance bottlenecks with XDebug PHP profiling
Find WordPress performance bottlenecks with XDebug PHP profilingFind WordPress performance bottlenecks with XDebug PHP profiling
Find WordPress performance bottlenecks with XDebug PHP profiling
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
 
Git best practices 2016
Git best practices 2016Git best practices 2016
Git best practices 2016
Otto Kekäläinen
 
MariaDB Developers Meetup 2016 welcome words
MariaDB Developers Meetup 2016 welcome wordsMariaDB Developers Meetup 2016 welcome words
MariaDB Developers Meetup 2016 welcome words
Otto Kekäläinen
 
MariaDB in Debian and Ubuntu: The next million users
MariaDB in Debian and Ubuntu: The next million usersMariaDB in Debian and Ubuntu: The next million users
MariaDB in Debian and Ubuntu: The next million users
Otto Kekäläinen
 
Koodikerho PEPE Pajapäivä 6.9.2016
Koodikerho PEPE Pajapäivä 6.9.2016Koodikerho PEPE Pajapäivä 6.9.2016
Koodikerho PEPE Pajapäivä 6.9.2016
Otto Kekäläinen
 
MariaDB Foundation presentation and membership info
MariaDB Foundation presentation and membership infoMariaDB Foundation presentation and membership info
MariaDB Foundation presentation and membership info
Otto Kekäläinen
 

More from Otto Kekäläinen (20)

FOSDEM2021: MariaDB post-release quality assurance in Debian and Ubuntu
FOSDEM2021: MariaDB post-release quality assurance in Debian and UbuntuFOSDEM2021: MariaDB post-release quality assurance in Debian and Ubuntu
FOSDEM2021: MariaDB post-release quality assurance in Debian and Ubuntu
 
MariaDB quality assurance in Debian and Ubuntu
MariaDB quality assurance in Debian and UbuntuMariaDB quality assurance in Debian and Ubuntu
MariaDB quality assurance in Debian and Ubuntu
 
DebConf 2020: What’s New in MariaDB Server 10.5 and Galera 4?
DebConf 2020: What’s New in MariaDB Server 10.5 and Galera 4?DebConf 2020: What’s New in MariaDB Server 10.5 and Galera 4?
DebConf 2020: What’s New in MariaDB Server 10.5 and Galera 4?
 
Technical SEO for WordPress - 2019 edition
Technical SEO for WordPress - 2019 editionTechnical SEO for WordPress - 2019 edition
Technical SEO for WordPress - 2019 edition
 
How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...
How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...
How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...
 
DebConf 2019 MariaDB packaging in Debian BoF
DebConf 2019 MariaDB packaging in Debian BoFDebConf 2019 MariaDB packaging in Debian BoF
DebConf 2019 MariaDB packaging in Debian BoF
 
The 5 most common reasons for a slow WordPress site and how to fix them
The 5 most common reasons for a slow WordPress site and how to fix themThe 5 most common reasons for a slow WordPress site and how to fix them
The 5 most common reasons for a slow WordPress site and how to fix them
 
Technical SEO for WordPress
Technical SEO for WordPressTechnical SEO for WordPress
Technical SEO for WordPress
 
WordPress-tietoturvan perusteet
WordPress-tietoturvan perusteetWordPress-tietoturvan perusteet
WordPress-tietoturvan perusteet
 
Technical SEO for WordPress - 2017 edition
Technical SEO for WordPress - 2017 editionTechnical SEO for WordPress - 2017 edition
Technical SEO for WordPress - 2017 edition
 
MariaDB adoption in Linux distributions and development environments
MariaDB adoption in Linux distributions and development environmentsMariaDB adoption in Linux distributions and development environments
MariaDB adoption in Linux distributions and development environments
 
WordPress security 101 - WP Jyväskylä Meetup 21.3.2017
WordPress security 101 - WP Jyväskylä Meetup 21.3.2017WordPress security 101 - WP Jyväskylä Meetup 21.3.2017
WordPress security 101 - WP Jyväskylä Meetup 21.3.2017
 
WordPress security 101 - WP Turku Meetup 2.2.2017
WordPress security 101 - WP Turku Meetup 2.2.2017WordPress security 101 - WP Turku Meetup 2.2.2017
WordPress security 101 - WP Turku Meetup 2.2.2017
 
Find WordPress performance bottlenecks with XDebug PHP profiling
Find WordPress performance bottlenecks with XDebug PHP profilingFind WordPress performance bottlenecks with XDebug PHP profiling
Find WordPress performance bottlenecks with XDebug PHP profiling
 
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
 
Git best practices 2016
Git best practices 2016Git best practices 2016
Git best practices 2016
 
MariaDB Developers Meetup 2016 welcome words
MariaDB Developers Meetup 2016 welcome wordsMariaDB Developers Meetup 2016 welcome words
MariaDB Developers Meetup 2016 welcome words
 
MariaDB in Debian and Ubuntu: The next million users
MariaDB in Debian and Ubuntu: The next million usersMariaDB in Debian and Ubuntu: The next million users
MariaDB in Debian and Ubuntu: The next million users
 
Koodikerho PEPE Pajapäivä 6.9.2016
Koodikerho PEPE Pajapäivä 6.9.2016Koodikerho PEPE Pajapäivä 6.9.2016
Koodikerho PEPE Pajapäivä 6.9.2016
 
MariaDB Foundation presentation and membership info
MariaDB Foundation presentation and membership infoMariaDB Foundation presentation and membership info
MariaDB Foundation presentation and membership info
 

Recently uploaded

Intro to Amazon Web Services (AWS) and Gen AI
Intro to Amazon Web Services (AWS) and Gen AIIntro to Amazon Web Services (AWS) and Gen AI
Intro to Amazon Web Services (AWS) and Gen AI
Ortus Solutions, Corp
 
introduction of Ansys software and basic and advance knowledge of modelling s...
introduction of Ansys software and basic and advance knowledge of modelling s...introduction of Ansys software and basic and advance knowledge of modelling s...
introduction of Ansys software and basic and advance knowledge of modelling s...
sachin chaurasia
 
NBFC Software: Optimize Your Non-Banking Financial Company
NBFC Software: Optimize Your Non-Banking Financial CompanyNBFC Software: Optimize Your Non-Banking Financial Company
NBFC Software: Optimize Your Non-Banking Financial Company
NBFC Softwares
 
Google ML-Kit - Understanding on-device machine learning
Google ML-Kit - Understanding on-device machine learningGoogle ML-Kit - Understanding on-device machine learning
Google ML-Kit - Understanding on-device machine learning
VishrutGoyani1
 
Safe Work Permit Management Software for Hot Work Permits
Safe Work Permit Management Software for Hot Work PermitsSafe Work Permit Management Software for Hot Work Permits
Safe Work Permit Management Software for Hot Work Permits
sheqnetworkmarketing
 
Responsibilities of Fleet Managers and How TrackoBit Can Assist.pdf
Responsibilities of Fleet Managers and How TrackoBit Can Assist.pdfResponsibilities of Fleet Managers and How TrackoBit Can Assist.pdf
Responsibilities of Fleet Managers and How TrackoBit Can Assist.pdf
Trackobit
 
How we built TryBoxLang in under 48 hours
How we built TryBoxLang in under 48 hoursHow we built TryBoxLang in under 48 hours
How we built TryBoxLang in under 48 hours
Ortus Solutions, Corp
 
Addressing the Top 9 User Pain Points with Visual Design Elements.pptx
Addressing the Top 9 User Pain Points with Visual Design Elements.pptxAddressing the Top 9 User Pain Points with Visual Design Elements.pptx
Addressing the Top 9 User Pain Points with Visual Design Elements.pptx
Sparity1
 
FAST Channels: Explosive Growth Forecast 2024-2027 (Buckle Up!)
FAST Channels: Explosive Growth Forecast 2024-2027 (Buckle Up!)FAST Channels: Explosive Growth Forecast 2024-2027 (Buckle Up!)
FAST Channels: Explosive Growth Forecast 2024-2027 (Buckle Up!)
Roshan Dwivedi
 
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
ThousandEyes
 
Software development... for all? (keynote at ICSOFT'2024)
Software development... for all? (keynote at ICSOFT'2024)Software development... for all? (keynote at ICSOFT'2024)
Software development... for all? (keynote at ICSOFT'2024)
miso_uam
 
AWS Cloud Practitioner Essentials (Second Edition) (Arabic) Course Introducti...
AWS Cloud Practitioner Essentials (Second Edition) (Arabic) Course Introducti...AWS Cloud Practitioner Essentials (Second Edition) (Arabic) Course Introducti...
AWS Cloud Practitioner Essentials (Second Edition) (Arabic) Course Introducti...
karim wahed
 
AWS Cloud Practitioner Essentials (Second Edition) (Arabic) AWS Security .pdf
AWS Cloud Practitioner Essentials (Second Edition) (Arabic) AWS Security .pdfAWS Cloud Practitioner Essentials (Second Edition) (Arabic) AWS Security .pdf
AWS Cloud Practitioner Essentials (Second Edition) (Arabic) AWS Security .pdf
karim wahed
 
Top 10 Tips To Get Google AdSense For Your Website
Top 10 Tips To Get Google AdSense For Your WebsiteTop 10 Tips To Get Google AdSense For Your Website
Top 10 Tips To Get Google AdSense For Your Website
e-Definers Technology
 
Seamless PostgreSQL to Snowflake Data Transfer in 8 Simple Steps
Seamless PostgreSQL to Snowflake Data Transfer in 8 Simple StepsSeamless PostgreSQL to Snowflake Data Transfer in 8 Simple Steps
Seamless PostgreSQL to Snowflake Data Transfer in 8 Simple Steps
Estuary Flow
 
NYC 26-Jun-2024 Combined Presentations.pdf
NYC 26-Jun-2024 Combined Presentations.pdfNYC 26-Jun-2024 Combined Presentations.pdf
NYC 26-Jun-2024 Combined Presentations.pdf
AUGNYC
 
Abortion pills in Fujairah *((+971588192166*)☎️)¥) **Effective Abortion Pills...
Abortion pills in Fujairah *((+971588192166*)☎️)¥) **Effective Abortion Pills...Abortion pills in Fujairah *((+971588192166*)☎️)¥) **Effective Abortion Pills...
Abortion pills in Fujairah *((+971588192166*)☎️)¥) **Effective Abortion Pills...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
dachnug51 - Whats new in domino 14 .pdf
dachnug51 - Whats new in domino 14  .pdfdachnug51 - Whats new in domino 14  .pdf
dachnug51 - Whats new in domino 14 .pdf
DNUG e.V.
 
Shivam Pandit working on Php Web Developer.
Shivam Pandit working on Php Web Developer.Shivam Pandit working on Php Web Developer.
Shivam Pandit working on Php Web Developer.
shivamt017
 
Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...
Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...
Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...
Asher Sterkin
 

Recently uploaded (20)

Intro to Amazon Web Services (AWS) and Gen AI
Intro to Amazon Web Services (AWS) and Gen AIIntro to Amazon Web Services (AWS) and Gen AI
Intro to Amazon Web Services (AWS) and Gen AI
 
introduction of Ansys software and basic and advance knowledge of modelling s...
introduction of Ansys software and basic and advance knowledge of modelling s...introduction of Ansys software and basic and advance knowledge of modelling s...
introduction of Ansys software and basic and advance knowledge of modelling s...
 
NBFC Software: Optimize Your Non-Banking Financial Company
NBFC Software: Optimize Your Non-Banking Financial CompanyNBFC Software: Optimize Your Non-Banking Financial Company
NBFC Software: Optimize Your Non-Banking Financial Company
 
Google ML-Kit - Understanding on-device machine learning
Google ML-Kit - Understanding on-device machine learningGoogle ML-Kit - Understanding on-device machine learning
Google ML-Kit - Understanding on-device machine learning
 
Safe Work Permit Management Software for Hot Work Permits
Safe Work Permit Management Software for Hot Work PermitsSafe Work Permit Management Software for Hot Work Permits
Safe Work Permit Management Software for Hot Work Permits
 
Responsibilities of Fleet Managers and How TrackoBit Can Assist.pdf
Responsibilities of Fleet Managers and How TrackoBit Can Assist.pdfResponsibilities of Fleet Managers and How TrackoBit Can Assist.pdf
Responsibilities of Fleet Managers and How TrackoBit Can Assist.pdf
 
How we built TryBoxLang in under 48 hours
How we built TryBoxLang in under 48 hoursHow we built TryBoxLang in under 48 hours
How we built TryBoxLang in under 48 hours
 
Addressing the Top 9 User Pain Points with Visual Design Elements.pptx
Addressing the Top 9 User Pain Points with Visual Design Elements.pptxAddressing the Top 9 User Pain Points with Visual Design Elements.pptx
Addressing the Top 9 User Pain Points with Visual Design Elements.pptx
 
FAST Channels: Explosive Growth Forecast 2024-2027 (Buckle Up!)
FAST Channels: Explosive Growth Forecast 2024-2027 (Buckle Up!)FAST Channels: Explosive Growth Forecast 2024-2027 (Buckle Up!)
FAST Channels: Explosive Growth Forecast 2024-2027 (Buckle Up!)
 
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
 
Software development... for all? (keynote at ICSOFT'2024)
Software development... for all? (keynote at ICSOFT'2024)Software development... for all? (keynote at ICSOFT'2024)
Software development... for all? (keynote at ICSOFT'2024)
 
AWS Cloud Practitioner Essentials (Second Edition) (Arabic) Course Introducti...
AWS Cloud Practitioner Essentials (Second Edition) (Arabic) Course Introducti...AWS Cloud Practitioner Essentials (Second Edition) (Arabic) Course Introducti...
AWS Cloud Practitioner Essentials (Second Edition) (Arabic) Course Introducti...
 
AWS Cloud Practitioner Essentials (Second Edition) (Arabic) AWS Security .pdf
AWS Cloud Practitioner Essentials (Second Edition) (Arabic) AWS Security .pdfAWS Cloud Practitioner Essentials (Second Edition) (Arabic) AWS Security .pdf
AWS Cloud Practitioner Essentials (Second Edition) (Arabic) AWS Security .pdf
 
Top 10 Tips To Get Google AdSense For Your Website
Top 10 Tips To Get Google AdSense For Your WebsiteTop 10 Tips To Get Google AdSense For Your Website
Top 10 Tips To Get Google AdSense For Your Website
 
Seamless PostgreSQL to Snowflake Data Transfer in 8 Simple Steps
Seamless PostgreSQL to Snowflake Data Transfer in 8 Simple StepsSeamless PostgreSQL to Snowflake Data Transfer in 8 Simple Steps
Seamless PostgreSQL to Snowflake Data Transfer in 8 Simple Steps
 
NYC 26-Jun-2024 Combined Presentations.pdf
NYC 26-Jun-2024 Combined Presentations.pdfNYC 26-Jun-2024 Combined Presentations.pdf
NYC 26-Jun-2024 Combined Presentations.pdf
 
Abortion pills in Fujairah *((+971588192166*)☎️)¥) **Effective Abortion Pills...
Abortion pills in Fujairah *((+971588192166*)☎️)¥) **Effective Abortion Pills...Abortion pills in Fujairah *((+971588192166*)☎️)¥) **Effective Abortion Pills...
Abortion pills in Fujairah *((+971588192166*)☎️)¥) **Effective Abortion Pills...
 
dachnug51 - Whats new in domino 14 .pdf
dachnug51 - Whats new in domino 14  .pdfdachnug51 - Whats new in domino 14  .pdf
dachnug51 - Whats new in domino 14 .pdf
 
Shivam Pandit working on Php Web Developer.
Shivam Pandit working on Php Web Developer.Shivam Pandit working on Php Web Developer.
Shivam Pandit working on Php Web Developer.
 
Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...
Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...
Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...
 

Improving WordPress performance (xdebug and profiling)

  • 1. IMPROVING WORDPRESS PERFORMANCE Xdebug and PHP profiling WordCamp Athens 2017 Otto Kekäläinen Seravo.com @ottokekalainen
  • 2. ● Linux and open source advocate ● Contributed to WordPress Core, translations, Linux, Docker, Nginx, Redis, MariaDB… ● CEO, sysadmin and developer at Seravo.com – WordPress hosting and upkeep Otto Kekäläinen
  • 3. Enterprise grade hosting and upkeep for WordPress
  • 4. WORDPRESS SUCCESS FACTORS 1. Easy to use 2. Easy to extend
  • 6. A WEB FULL OF WRONG ADVICE Most of the guides and tutorials on security and speed lack evidence.
  • 7. I’ve done mythbusting at many WordCamps with WordPress Security 101 seravo.com/wordpress-security-101/
  • 8. Now it is time to make sense out of WordPress Speed Performance
  • 9. STEP 1: Measure STEP 2: Optimize STEP 3: Validate STEP 4: Rinse and repeat
  • 10. STEP 1: Measure Find out your baseline to make sure your optimizations later at least do not worsen the performance!
  • 11. FULL PAGE LOAD ● Online tools ○ WebPageTest.org ○ GTMetrix.com ○ Pingdom Tools ○ Yellow Lab Tools ○ Pagelocity ○ KeyCDN Performance Test ○ … ● Visualize: ○ HTML load time ○ CSS rendering ○ JavaScript loading ○ image files download ○ …
  • 12. HOW FAST IS WORDPRESS? = How fast PHP code generates the HTML = HTTP request time
  • 13. CURL ssh example.com curl -s -o /dev/null -w "%{time_total}n" https://example.com/ 0,235 https://curl.haxx.se/docs/manpage.html#-w
  • 14. CURL WITH NO CACHE curl -s -o /dev/null -w "%{time_total}n" -H "Pragma: no-cache" https://example.com/ https://developers.google.com/web/fundamentals/performance/opti mizing-content-efficiency/http-caching
  • 15. CURL LOOP TO DETECT VARIATION export LC_NUMERIC=C for i in {1..20} do curl -so /dev/null -w "%{time_total}n" http://localhost/ done | awk '{ sum += $1; n++; print $1 } END { if (n > 0) print "AVG: " sum / n; }' 0.209 0.107 0.152 AVG: 0.1378
  • 16. LOG HTTP REQUEST TIME [29/May/2017:10:02:45 +0300] "POST /wp-admin/admin-ajax.php HTTP/1.1" 200 58 "Mozilla/5.0 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36" - - 0.028 nginx.conf log_format extensive '$host ' '$remote_addr - $remote_user [$time_local] ' '"$request" $status $body_bytes_sent ' '"$http_referer" "$http_user_agent" ' '$upstream_cache_status - ' '$request_time';
  • 17. ANALYZE WITH GOACCESS ➔ Average load time ➔ Cumulative load time = sum of all loads
  • 18. STEP 2: Optimize Find and solve the bottleneck
  • 19. QUICK AND DIRTY: WP-CLI LOOP for p in $(wp plugin list --fields=name --status=active) do echo $p wp plugin deactivate $p for i in {1..5} do curl -so /dev/null -w "%{time_total}n" -H "Pragma: no-cache" http://localhost/ done wp plugin activate $p done
  • 20. QUICK AND DIRTY: WP-CLI LOOP ● Baseline ~550 ms ● Deactivating wp-to-twitter or polylang does not have an effect ● When deactivating advanced-custom-fields -pro load times drop to ~65 ms
  • 21. A LITTLE MORE DEPTH: DEBUG BAR
  • 22. THE PROFESSIONAL WAY: XDEBUG A tool for developers to ● analyze PHP execution ● find bottle necks ● xdebug.org
  • 23. XDEBUG INSTALLATION $ sudo apt-get install php-xdebug $ nano /etc/php/fpm/conf.d/20-xdebug.ini ; Enable Xdebug zend_extension=xdebug.so ; Enable php profiling with get param XDEBUG_PROFILE=1 xdebug.profiler_output_dir=/tmp xdebug.profiler_output_name=cachegrind.out.%t.%p xdebug.profiler_enable_trigger=1 $ sudo service restart php-fpm
  • 24. PROFILING RUN OF WORDPRESS FRONT PAGE /tmp $ curl -I http://localhost/?XDEBUG_PROFILE=1 -w "%{time_total}n" 0.611 /tmp $ ll -h 11M cachegrind.out.1455198789.5601 /tmp $ head cachegrind.out.1455198789.5601 version: 1 creator: xdebug 2.2.3 cmd: /data/wordpress/htdocs/index.php part: 1 positions: line ...
  • 25. WEBGRIND INSTALLATION $ cd /data/wordpress/htdocs $ git clone https://github.com/jokkedk/webgrind $ sudo apt-get install graphviz
  • 26. PREINSTALLED IN VVV AND SERAVO VAGRANT laptop$ vagrant ssh vagrant$ xdebug_on # Varying Vagrant Vagrants vagrant$ wp-xdebug-on # Seravo Vagrant
  • 29. FILTER FOR USUAL SUSPECTS ● load ● open ● curl ● query
  • 33. FREQUENT OR LONG DB QUERIES? Fix Avada theme upgrade check
  • 35. EXTERNAL HTTP REQUESTS ON EVERY PAGE LOAD?
  • 36. DEVELOPERS: PLEASE LEARN TO USE THE WP TRANSIENT API! Most DB queries and external PHP::curl request can be cached easily:
  • 38. $ for i in {1..99}; do curl -IL -H "Pragma: no-cache" -w "%{time_total}n" -o /dev/null -s "http://localhost/?XDEBUG_PROFILE=1"; done $ ll -Sh /tmp -rw-r--r-- 111M cachegrind.out.1455200976.5601 -rw-r--r-- 91M cachegrind.out.1455200984.5601 -rw-r--r-- 89M cachegrind.out.1455200972.5604 -rw-r--r-- 89M cachegrind.out.1455200964.5604 -rw-r--r-- 88M cachegrind.out.1455200973.5604 -rw-r--r-- 87M cachegrind.out.1455200963.5601 -rw-r--r-- 87M cachegrind.out.1455200967.5601
  • 40. STEP 4: Rinse & repeat
  • 41. DEMO: How fast can we make Twentyseventeen?
  • 43. STEP 2: OPTIMIZE Translation functions slowest. WP does not use native gettext (https://core.trac.wordpress.org/ticket/17268). Solution: composer require aucor/dynamic-mo-loader
  • 44. STEP 3: VALIDATE Before: 500-600 ms After: 300-400 ms
  • 46. REMEMBER ● Nginx access logs easy ● Xdebug never in production ● xhprof/uprofiler can be production ● PCEL APD (2004) ● memory_get_usage(), microtime()