Nothing serves as a barrier between you and your potential customers or subscribers quite like a slow website. Seconds matter -milliseconds matter- when you’re loading web pages. Time waiting for a page to load adds up fast: you can lose as many as 10% of your readers as load times approach a mere 2 seconds, and 1 in 4 approaching 4 seconds![1] This is Part 2 of a two part series looking at steps you can take to speed up WordPress. Be sure to check out Part 1 if you missed it. We looked at general housekeeping steps last week, and we’ll tackle overall website optimization to speed up WordPress sites in this one. Take a look!
Speed Up WordPress!
1) Choose the Right Hosting Partner
You’ve got to start from the ground up to get the most out of your website performance-wise, and nothing is as foundational to your site as your hosting plan. Shared hosting plans are the inexpensive and therefore very popular route, but they absolutely sacrifice performance for economy. That’s certainly not a dig at web hosts that offer shared plans- they fill a large niche in the ecosystem of the web and their affordability is integral for the diversity we all enjoy in the online realm.
That being said, if you’re serious about running a business or building a web property that handles considerable amounts of traffic, you need to consider upgrading to a VPS or managed web hosting solution.
2) Select a Theme Strategically
Aesthetics is the one thing most folks are looking for when theme shopping. Making your website look great is certainly the most obvious function of a theme, but did you know it has a major role in your website’s overall performance as well?
When you’re talking themes, you have the theme framework (a developmental theme template of sorts) and then the theme itself that’s built on top of it. The framework your theme is built on is very important to the performance of your site. A well-built, lightweight, speedy framework is going to help your site whir right along.
StuidoPress themes running on the Genesis framework, Parallelus themes on the Runway framework, and iThemes on the iThemes Builder framework are all options that it’s hard to go wrong with. These themes aren’t free, but your site will look and run beautifully for the investment.
3) Optimize Your Homepage
This isn’t maintenance so much as strategy. The more that has to load with your homepage, the longer that initial page load is going to take for a good many of your first time visitors. Being deliberate about what you display on your homepage can bring that load time down. What kind of things can you trim?
- Adjust the number of posts that display on the initial page load
- Use post excerpts or the read more tag to display teasers for each post rather than the entire post
- Ditch unnecessary widgets and sidebar material. Being minimalist here pays off to the extent that you’re still able to effectively deliver the content that your visitors want.
4) Test and Trim Your Plugins
First, delete plugins you don’t use. Don’t treat your site as a warehouse for things you might use again sometime soon. Security issues with old plugins, even deactivated ones, can cause big problems for you. Security aside, unused plugins are bloat slowing your site down. Get rid of ‘em.
For the plugins that you do use, test them with a tool like the P3 Plugin Performance Profiler. If you identify plugins that are dragging you down, speed up WordPress by searching for an alternative plugin that does the same thing.
5) Use a Content Delivery Network
A content delivery network (CDN) is a network whose purpose is to deliver your website’s content from caches around the world that are closer to the reader than your website’s physical server. In other words, your CDN’s job is to cache requested resources and deliver them to the visitor as quickly as possible from a point as geographically close to that visitor as they can get.
If your servers are physically located in NYC and I request a webpage from my hotel room in Hong Kong, the data would be served from your CDN’s local cache in Hong Kong rather than having to travel from NYC.
The benefits of a CDN are twofold:
- Your visitors receive content requests much faster using a CDN
- Bandwidth usage is reduced on your own server, saving you money and further reducing load times for requests to your servers.
KeyCDN, Cloudflare, and MaxCDN are popular options to help jump start your search.
6) Use a Caching Plugin
Caching could be compared to short term memory. Say it took you 5 minutes to answer a riddle. A little bit later someone asks you the same riddle again. You don’t have to spend 5 minutes working back through it, you just spit the answer back out from short term memory in a couple seconds.
Caching is like that. You can set a caching plugin to remember a copy of your site for a period of time. Let’s say 1 day. The first time someone requests your site that day, the server would detect the request, process the website’s code and send the results out as HTML to the visitor’s browser. The caching plugin basically saves that HTML for you, and for the rest of that 1 day period would serve the copy to future visitors instead of your server having to process each new request. You save server resources, the visitor has the page load faster. It’s a win win.
WP Rocket and W3 Total Cache are two popular caching plugins to get you started looking. WP Rocket is a premium offering but tends to perform the best in benchmarking.
7) Look into Database Optimization
If you do regular maintenance for your PC (you really should), then you know what a huge difference running a hard disk defragmentation can make in performance. The same general concept that applies to a hdd defrag can be ported over to speed up WordPress. From time to time it’s a good idea to clean up orphaned files, archived spam and deleted comments, duplicate data, old post revisions, etc. It makes a difference!
WP Optimize, WP Sweep, and WP DBManager are all great database optimization plugins with their own individual strengths.
8) Optimize Your Images
Images can eat up space quickly given their generally bulky nature as compared to text. If you use lots of images in your content, you can also really start to drag down your page load time. Fortunately, there are remedies to both these points that you can implement and still use images as liberally as you want to.
Check out our article on image optimization to see a sampling of the best plugins of that genre around the WordPress space. These plugins will compress images both old and new so that they take less space while retaining the same picture quality.
You can also look into Lazy Load and the many related plugins that share that name in some form. These plugins speed up WordPress by dictating how your images load when a reader visits a page. It may be advantageous depending on your circumstance to not have the entire page’s images load all at once.
9) Prevent Hotlinking from Your Website
Hotlinking is a form of bandwidth theft that’s as old as the web itself. We’ve written an entire article on hotlinking already that you can follow for the how-tos, so we won’t go into a great amount of detail here. The basics though are that each time someone links back to an image on your website instead of hosting it themselves, every visitor to their website uses your server’s bandwidth. Depending on the traffic the thieving site receives, this could be a minor issue or a major one for you. Speed up WordPress by preventing image hotlinking altogether.
10) Minify Javascript and CSS
Careful before you speed off with this one. It will be a useful tip for some, and maybe not so much for others. In essence, the Javascript and CSS code in your WordPress files are written to be human readable. You can compact these files and remove so called ‘white space’ to get a boost in website performance.
There are plugins in the WordPress repo with tens of thousands of active installs and great reviews that offer this service. It has also been noted that there are inherent risks involved in doing this. Do your due diligence before going this route and be sure to make a backup of your files beforehand. A good backup is the golden parachute of many an experiment!
11) Gzip Compression
Gzip compression has the potential to greatly reduce bandwidth usage by compressing webpages and style sheets before sending them to the browser of the user requesting your website. The drawback to it is that it takes some technical finagling to pull off as it’s something that has to be done at the server level. The setup steps are different depending on whether your server is IIS or Apache, but most likely you’re looking at some simple .htaccess edits. It’s something to try if you’ve made a good backup recently (back all the things up always!!).
That’s a wrap. There is no doubt more that you could get into for optimization, but we’re already veering into the more technical with the last couple steps of this article and well, we have to stop somewhere. That said, any and all of these steps will help considerably to speed up WordPress. I hope you find this guide helpful, and if there’s anything more you’d like to hear about or if you have anything you’d like to add, please feel free to do so in the comments below. I’d love to hear what’s on your mind. Thanks for reading and happy blogging!
Leave a Reply