How to speed up WordPress?
WordPress is the most well optimized CMS but there is still some job need to be done. Previously we have talked about leveraging browser cache and in this article we will talk about the output compression. It is important part of SEO as google gives higher rank to pages that are well optimized. With output compression you will minimize internet traffic used to load your page and as a result get lower load time.
What is Output Compression?
When output compression is enabled the sever will send compressed output to the browser. All major browser can work with compressed output and they will automatically decompress it. By default output compression is disabled but you can enable it via .htaccess file.
How to enable output compression?
To enable output compression you need to enable mod_deflate on your Apache server. Most of hosting providers are enabling it by default. Anyway if it is disabled you can always ask them to enable it.
WordPress is also recommending to enable output compression and they have article in their codex about that. It’s not enabled out of the box not to have problems on some servers.
You can reach desired result with two methods via plugins or manually. If you want to use plugin there are a lot of great plugins but we recommend W3 Total Cache as it’s complex solution to optimize your WordPress blog. If you will use page cache too keep in mind that user will be served with cached copy of the page. When using plugins that are automatically changing content on refresh be sure that they are compatible with cache plugins. For example Aparg SmartAd is WordPress advertisement management plugin that has Anti-Cache feature. This feature will allow to load content later and work with cache plugins like a charm.
You can also use manual method to give the best possible configurations that fit your website. First you need to create .htacces file in your website root directory or modify if it already exists. Here you have to give instructions to the server. Add resources that must be compressed by their mime type. Keep in mind that you don’t need to compress resources like images or videos as they are already compressed and you will simply lose performance on compressing them again. To understand that everything was done right you can use output compression test tools like checkgzipcompression.com. Now if you are sure that your output is properly compressed you will get more points in Google PageSpeed test. We will post fail safe configurations based on our experience that will fit most of the sites.