This guide will explain how to optimize the performance of a WordPress website.
Step 1. Limit the number of plugins being used
Step 2. Avoid bloated themes and plugins
Step 3. Enable gZIP compression and browser caching
Step 4. Optimize images
Step 5. Install WordPress caching plugins
Step 6. Database and Other Optimization Measures
WordPress performance out of the box (a new, blank installation) is fairly fast, but as you add content, themes & plugins, the performance typically drastically decreases. The options below are what we recommend for some basic optimizations for your WordPress site that can help decrease load times on your site. Before hand, there’s a few prerequisites we recommend for all WordPress sites:
1. Limit the number of plugins being used
This cannot be stressed enough. We typically recommend at the most, 10-15 WordPress plugins. Depending on what plugins you are using, this number could still be high. The quality of the plugin being used is also very, very important.
2. Bloated themes
The theme you choose can also play a large role in the performance of WordPress. there are good themes & there are bad themes. We recommend that you keep a close eye on the number of “features” included in your themes – generally, the lighter the theme is in terms of features/bells & whistles, the better the theme will perform.
We highly recommend reviewing our article WordPress Themes & Plugins: Bloat & what is too many
3. gZIP Compression
## GZIP COMPRESSION ##
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
## GZIP COMPRESSION ##
4. Browser Caching
## BROWSER CACHING ##
ExpiresByType image/jpg “access 1 year”
ExpiresByType image/jpeg “access 1 year”
ExpiresByType image/gif “access 1 year”
ExpiresByType image/png “access 1 year”
ExpiresByType text/css “access 1 month”
ExpiresByType application/pdf “access 1 month”
ExpiresByType application/x-shockwave-flash “access 1 month”
ExpiresByType image/x-icon “access 1 year”
ExpiresDefault “access 2 days”
## BROWSER CACHING ##
5. Image Optimization
Before uploading images to your site, you want to ensure they are properly optimized for use on your website. This means the images should be as small in file size as possible without compromising the quality of the image.
Image Dimensions: Avoid uploading images that are larger than their display size. For example, if the display are on your site for the image in question is 300 x 300 pixels, don’t upload an image that is 800 x 800. Using html to scale the images uses additional resources which can increase the load time of your site.
6. WordPress Caching Plugin
We use LiteSpeed web server on our shared/reseller plans and as an optional add-on to the VPS segments. LiteSpeed web server has caching options onboard and to utilize the benefits of this server-side caching, we can install “LiteSpeed Cache plugin for WordPress” plugin available in the WordPress repositories. We have a separate and detailed guide for installing and configuring the Litespeed cache plugin here: LiteSpeed Web Server LS Cache for WordPress
You should disable or remove existing caching plugins before enabling LS cache for WordPress plugin to avoid conflicts and unexpected site behavior.
For VPS without LiteSpeed installed, we recommend using WP Super Cache as a caching plugin for WordPress. Based on testing & performance of customer use cases, we’ve seen the best performance yielded from WP Super Cache.
You can view our guide on installing WordPress WP Super Cache here: Install WP Super Cache
If WP Super Cache proves to be too complicated for you to use, you can consider looking at Cache Enabler. While this plugin is nowhere near as popular as WP Super Cache, it is the simplest caching plugin of its kind that even novice users will not have any trouble setting up.
7. Database and Other Optimization Measures
As your website grows, your database too grows. Post revisions, cached remarks, and other such data can make your WP database too large and cumbersome. This can slow down your website.
WP Optimize is a highly popular plugin that lets you clean up your database. It can remove unwanted spam comments, post revisions, transient options, and other orphaned metadata (such as tags that have zero posts under them).
Bear in mind that you should always backup your website before making changes to the database. To learn more about optimizing WP, read our WordPress guide here.
If you have any web hosting questions please feel free to reach out to us. We're happy to help.
Shared Hosting | Reseller Hosting | Managed WordPress Hosting | Fully Managed VPS Hosting
Our Guiding Principles
- Provide consistent, stable, and reliable web hosting services.
- Ensure rapid ticket response and quick resolutions to issues.
- Never saturate or over-provision servers to ensure stability and speed for our customers.
- Use only high-quality enterprise-class hardware to ensure minimal downtime from hardware failures.
- Provide clear pricing with no hidden fees or gotchas.