=Dat artikel is momenteel alleen beschikbaar in het engels=
If you like using plugins as much as I do, your (multisite) website can get slow very fast. I’d like to share with you a couple of ways to increase WordPress’ loading speed. (At the time this article was written we were still using shared hosting, nowadays were on a VPS which basically means that we get AAA ratings without the use of plugins) The overall configurations mentioned in this article could use some fine-tuning depending on the plugins you’re using AND the direct user experience, after all these are just colored letters.
Before we begin: to speed up wordpress the WP Super Cache (my personal favorite) and W3 Total Cache are excellent and extensive plugins for caching and from what I read the latter is now multisite compatible as well. They both have a bit of a learning curve if you don’t want to blindly activate functions and hope for the best. Once installed and configured you can add numbers 1, 2, 3 and 4 of this article to further optimize your set up. From this point on this article will focus on optimizing without the use of these plugins.
Speed up WordPress in 9 steps
To keep this article manageable we will not go into specific details on how these plugins work, just global information and configuration, plugins used:
- Optimize Database after Deleting Revisions
- A general fix-it-all .htaccess code snippet
- Better WordPress Minify
- BJ Lazy Load
- Plugin Organizer
- Use Google Libraries.
- Hyper Cache
- WP Smush.it
- Incapsula CDN, free version
NB. This article is an updated version of the original from 2013 and to keep the used plugins lined up with the test results I have not changed them or added new ones. The following plugins we have grown to love since:
- Minqueque – ‘Minify & Concatenate Enqueued Scripts & Styles’
NOTE: easy plugin with great speed optimization gains but unfortunately not very SEO friendly: prevents Google to access parts of content
- Wordfence Security – ‘Protecting your website from hacks and malware’
NOTE: one of our favorites and because of the Falcon cache option (Pro only) not just for air tight security!
Step 0- Back up your website!
One of my favorite plugins all time is the WP-DBManager plugin to backup, optimize and repair your database. Copy FTP if you are able and/or make database and files backups from your hosting environment. There is no such thing as too many backups folks!
Step 1 – Deleting revisions
Old posts and pages (and a post/page is ‘old’ after a single change) are stored on your database and will slow down your website, especially that much valued First Byte Time. The Optimize Database after Deleting Revisions is a great plugin, very easy to work, which allows you to remove this extra baggage: you will be surprised at the difference in performance after using it!
Step 2 – A general fix-it-all .htaccess code snippet
Sets Expires Headers, activated gzip compression and deflate (if active on server), sets etags, etc. etc. Just copy/paste it in your .htaccess file get it here. In almost all cases a gigantic win!
Step 3 – Install the Better WordPress Minify plugin
There a several good minify plugins around, I prefer the Better WordPress Minify because of performance and compatibility with other plugins.
Step 4 – Install the BJ Lazy Load plugin
The BJ Lazy Load plugin is one of my favs, it allows you to choose which element of your content under the fold will be loaded immediately or on scroll. This will load the initial view much quicker and will save bandwidth at the same time. Last but not least: option to have images ‘fade in’ on load: SMOOTH!
Step 5 – Download Plugin Organizer
Another one of my preferred plugins to speed up WordPress is Plugin Organizer by Jeff Sterup. It has quite a few nifty tricks but the ‘selective Plugin Loading’ and the ‘Plugin Load Order’ options I like best. Basically it means that you can now tell WordPress not to load plugins that are not used on a specific post or page if it not used there (!), which will reduce HTTP requests and thus loading time. This option is also a great tool to bypass conflicting plugins and still use them on your website. The ability to change the loading order will allow you to tweak your performance even further, for example by loading plugins that rely heavily on jquery which cause a webpage to load partly, then pause, and then load the rest of the page. Personally I really dislike having to wait for it to display until the rest of the page is loaded, it is messy and suggests that the website is slow in general. Now you can find the best position for it to load and time-push a plugin that is active under the fold or jquery rich to load later. Seriously, how cool is that?
Step 6 – Use Google Librairies
Just drop Use Google Libraries in the mu-plugins folder and you’re able to ‘use the content distribution network side of Google’s AJAX Library API, rather than serving these files from your WordPress install directly.’ TIP: check regularly (or subscribe to RSS or Twitter feed) to keep this file updated, it happened to me that an outdated version started all sorts of havoc.
Step 7 – Hyper Cache
It turned out to be nearly impossible to find a compatible cache plugin for my networks, imagine my relief when I stumbled into the Hyper Cache plugin by Stefano Lissa! It performs very well (just make sure you make the required adjustments mentioned on the website) and also reduces your bandwidth a lot. I mean what, 90% or so? Yep. NB. I would not recommend to use this plugin on networks where anyone can register, since this plugin needs to be deactivated before every update.
Step 8 – WP Smush it
Compress your images (without loss of quality) using WP Smush.it on upload or manually, the Pro version rocks even harder!
Step 9 – Incapsula (free) CDN service
I have tried to hook up with several free CDN services and before Incapsula I never got it working. Either it was too complicated, or a credit card number was required (I refuse), or it just didn’t work at all. I’m glad that I kept trying though, this CDN service really brings the speed of the website to excellent levels. Incapsula has a beautiful website and signing up is easy, plus and the support is great even for free accounts. They will improve performance, save you a great deal of bandwidth, and add security. You’ll have to make an account, sign up a website and make the required DNS changes. Incapsula will send an email when this is done correctly, easypeasy. (Note that after you have made some changes in your DNS settings you have to give it a couple of days before you test your website!) Caching will improve over the next weeks.
I hope you have enjoyed this article and that it was of use to you, if you have any questions, additions or remarks please do not hesitate to leave me a comment below. Sharing this article is appreciated!