What is the best way to Optimize WordPress site? Well there is not just a couple of things to make it happen. There are number of things that affect WordPress optimization.
Even if you don’t do something as stupid as these with your site, there’s still a lot of room for improvement when it comes to speeding up your WordPress site. I optimize around 8-10 WordPress sites in an average month, and there are a few techniques I always leverage to optimize and speed up WordPress sites. Optimizing your site requires rich SEO tools and the right SEO strategy
Here are a few ways (some well-known, some not) you can improve the performance of your WordPress sites:
Now lets learn how to optimize WordPress site.
#1: Choose A Good Web Host
You can think of optimizing your WordPress site only after you surely know that it’s not your host that’s slowing down your site. Recently, I’ve been optimizing a site which was hosted on GoDaddy, which is, of course, one of the most horrible hosts out there that puts thousands of sites on a single shared server. As a result, their servers are damn slow. You have to make sure you don’t make these mistakes while choosing a web host that most beginners make.
Like I always recommend, go visit some community like WebHostingTalk that’s filled with Web Hosting enthusiasts. Read some genuine reviews of the host you were planning to go with, before actually going with them. I came to know about MDDHosting, the host that we’re on since 2011, from WebHostingTalk. And I thank myself everyday for doing some actual research instead of going with just another crappy top-10 ‘unlimited everything’ host.
Read my MDDHosting Review to know how a great web host can benefit you and save you hassles in the long run.
If you wish to receive WordPress-specific support from your host, you can try a managed WordPress host. WPEngine is a fast growing reputable host that specializes in WordPress hosting. More “well-known” options include BlueHost and InMotion Hosting.
#2: Use A Fast Theme/Framework
You need to start with a fast and well-coded WordPress theme or framework. If you choose a theme packed with lots of additional features that you don’t need, it’ll negatively impact your site performance.
Last time I dealt with a heavy theme and framework, I had to put in more than 8 hours to optimize YooTheme’s Subway theme, to make it faster and improve the load time of the site from 5.5 seconds to 1.8 seconds.
The default WordPress themes are incredibly well-coded, light-weight, very fast, and easily customizable. If you can handle a little bit of code or hire a developer, choose one of those to build something great on top of them. I tweaked the default WordPress Twenty Thirteen theme for this site and it’s getting the job done very well.
#3: Install A Caching Plugin
The second most effective way (the first being choosing a good web host) to improve your site’s load times is to install a caching plugin. As soon as you install a plugin like W3 Total Cache or WP Super Cache, you’ll be able to tell that your site loads faster.
In simple words, when a caching plugin is active on your site, its servers users cached copies of your pages. It greatly reduces MySQL database access, no. of PHP requests, server access for static resources, and even HTTP requests (in case of combining multiple files into one).
W3 Total Cache is one my most favourite WordPress plugins. It offers a variety of caching features:
- Page Cache
- Object Cache
- Database Cache
- Browser Cache
Initially, you don’t want everything enabled. You can still safely enable everything except Minify and CDN (unless you want to use a CDN).
Minify breaks some other heavily JS-based plugins unless you specifically tweak it. On the other hand, you should tweak the Browser Cache settings to utilise the full potential of browser caching.
#4: Try a CDN to Speed Up WordPress
Offloading the static resources of your site, like images, scripts, css files, can speed up your site. Not only those resources will load faster for visitors, if you use a CDN, your primary server will have less load to handle and thus will deliver significantly better performance while serving the rest of your site.
Offloading the static resources of your site, like images, scripts, CSS files, can speed up your site. Not only those resources will load faster for visitors if you use a CDN, but your primary server will also have less load to handle and thus will deliver significantly better performance while serving the rest of your site.
Generally, those static resources will be served to your visitors by the server closest to them. That will ensure the heavy part of your site loads as fast as possible for your users.
There are quite a few Content Delivery Networks out there. But one that’s really easy to setup on WordPress sites is MaxCDN. I’ve been using MaxCDN since the beginning of this year and it has helped us shed around 1.5 seconds off our load time.
#5: Enable Gzip Compression
You should serve compressed versions of your site to your visitors, as they’ll be less in size and will generally load a lot faster.
The best option is to enable Gzip compression straight from cPanel (if your host offers you that) if you’re on a shared server. Otherwise, you can enable Gzip compression using a plugin like W3 Total Cache.
There are also a few tweaks that allow you to enable it from your .htaccess file. You can simply add this code to the beginning of your .htaccess file to enable server-level Gzip compression for a few known file types:
#6: Install Well-coded Plugins
There are literally tons of plugins available for WordPress. That doesn’t mean all of them are well-coded. You should always install plugins that are well optimized for the latest version of WordPress which don’t slow your site down.
You should perform some research before installing a below 3-star rated plugin. Often the plugin will turn out to be poorly developed, using inappropriate hooks. It will not only slow down your site but in certain cases might also mess up with the functionalities of other plugins and WordPress itself.
Once in awhile, monitor your plugins’ performance and impact on your site’s load time by using a plugin like Plugin Performance Profiler. It isn’t 100% accurate but you can observe the trends to know which plugins are really slow and troublesome for your site
#7: Perform Routine Maintenance on Your Plugins
Plugin maintenance is very important for WordPress sites. If you don’t keep all your plugins and WordPress itself updated, chances are that your site will get hacked.
It isn’t a rule, but older versions of plugins are generally more vulnerable to attacks. Not only that, newer versions of plugins are in most cases more optimized, faster, and more secure with less or no bugs.
You should also disable, and even delete the plugins that you don’t use. More plugins don’t necessarily mean a slower site, but lots of low-quality plugins together will slow down your site significantly
#8: Optimize Your Database
You can optimize your WordPress MySQL database directly from PHPMyAdmin, or by using a plugin like WP-Optimize or WP-DBManager.
These plugins are capable of deleting all your pending spam comments, trashed posts, auto-saved drafts, post revisions to name a few. They can also perform general MySQL database optimization queries without you having to access PHPMyAdmin.
A well-optimized, fast responding database is a huge bonus for a database-driven software like WordPress.
#9: Optimize Uploaded Images
Images are one of the heavier elements of your site. There are a few ways you can optimize your uploaded images.
First of all, you should specify the maximum image dimensions for thumbnail, medium, and large-sized images. That means if you upload an image 1024px wide, and your content area is only 604px wide, normally the image will be scaled down using CSS. When you specify the maximum width of your ‘large’ images as 604px, it’ll then display the pre-resized, 604px wide image, which will be significantly smaller in size.
The second thing you’d want to do is to reduce the sizes of your uploaded images without resizing them, or messing with their quality. Yahoo’s Smush.it is your ally in this case. It is able to losslessly reduce image sizes.
And I quote from the official site: “Smush.it uses optimization techniques specific to image format to remove unnecessary bytes from image files. It is a “lossless” tool, which means it optimizes the images without changing their look or visual quality”.
Fortunately for you, you don’t need to visit the Smush. it website every time you need to compress a couple of images. There’s a WordPress plugin for that! ????
The WP Smush. it plugin allows you to upload images normally while it automatically optimizes them using Yahoo’s Smush. it API behind the scenes.
#10: Delete Old Post Revisions
Do you really need 10s of revisions of your old posts that have already been published a long time ago? You probably don’t.
The Revision Control plugin allows you to remove old post revisions from your WordPress database, making it considerably smaller, and your site slightly faster.