Louise gave a ten minute lightening talk at the WordPress London WPLDN meetup on 28th June, on ways to improve website speed. So here are our top tips and slides.
4. Why?
• Starting in July 2018, Google will use mobile page speed
as a ranking in their mobile search results.
• https://www.thinkwithgoogle.com/marketing-
resources/experience-design/mobile-shopping-
ecosystem
5. 1. Domain DNS
• Use a fast DNS for nameservers
• We use Cloudflare’s free plan
• https://www.cloudflare.com/
6. 2. Better hosting
• Google: less than 200ms response time
• Cheap shared hosting is a false economy
• We use WP Engine
https://wpengine.co.uk/
7. 3. Use HTTP/2
• You have an SSL certificate don’t you?
• Check your site https://http2.pro/
• If not upgrade your hosting
8. 4. php version
• Check if you are running php 7
• If not, check your website is compatible and then
upgrade
https://wordpress.org/plugins/php-compatibility-
checker/
9. 5. Enable GZIP
• Check if you have GZIP enabled on your hosting
https://checkgzipcompression.com/
• On Apache can use a plugin (or edit htaccess)
https://wordpress.org/plugins/gzip-ninja-speed-
compression/
10. 6. Use a CDN
• Content Delivery Network
• Static content stored on servers, delivered by
server closest to browser
• WP Engine, Cloudflare, MaxCDN
11. 7. Minify CSS / JS / HTML
• Part of your website development process
or
• Use a caching plugin to fix this if necessary
https://wordpress.org/plugins/autoptimize/
12. 8. Remove query strings from
static resources
• Cannot cache a link with a “?” in its URL
• We use a plugin for <head> resources
https://wordpress.org/plugins/remove-query-
strings-from-static-resources/
13. 9. Reduce images sizes
• Compress to remove unnecessary information without
reducing quality for JPEG, PNG
• We use a plugin TinyPNG
https://wordpress.org/plugins/tiny-compress-images/
• Also resize images
• Serve images at the correct size in your theme
14. 10. Only load code used
• Do not load every script onto every page, choose
the specific pages to load specific scripts
• We use a plugin
• https://tomasz-dobrzynski.com/wordpress-
gonzales
15. 11. Review external scripts
• Extra tracking codes
• Embedded widgets
• Unused resources e.g. emojis
• Review regularly and remove as many as possible
17. Tools
Lighthouse https://github.com/GoogleChrome/lighthouse
Google Page Speed https://developers.google.com/speed/pagespeed/insights/
ySlow http://yslow.org/
WebPageTest https://www.webpagetest.org/
GTMetrix https://gtmetrix.com/
Pingdom Speed Test https://tools.pingdom.com/
Website Grader https://website.grader.com/
Page Performance https://wpengine.com/page-performance/
Google Test My Site https://testmysite.thinkwithgoogle.com/
Cloudflare 10ms response time
Have a free plan
Security benefits as well
V7 twice as fast as 5.6
Ask your hosting provider if you can upgrade
Use a plugin to check compatibility
GZIP file format used for file compression and decompression.
“content-encoding: gzip” response header. If the header is detected, it serves up the compressed and smaller files
enabled server-side, and reduces HTML, stylesheets, and JavaScript files.
Reduce sizes of pages by up to 70%
based on the geographic locations of the user, the origin of the webpage and the content delivery server
Wpengine / cloudflare
process of removing unnecessary or redundant data without affecting how the resource is processed by the browser - e.g. code comments and formatting, removing unused code, using shorter variable and function names, and so on.
Image compression
Typical savings 40% - 60%
Tinypng and Smush
based on the geographic locations of the user, the origin of the webpage and the content delivery server
Wpengine / cloudflare