• Skip to content
  • Skip to primary sidebar
  • Skip to footer

Foliovision

Main navigation

  • Weblog
    • FV Player
    • WordPress
    • Video of the Week
    • Case Studies
    • Business
  • About
    • Testimonials
    • Meet the Team
    • We Support
    • Careers
    • Contact
    • Pricing
  • Products
  • Support
    • FV Player Docs
    • Pro Support
  • Login
  • Basket is empty
Affordable VAST/VPAID for Wordpress has arrived. Serve ads with your videos starting today!

Speed optimization of WordPress

9 May 2013 / foliovision / Leave a Comment

This presentation was originally given at WordCamp Slovakia 2013 in Slovak Technical University on 20 April.

Speed optimization of WordPress 01
Speed optimization of WordPress 01

Speed optimization of WordPress 02
Speed optimization of WordPress 02

Story of WordPress is similar to other successful Content Management Systems. Increase of functionality, frameworks, template and other support functions.

Speed optimization of WordPress 03
Speed optimization of WordPress 03

With WordPress development comes a huge increase in source code size. In 5 years the source code is 4 times bigger. Source code size also goes hand in hand with bigger memory consumption, which also increased about 4 times.

Speed optimization of WordPress 04
Speed optimization of WordPress 04

It doesn’t end with source code and memory consumption. There’s more data to be stored in Database tables. Bigger community that creates plugins, themes and theme frameworks.

Speed optimization of WordPress 05
Speed optimization of WordPress 05

To optimize WordPress for speed, one has to understand at least basic inner workings of HTTP request.

Speed optimization of WordPress 06
Speed optimization of WordPress 06

Choosing a correct web server is also very important. Apache with default configuration proves to be unusable. Commercial LiteSpeed offers professional help with setup from developers. NginX on the other hand is one of the event-based alternatives to these process-based web servers like Apache and LiteSpeed. But every web server needs to be tweaked to perform optimally for a website. There is no optimal universal configuration.

Speed optimization of WordPress 07
Speed optimization of WordPress 07
Speed optimization of WordPress 08
Speed optimization of WordPress 08

Most of WordPress websites contain many images, JS, CSS, which means that the web server will be serving many flat files. With caching enabled, requests that need to be processed with PHP will seldom come.

Speed optimization of WordPress 09
Speed optimization of WordPress 09

One of the most important speed optimizations is caching of WordPress pages. There are multiple solutions available.

Speed optimization of WordPress 10
Speed optimization of WordPress 10

HTTP Accelerators like Varnish sit in front of web server and cache output for specific requests. Next time that the same request comes, Varnish will send to the browser the stored output so the request will never reach the web server. Saving web server the time needed to process the request.

Speed optimization of WordPress 11
Speed optimization of WordPress 11

Other option are direct WordPress caching plugins like W3 Total Cache, WP Super Cache and Hyper Cache. Every one has it’s advantages and disadvantages. W3 Total Cache offers many features, but is too complex. With new WP versions launching all the time you find W3 Total Cache breaking many times. WP Super Cache support was discontinued after the developer just wasn’t able to keep up with WordPress. Hyper Cache is the simple one, but very reliable. Our tests even showed that even in PHP mode it outperforms WP Super Cache running in htaccess mode. Hyper Cache KISS principle pays off.

Speed optimization of WordPress 12
Speed optimization of WordPress 12

Still, even caching by HTTP Accelerator and WP caching plugin still requires to refresh the content from time to time. On the other hand some content on the webpage doesn’t need refreshing for a long time. Here you can start to cache just some parts of the page, like menus and sidebars that have less dynamic content than the rest of the page. CDN should help to better distribute the static data, but has it’s own cumber-stones. Using APC or some other PHP Accelerator also improves the speed of request processing. Using external services, may create unnecessary HTTP requests which may slow the loading times on client side. Good example is Gravatar Cache plugin that stores gravatars, so the browser doesn’t have to make a request for every comment with gravatar.

Speed optimization of WordPress 13
Speed optimization of WordPress 13

Speeding up WordPress doesn’t end with just putting more tools to it. Huge part is optimization of plugins and theme. There are many plugins available to download for free or buy. They may contain nasty pieces of code that may break your site performance.

Speed optimization of WordPress 14
Speed optimization of WordPress 14

Every plugin developer should study WP API, so he’ll not abuse it, go against it. KISS principle proves to be very useful when designing fast plugins. Every plugin interacts somehow with WP, cross interactions between different plugins are not uncommon. These may have negative impact on performance. It’s good practice to use native WP functions, since they are coherent with each other. Not abusing other resources like Database is also important.

Speed optimization of WordPress 15
Speed optimization of WordPress 15

Every theme wants to be unique, so testing and optimizing it is also very important. Using database profiler to reduce number of queries or optimize the ineffective ones. Reducing number of CSS and JS files. Making sure ineffective WP functions get called will only the needed content. These all help to reduce the load time of the web page.

Speed optimization of WordPress 16
Speed optimization of WordPress 16

Database profiler may show you problems you don’t notice just by looking on the site.

Speed optimization of WordPress 17
Speed optimization of WordPress 17

Choosing correct database engine is also important. The decision is highly website to website dependent.

  • InnoDB pros:
    • Better data integrity, support for transactions
    • Quicker insert and update of data
  • InnoDB cons:
    • Tables don’t store rows count
    • Memory requirements
    • No full text indexation
Speed optimization of WordPress 18
Speed optimization of WordPress 18
  • MyISAM pros:
    • Simple engine and overall quickness
    • Has full text indexation
    • Quicker for select
  • MyISAM cons:
    • Bad data integrity, problems with database crash
    • Row data stored in whole
Speed optimization of WordPress 19
Speed optimization of WordPress 19

WordPress Database structure is not entirely optimal. Posts table tend to store to much data that doesn’t need to be there (menus, revisions, custom posts). Comments table stores spam for instance.

Speed optimization of WordPress 20
Speed optimization of WordPress 20

Magical word EXPLAIN in MySQL may help to find flaws in bad database design. Choosing correct indexes is very important for fast selects.

Download this presentation here.

Categories: WordPress

Related Posts

  1. PHP Speed and Security: The Code Optimization Phase

    PHP Speed and Security: The Code Optimization Phase

  2. Speed Up Your WordPress

  3. Improve your WordPress speed by Caching Comments

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

You can click here to Subscribe without commenting

Primary Sidebar

Categories

  • Business
  • Camera Reviews
  • Case Studies
  • Design
  • FV Player
  • Internet Marketing
  • IT
  • Life
  • SEO
  • Slovak
  • Video of the Week
  • WordPress

Footer

Our Plugins

  • FV WordPress Flowplayer
  • FV Thoughtful Comments
  • FV Simpler SEO
  • FV Antispam
  • FV Gravatar Cache
  • FV Testimonials

Free Tools

  • Pandoc Online
  • Article spinner
  • WordPress Password Finder
  • Delete LinkedIn Account
  • Responsive Design Calculator
Foliovision logo
All materials © 2025 Foliovision s.r.o. | Panská 12 - 81101 Bratislava - Slovakia | info@foliovision.com
  • This Site Uses Cookies
  • Privacy Policy
  • Terms of Service
  • Site Map
  • Contact
  • Tel. ‭+421 2/5292 0086‬

We are using cookies to give you the best experience on our website.

You can find out more about which cookies we are using or switch them off in .

Powered by  GDPR Cookie Compliance
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

Necessary Cookies

Strictly Necessary Cookie allow you to log in and download your software or post to forums.

We use the WordPress login cookie and the session cookie.

If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.

Support Cookies

Foliovision.com uses self-hosted Rocket.chat and self-hosted Freescout support desk to provide support for FV Player users. These cookies allow our visitors to chat with us and/or submit support tickets.

We are delighted to recommend self-hosted Rocket.chat and especially Freescout to other privacy-conscious independent publishers who would prefer to self-host support.

Please enable Strictly Necessary Cookies first so that we can save your preferences!

3rd Party Cookies

This website uses Google Analytics and Statcounter to collect anonymous information such as the number of visitors to the site, and the most popular pages.

Keeping this cookie enabled helps us to improve our website.

We reluctantly use Google Analytics as it helps us to test FV Player against popular Google Analytics features. Feel free to turn off these cookies if they make you feel uncomfortable.

Statcounter is an independent Irish stats service which we have been using since the beginning of recorded time, sixteen years ago.

Please enable Strictly Necessary Cookies first so that we can save your preferences!