Prepare yourself, friend – you’ve just stumbled into the site speed motherlode.
This massive cache of 100+ tips, tools and tactics will help you make your WordPress site load faster. Without major nerdery.
Don’t fret about the ridiculous size of the list. Pick one category (or one tip) and go kick some slow-site butt. Website speed isn’t an all or nothing thing – everything you do adds up.
Let’s get to it.
Table of Contents
Heads up: Throughout this post we mention tools and services we use ourselves and in our work for clients. We’ll provide links to all in the Resources section at the end of this post. Links in the post itself are to articles we recommend you read.
First principles
The smaller the thing, the quicker the load.
We’re talking file size, friend (although when something’s visually smaller, chances are its file size is smaller, too). Whether you’re loading pages, images, scripts, styles or all of the above, smaller size equals greater speed.
Fewer things = faster load time.
Pages or posts that use fewer resources (e.g., images, scripts, style sheets) load more quickly than those that depend on many.
See what’s loading into your pages. If it’s a lot, begin working to pare down plugins, consider switching to a more lightweight theme and, if you use a page builder, consider moving your content out of the builder and using WordPress on its own.
Well-equipped servers deliver content faster.
The most popular web hosts tend to be those whose servers are under-equipped and/or overloaded. Want a quick speed win without redoing your website? Get better hosting.
The closer to the visitor, the shorter the wait.
Pages, posts and resources load more quickly when they’re nearer to visitors.
This principle can (and should!) apply to site speed in a few ways: caching, your web hosting server, CDNs or content loaded from outside your site. We’ll mention all in more detail throughout this post.
Be careful who you trust for website advice.
As easy as it is to make speed-killing mistakes when you’re just starting out, the worst problems we see are less often self-inflicted than they are a result of following advice from blogs with more affiliate links than actual expertise.
If you feel tech challenged, find and bookmark trustworthy, relatable resources now (before you’re desperate to solve a problem). We’ve got suggestions.
General best practices for faster-loading images
Use the smallest image dimensions possible.
The number one rule of speed is that smaller things load more quickly than larger things. Sometimes you’ll need larger images to show detail. But often, all you need is a little visual interest. This is especially true of featured image thumbnails shown on home or blog pages.
Include only images that add value.
Among all the slow sites we’re asked to look at, images are by far the most prevalent problem. The file size and load time of an image is much greater than text.
You could write more than 8,000 words and still not match the file size of the optimized JPEG in our example below. So make sure you never include an image that doesn’t add value for your visitors.
Make sure images are actually as small as you think they are.
Often we find slow sites loading full-size images into Featured or Recent Posts sections. Check to make sure you’re only loading a small thumbnail.
Also, know that “resizing” an image in the WordPress editor only changes the size it appears. Not its actual size. Clicking one of the % buttons under Image Size or dragging the image’s resize handles does nothing to change the number of pixels loaded.
Quick speed wins almost always start with the Media Library
Banish mega-big images.
Figure out the maximum possible width for your site’s images. Resize any Media Library images that are larger so you don’t load wasted pixels into your pages. ShortPixel’s Bulk Optimize makes this easy.
Change your WordPress thumbnail settings to match that max width, too. Go to Settings > Media and change the Max Width for the Large size to this value.
Compress Media Library images.
The right compression tool saves 30-60% or more on file size, without a noticeable loss in quality. The wrong image compression tools don’t help as much.
This is another task for ShortPixel’s Bulk Optimizer. We like ShortPixel because it’s easy to use, compresses better than most image optimization plugins, it’s inexpensive, and it won’t put a strain on your server.
Don’t forget the thumbnails.
Tempted to skip optimizing thumbnail images? Don’t. With WordPress, thumbnails are often much larger and used more frequently than the word “thumbnail” suggests. A more accurate label for them would be “additional sizes.”
WordPress creates three sizes on upload; your theme and plugins create more. Most images used throughout the average WordPress site are thumbnails.
Don’t waste your time with free image optimization plugins.
They just don’t work as well as premium options currently out there. We’ve found that paying for the pro version of a free optimization plugin costs more than using our recommended solution (ShortPixel) in the first place. But doesn’t deliver better results.
If you have time on your hands, go to ShortPixel.com and drop your images into their free online optimizer, download the optimized versions, then upload them to your Media Library.
Choosing the best image format for the job
Use PNG only for images with few colors.
The PNG format is ideal for logos with limited colors and transparent backgrounds. Images with many colors – photos, for example – will look great. But file sizes will be ridiculous.
Don’t use PNG for anything that contains photos, even if it also contains text.
Serve images in WebP format where it makes sense.
Why use WebP? Done correctly they’re faster than any other format, with no detectable loss of quality. The trouble is, creating them takes extra steps and not all browsers support WebP so you have to provide fallbacks in the code (not convenient).
ShortPixel’s Image Optimizer and Adaptive Images plugins make it easy to create and use WebP – just tick a box.
Avoid animated GIFs.
GIF is another format that, like PNG, isn’t great for photos. But, they enable animation without a video player. That can come in handy, but it also comes at a price.
One or two small GIF animations won’t explode your entire site, but just be aware that their file sizes are probably a lot larger than you think.
Instead of text images, try text styled with CSS.
This is styled text. Not an image.
You might think you need fancy header graphics or image buttons. But chances are good that (unless you’re doing something really tacky that requires a ton of code) you can save on file size by using text and CSS instead of an image.
With a good online generator, you don’t necessarily need to learn HTML and CSS to be able to take advantage of it.
Automate image optimization
Convert PNGs to JPEGs.
ShortPixel will do this for you automatically on upload or during Bulk Optimization. Just tick the “Convert PNG images to JPEG” box found in Settings > ShortPixel > Advanced. They’re smart about it, though. Conversion only happens if it would result in file size savings.
Use an adaptive images plugin.
With adaptive images, correctly sized images are automatically served whether your visitors are on mobile, a tablet or a desktop computer. We use and recommend ShortPixel’s Adaptive Images (SPAI) plugin.
If you use ShortPixel’s SPAI plugin, also set up image resizing.
This is because SPAI doesn’t affect images on your server. Without something to keep uploads in check your server space will fill up quickly. ShortPixel’s free Resize Image After Upload plugin works fine for this.
How to ensure content loads as fast as possible
Limit the number of featured posts displayed.
Too many choices not only overwhelm your visitors – they force visitors’ browsers to work longer and harder to load all those extra options. Limiting post “teasers” helps the pages and posts they’re on load more quickly – especially if the content featured also includes images.
Thoughtful selection of only a handful of the most relevant posts makes it easier for visitors to find content they need, with fewer distractions along the way.
Display excerpts instead of full post content.
Full post content = greater page size = longer loading time. Plus, the longer text means visitors have to scroll more to get past posts they’re not interested in to (hopefully) get to something more relevant.
Excerpts – especially hand-crafted ones – help visitors more easily skim your content and dive into just what’s relevant to them.
Lazy load images.
Even your mom knows what lazy loading is, so we won’t explain it. The simplest way to make it work is with a plugin you already use, like WP Rocket, Autoptimize, or ShortPixel Adaptive Images.
Lazy load video.
The same lazy load tactic that works with images is also good for video. Tick a box in WP Rocket if you use that plugin, or install WP Rocket’s free standalone Lazy Load plugin.
Ensure your pages are free of 404 errors.
Not all 404 errors throw out conspicuous Page Not Found messages. Sometimes the missing thing is an image, script or other file included in the code. Visitors’ browsers waste time trying to load it, unnecessarily inflating your load time.
Dr. Link Check (freemium) checks your site for 404 errors in a way that shouldn’t overwhelm your server or slow your site.
Use the file upload method to verify your site.
People freak out about uploading files to verify a site for Google, Pinterest, etc. Or, we’re lazy and don’t want to open (um, or install?) an FTP app to upload files.
But this is a better way to do site verification than sticking a meta tag or other crap on every page. Or installing a plugin. Impact on speed is about three nanoseconds, but hey – every little bit helps. And oh, OK, you can do it without FTP already.
What to look for in a WordPress theme
Build on a lightweight well-coded, minimalistic theme.
Complex design and fancy-looking features seem attractive when you’re theme shopping. But when you visit a site with all.the.things , it’s distracting. Not attractive. Your content becomes a boring background element.
Instead, choose something plain vanilla that will make your content pop and your pages load fast. Look for theme shops with a track record of clean code and fast performance. We use and recommend StudioPress Genesis themes (but only those actually produced by StudioPress).
We’ve also heard good things about GeneratePress, but haven’t yet tried their theme ourselves.
Start with a mobile-first theme design.
Pick one of the latest StudioPress or GeneratePress themes and you’ll be good to go, with a site that adapts to whatever device your visitor happens to use.
Avoid tacking on page builder assets that either don’t respond or for which you’ll need a whole ‘nother layer of CSS and scripts before it’s usable on mobile. A plugin can help provide better mobile options. Themes that need them most, though, are often the least cooperative.
Replace your theme’s complicated home page with something simpler.
Even the best WordPress themes can leave you trying to force your content into a layout that’s just not right for it. Equally bad is that home page templates often have far too many content areas. We wind up sticking in something – anything – just to fill them.
Instead, create a new Home page using Gutenberg blocks. Then, in your WordPress settings, designate that page as Home. Boom! – New home page, no theme change required.
Avoid page builders.
Divi, Elementor, WP Bakery, Beaver Builder – there are better and worse page builders, for sure. But all page builders add to load time. They simply must add additional scripts and stylesheets to work the way they do.
On top of that, trying to get fancy with them and throw in all.the.things adds even more complexity and loading time. We’ll talk more about that in a sec.
Related: We love PagePipe founder Steve Teare’s ranty response about which lightweight theme to use with a page builder. You go, Steve.
Fonts, icon fonts & font overload
Be a font minimalist.
When picking fonts from Google Fonts, you might throw in all the different variations of every font you choose, just in case.
What you may not realize is that every single style loads a separate file into the page that calls it. And, each font family (e.g., Inter, Raleway, Comic Sans…j/k) needs its own file for every style you want to use.
Two fonts…or maybe three?…bold and italic for each…what about bold italic? At about a half second to load each font, style and file, it’s really easy to slow your site with Google fonts. Make sure you load only what you need.
Avoid themes with many custom fonts.
See the next tip for more on why this is a big deal, and steer clear of themes that use more than a couple of font families and/or numerous styles. Alternatively, just choose a theme that uses system fonts.
Don’t buy a theme that loads CSS or fonts with @import.
When a theme is coded like this, the file that has @import in it has to wait for the file or files being brought in with @import before the whole combo can finish loading. Normally more than one file can be loading at once, but @import prevents this, slowing page load times.
To avoid @import, stick to themes developed by well-established theme developers who use modern coding standards.
Choose a theme that already has fonts you like.
Like a theme but want to change its fonts? Doing it the right way is a hassle. That’s why most people look for an easy route (pasting in extra code, or turning to a plugin).
The “easy” way is still a pain in the rear. And, unless you go back and do some of the same things you’d do if you were doing it the right way, loads any original fonts and font styles, on top of the new ones. Best to avoid a theme if you don’t love the fonts.
Try system fonts.
Using fonts visitors already have on their systems (i.e., computers and other devices) means their browsers don’t have to load extra files to display your text. It makes your pages load more quickly – especially if you’re using multiple font faces and styles.
If you use system fonts, you have to be OK with your site looking slightly different on each device. This paragraph is an example of how our text would look if we switched to system fonts.
Most popular WordPress themes aren’t built to take advantage of system fonts, but all well-coded themes include fallback fonts in case a custom font can’t be loaded. For a quick and dirty way to switch from Google Fonts to system fonts, use Perfmatters. Or, be good and switch fonts the right way.
Avoid icon fonts and libraries.
You may be unknowingly loading these into every page of your site, if the people who developed your theme or plugins thought they were a good idea. Heck, even WordPress itself loads a set (although you can remove them with Perfmatters).
Performance-wise, the trouble with icon fonts/libraries is that they’re almost always loaded from somewhere across the web, and they always include a crapton more icons than are actually used in the theme. Plus, icon fonts bork screen readers.
You could do a bunch of work to round up images for any actually-used icons, then pack them into a CSS sprite. But honestly, we hope you have better things to do.
Page layout for performance (KISS)
Avoid overly complex layouts as much as possible.
We get it – you’re not a coder. However, we cannot stress enough how often non-coders slow their load times by building ridiculously complex layouts.
You don’t have to understand code to appreciate that it’s there, trying to do your bidding. And, you don’t have to overcompensate for newbieness by going to town with blocks inside of blocks inside of blocks, propped up by more blocks. Less is more.
If you need a more-complex layout, try Gutenberg blocks.
With Gutenberg and a decent block set (we use and recommend Stackable Premium), you can handle anything and everything you need to pull off good design – without a bulky page builder.
You could also build a tacky, slow-loading disaster if you go crazy and add all.the.blocks and effects. Keep it classy.
Avoid builder-ish plugins.
Like page builders, builder plugins of any kind (e.g., grid builders, table builders) need extra scripts and stylesheets to work. Be sure a grid is truly the solution you need and that it is the best way for visitors to view the content you want to display.
If you really do need a grid, instead of a plugin, try tweaking Chris Coyier’s grid to suit. Then paste the HTML and CSS into a Gutenberg HTML block.
Regular ol’ HTML/CSS grid.
Avoid animations or fancy transitions.
Carefully consider the actual value of any animations or transitions you include in your pages. We see more of this stuff these days because developers of page builders and fancy themes throw them in to catch the eye of newbie theme shoppers who want to look more slick than they feel.
Animations and transitions require more-complex (and therefore slower) scripting or code than simple pages. And, it’s worth noting that simple design never seems to go out of style.
Use CSS background colors instead of background images.
We use this tactic all over the A Fearless Venture website. Even if you don’t want to mess with CSS, many Gutenberg blocks allow you to set a background color.
Color adds visual interest and a little CSS instead of a giant background image. Plus, without large background images around, you can set a much smaller max width for images (saving disk space and loading time). ICYMI, we talked earlier about how to set up a max width.
How to use plugins without killing your speed
Use only plugins that add value for both you and your visitors.
If you ask Google whether or not plugins slow your site, you can find anecdotal evidence supporting pretty much whatever you want to believe.
Here’s the no-BS truth: 1) The number of plugins does matter; 2) The type and quality matter even more. You need a deliberate approach to plugins.
Instead of asking Google (or your blogging buddies) about plugins, ask yourself: What problem does this plugin solve for me? How will it affect my website performance? Is there enough upside for my visitors and business that it’s worth the downside?
Minimize use of plugins or scripts that rely on resources from outside your site.
It’s so easy to create a site that’s much slower than it needs to be.
You think you’ve installed one thing on your website, but that thing loads in more resources from somewhere else on the internet. On top of the time to load the first thing, it takes more time for visitors’ browsers to go out onto the web to fetch additional things.
The more of these external (a.k.a. third-party) resources, the slower the load time. Not sure what your site loads from the outside? Find out.
Completely avoiding external resources often isn’t a realistic option, since some key services (e.g., Analytics) rely on them. Just make sure everything you do add provides enough value to you and your audience to justify the extra load time.
Deactivate plugins you’re not actively using.
If you use a plugin frequently enough to keep it around, but it’s not something you need 24/7 or your site won’t work, deactivate it. The plugin’s tables (and therefore settings) will still occupy space in your database. However, the plugin files won’t be loaded.
Fewer files loaded = faster loading time. Do keep even inactive plugins updated. Hackers, crackers and bots constantly probe for outdated plugins, and yes – unfortunately they can find inactive ones.
Deactivate and delete plugins used for one-time tasks.
Done with that thumbnail resizer? Delete. Finished doing a find and replace? Delete. The fewer plugins you have installed, the smaller your database will be. Smaller = faster.
The plugin world’s problem children
Avoid tracking scripts, services or plugins as much as possible.
Used with intention, tracking can provide insight to help guide decisions about your website and business.
Often, though, it unreasonably slows our websites, creeps on our visitors, delivers our data and theirs to giant companies, and gives us information we’re not sure if or how we should use. And, tracking is just as likely to lose you money as it is to help you make it.
Avoid plugins that demand a high level of resources to work.
Some plugins, just by nature of the jobs they do, will make your server struggle, your visitors’ browsers choke, or both. Be intentional about any features or functionality you add to your site, and if you’re tempted to use (or are already using) a high-CPU plugin, find an alternative.
Avoid dynamic related posts plugins.
Most related post plugins slow your site, because every time a visitor hits a post, they try to determine what’s related before displaying it on the page. This trashes loading times and servers. Many hosting companies ban related posts plugins outright.
We’ve found only one related posts plugin that works in a way that doesn’t add much to loading time (we use it on our site). But we found the CSS a little buggy when we used it for a client, so consider this a suggestion. Not a ringing endorsement.
Avoid social media feed widgets and plugins.
These buggers slow your site like crazy, because they disregard the advice about avoiding external resources. We surmise that the number of people using these widgets and plugins is high, but the priority with which Facebook, Instagram, Twitter, Pinterest, etc., deliver the required resources is very, very low.
If that ain’t enough to deter you, think about whether you really want to send traffic away to someone else’s platform. No, friend – you don’t.
Don’t use your e-mail service provider’s signup form plugins or widgets.
Every single ESP-created e-mail signup we’ve run across is an absolute dog on load times. Fortunately, there are other ways to get subscribers onto your list.
Our forms solution (Gravity Forms) integrates with ConvertKit (our ESP), so any form can be an opt-in – and take care of other tasks. At the same time, with the same form.
If your forms solution doesn’t integrate with your ESP and you don’t want to switch, copy/paste the embed code (ask your ESP where to find this) into an HTML block. It’s way better than installing a plugin that loads on every page in your site, and has to go out to the web for resources.
Reconsider plugins or scripts for pop-up or fly-in signup forms.
These guys require scripting that’s by nature heavy, to say nothing of potentially annoying more visitors than they convert.
We get that signups are crucial for entrepreneurial website owners. Instead of slick, animated opt-in boxes, we suggest careful placement of static forms. If that’s not enough, try WP Darko’s Top Bar.
Don’t use sliders or carousels.
Even the best options for sliders, carousels and similar content elements need a heavy set of scripts and styles to work.
If this was the optimal way to present your content to your visitors and the only “heavy” item on your site, you could justify it. But it’s not.
Avoid fancy/complex gallery plugins.
Like sliders and carousels, fancy gallery plugins need fancy scripting and styles. It’s just the nature of the task.
Almost none of the people using these plugins actually need them. If you think you might, check out WP Featherlight instead.
Avoid most social sharing plugins.
Social sharing plugins slow sites more or less, depending on external resources they load and whether they offer a slew of features or are more focused.
If you have data that clearly indicates social sharing benefits your specific site, and you don’t want to rely on visitors sharing with simple browser tools, go lightweight (we hear Social Pug is good) and only activate options you need and use.
Don’t fix mixed content with a plugin.
If you started your site using http and have since switched to https, your older posts and pages may still try to load content using http. When you “fix” it with a plugin, you add a little lag every time the database essentially says “Oh – actually you want https.”
Since most people don’t look at code, they don’t usually realize how often this happens. If you really, truly have SSL correctly set up on your site, you can use a find and replace plugin to change your http URLs.
Plugin bad boys
(or girls…they could definitely be girls)
Avoid Automattic’s Jetpack plugin.
And that’s all we have to say about that.
If you use Jetpack anyway, disable modules you don’t need.
Use our recommendations and instructions to help you work through what each module does and decide what to disable. 9/10 you do not need Beautiful Math. Jeebus.
Avoid Contact Form 7.
Contact Form 7 is easily the most popular forms plugin available for WordPress (its long history and free price tag help). But among WordPress pros it’s a known speed killer, and is routinely featured on “XX plugins that slow your site” lists.
If you just need a free, simple, lightweight contact form plugin, WP Forms Lite will do the trick. When you need more robust features, turn to Gravity Forms.
Avoid the Broken Link Checker plugin.
This plugin runs in the background, scanning your site and alerting you to broken links. As you might imagine, all this work comes at a price. It taxes your server’s resources and loads up your database, slowing your site.
It’s best to use an off-site broken link checker to check your site. Our site audit and management tools let us keep an eye on that, but we’ve heard good things about Dr. Link Check.
What to do when a resource-hungry plugin is a must
If you need a resource-heavy feature, choose the lightest possible option.
Check out Jonathan Sulo’s video below for suggestions, and read his blog post for more info.
Host Google Analytics scripts locally.
Google Analytics adds only a couple of scripts and about 50k to our pages. But that relatively small payload adds a third to a half second or more to page load time, depending on how busy Google’s server is.
The scripts are loaded in the best way possible (asynchronously, i.e., while other resources are loading), but still – even asynchronous requests add up. Hosting locally shaves off the time you’d normally spend waiting on Google, and is an easy and non-technical win if you have WP Rocket or Perfmatters.
Host the Facebook Pixel locally.
The Facebook Pixel adds less in file size than Google Analytics scripts, but the wait on Facebook’s server is worse.
We realize this is totally anecdotal evidence (sorry), and we’d give you load time stats if we had ‘em. But we don’t, because we are loading our pixel from afearlessventure.com. Not Facebook. As are any of our optimization clients who use the Pixel. This is another complicated thing made easy by WP Rocket; just tick a box.
If you need something on one or two pages, don’t load it everywhere.
In some situations, a “heavy” plugin is the best option. But you probably don’t need its resources on every page in your site. The non-nerd way to control what loads is with a plugin that gives you an easy interface for turning them off and on.
This is another thing we use Perfmatters for. Plugin Organizer also enables you to turn off plugins selectively. It’s not as easy to use as Perfmatters, but it’s free.
Don’t use an e-commerce solution to take a few payments.
Most people who need to take payments on their sites automatically reach for the 800-pound gorilla of e-commerce solutions, WooCommerce. One reason is that the core plugin is free (although building actually workable e-commerce with Woo isn’t).
While there are better and worse ways to run WooCommerce, all slow your site to some extent. So if you only need to take payments for just a handful of things, consider alternatives like SendOwl or Gumroad for products, or Gravity Forms for services and downloads.
Consider using Shopify instead of hosting e-commerce on your own.
We love WordPress. It’s democratized the web so even little guys can build awesome online businesses. But we’ll be honest with you: WordPress is not the best for e-commerce – especially when we’re talking about WooCommerce and the amount of time and money most people can invest in e-commerce.
Even though Shopify seems a lot more expensive than “free” WooCommerce, the truth is that Shopify’s ~$30/mo subscription will probably give you more, cost less and entail less work than Woo.
If you do use WooCommerce, take steps to optimize it.
Use quality web hosting that offers enough resources to power an e-commerce site (i.e., not cheap shared hosting). Disable cart fragments except on shop pages, and keep WooCommerce stylesheets from loading except on shop pages.
Turn off Woo scripts everywhere except shop, checkout and cart pages. Perfmatters offers one-click fixes for all of these recommended steps (there are free plugins that do some of these things, but they aren’t well rated).
How to make sure your URL doesn’t send visitors the long way
Choose a single URL for your site and use it consistently.
You started with http://www.yourawesomesite.com. Suddenly, it wasn’t cool to use ‘www,’ so you dropped it. Then, browsers started showing everyone scary messages when they tried to come to your site. So…you switched to https.
You try to be consistent, but hey – that’s what redirects are for, right? Except…every redirect adds a little time. Best to send folks (and Google) to https://yourawesomesite.com. Period.
Limit your domain’s URL redirects to one.
Check your preferred URL to make sure you haven’t added in any extra steps. Every possible permutation of your URL you don’t use should go to your preferred URL in one step.
For example, if your site is served via https and you do not use the ‘www’ prefix, you’ll want http://yoursite.com, http://www.yoursite.com, and https://www.yoursite.com to each go straight to https://yoursite.com.
How to get a speed-boosting server and CDN setup
Choose a host with a good reputation.
Hosting is such a boring topic when everything’s going OK. We hate to be the harbingers of doom, but if you use a host with a bad rap it will catch up with you.
If you’re serious about your web-centric endeavors, don’t build on a shaky foundation. Or, if you already have, move before it crumbles beneath you.
Use managed WordPress hosting.
While not all managed hosting is the same, in general it provides more resources, protection from bad neighbor websites, and better security than regular shared hosting. Even if they offer a managed hosting plan, we still recommend avoiding hosting giants (e.g., Bluehost, GoDaddy, Hostgator, anything else EIG-owned).
We have not been impressed with their knowledge, service or options when compared with hosts like Lightning Base, Kinsta or WP Engine (whose business plans don’t rely on packing hundreds of $3/month sites onto each server).
Choose a web host with servers nearest your audience.
Check where visitors come from by going to Google Analytics > Audience > Geo > Location. Change the date range to get a good representative sample. Choose City from the Primary Dimension options just below the map.
New York, Chicago and Atlanta are top cities for our visitors; the US is our top country. Our host offers servers in the central US, the Netherlands, Singapore and Sydney, Australia; we choose central US.
Use PHP 7.3+.
The latest PHP versions make your site safer and faster than earlier ones. Plus, keeping PHP up to date reduces the chances of plugin issues (assuming you don’t use old or poorly coded plugins).
Most of the time upgrading is only a matter of asking your host to switch versions for you. However, if you have any outdated themes or plugins in your site, be prepared for incompatibility issues.
Upgrade before maxing out your hosting plan’s resources.
When you’re approaching the limits of your hosting plan’s allotted page views, bandwidth or storage space, don’t wait until they shut you down before worrying about a plan that actually covers what you need.
We’ve noticed with budget hosts that hitting or even approaching quotas can slow a site. Most likely this is indirect effect of some process or another that can’t run, but slow is slow. Visitors don’t care why.
Get your site on a good CDN.
This, apparently, does not mean free Cloudflare (although in our opinion free Cloudflare is better than no CDN at all).
A CDN puts your content nearer to your visitors (an important first principle), shortening the time it takes for your site to begin loading into their browser. Cloudflare setup is fairly simple.
Set up a custom CDN to work with your adaptive images.
Even though ShortPixel’s adaptive images CDN is fast, it’s not as fast as your custom CDN. This is easier than you think if you already have a CDN set up; find instructions here.
Backups = insurance. Smart backups preserve performance.
Use a backup solution that backs up only what’s changed
The most popular backup solutions are a) free and b) back up in one big, giant hulk of a file. That means they sometimes crap out before they can create a usable backup file. It also means they place a heavy load on your server, potentially slowing your site for visitors.
Incremental or smart backups, on the other hand, only save what’s changed. That means backups are much smaller and completed with minimal impact on your server. We don’t know of any free smart backup solutions, but our Site Care is reasonably priced and offers more than backups.
Schedule backups during low-traffic hours.
Backups need server resources to run. Even if you’re running the kind of low-impact backups we recommend, it just makes sense to run them in the middle of the night (or whenever your traffic is lowest).
Backups are important, but they shouldn’t impact load time or visitors.
Don’t store backups in your hosting space.
Aside from the fact that a backup on your server is completely useless when the same malware, hacker or server glitch that takes your website down also nukes your backup, storing backups alongside your website is a bad idea.
Backups are big, huge hulking files that eat up disk space. Maxing out disk quota can directly or indirectly affect performance, depending on your specific setup.
Roll out the welcome mat with caching
Use page caching.
Back in the day, we built pages one by one with HTML. Each contained most or all of the code (technically speaking, “markup”) in one file that showed the same content to everyone. To include different content or make a small change sitewide, we had to change every file in the site.
Now, WordPress makes changes and dynamic content super easy. It gathers things that repeat across the site (e.g., menus, your header or footer) and puts them together fresh for every visitor – whether anything’s actually changed or not.
It’s a lot of work. Page caching helps by saving the assembled copy and serving it up when nothing’s changed. Many performance-focused web hosts include it. If it’s not an option with your host, WP Rocket is the simplest way to pull off page caching.
Leverage browser caching.
When someone visits a particular URL on your site, their browser saves copies of any resources loaded into the page or post at that URL. Browser caching doesn’t actually do anything to the files on your server, but it can help your site load faster for people visiting (or revisiting) any pages that load in the same resources.
You can help browser caching work better by specifying how long any given resource ought to be kept in visitors’ browser cache. A quality web host likely handles some of this; check with yours to see what they’ve got. WP Rocket is a simple browser caching option that works for most situations.
Take the fluff out of your site’s code
Minify HTML, CSS and JavaScript.
Neatly formatted code is best when creating or editing it, but it adds a lot of extra space that browsers don’t need. Minifying HTML, CSS and JavaScript removes the extra space and can cut file size in half.
There’s no real downside to employing this tactic, as long as you’re running only a well-coded theme and plugins. Autoptimize (free) makes minification easy, but if you have WP Rocket, stick with that for minification and additional optimization features.
Try combining files.
We say “try,” because (for us) the majority of the time there’s a glitch that screws something up when you try mashing all your CSS or JavaScript together. There’s a certain order things must be loaded, and that undoubtedly factors in. Most of the time we’re not working with the kind of timeline or budget that allows for fine-grained load order fiddling.
Even though all the speed tests scream at you to combine files, it’s not a panacea. One giant file is not always better than several smaller ones. But if you want to try combining files and see what you get, both Autoptimize and WP Rocket will help you out.
Use GZIP compression.
GZIP can cut your file size in half or more. It should be enabled on your hosting server. If not, you can enable GZIP yourself if you’re comfortable editing your .htaccess file. Or, let WP Rocket do it for you.
Easy ways to help out your server & database
Disable (or limit) post revisions saved by WordPress.
Every time you save or update a post or page, another revision gets added to your WordPress database. The longer your site is in operation and the more posts you have, the more these revisions accumulate.
It’s good to have a few revisions just in case, which is why we prefer using Perfmatters to control revisions (you can use WP Rocket, but with that plugin, it’s all or nothing).
Log out of WordPress unless you’re actively working on your site.
When you leave a window or tab open to work on your latest post off and on throughout the day (or, if we’re being honest, the week, right?), WordPress autosaves your work every minute. Like post revisions, this adds up and junks up your database.
You can use Perfmatters to control how often autosaves happen. While that will help, it’s even better to log out of WordPress before walking away.
Remove unused database tables.
Well-behaved plugins and themes clean up after themselves, and remove their related tables from your WordPress database when you delete them. Too bad we don’t always install well-behaved plugins and themes.
The “proper” way to remove unneeded tables scares most people and can break your site. A simpler way – Plugins Garbage Collector – does a good enough job. But you can still break your site with it. Brad Dalton over at WP Sites has a more detailed write-up on cleaning up leftover database tables.
Schedule regular database cleanups.
The longer your site is in operation and the more things you have in it, the more junk builds up in your database. Post revisions. Auto saves. Spam comments. Cracker crumbs. (j/k)
There are several ways to clean up your database, but we find that setting up automatic cleanup on a schedule is the best way to keep things humming along without making you crazy. WP Rocket will help you out here.
Reduce or disable WordPress Heartbeat.
At its best, the WordPress Heartbeat (a.k.a. admin-ajax.php) helps keep you from losing posts to glitches while editing. At its worst, it’s a speed sucker employed by other, overzealous plugins.
You can help reduce the Heartbeat behavior by logging out unless you’re actively editing posts. If you already do this and your site is still slow, find out if your site’s admin-ajax.php use is too high. You can install WP Rocket or its standalone Heartbeat Control plugin to help. But if a particular plugin is causing it, find a better alternative.
Delete unused themes.
Purging unused themes can free up hella disk space in your hosting account. It also removes potential hacking targets. And, every theme you delete means that much less crap for your database to deal with. Less crap = faster database.
One exception: Hang on to the most recent official WordPress theme. It can help you troubleshoot issues that might be theme-related.
Disable WordPress emojis.
Sure, it’s not a huge file. But is it really worth the additional resource request and file load just to change this: 🙂 into a shiny, yellow happy face? Up to you, friend.
We’re not grouchy people, but we say no to WordPress emojis on our site. One click in Perfmatters, WP Rocket or Autoptimize and you can do the same. Not sure we’d install a separate plugin just to disable emojis, but it’s an option.
How to keep comments from blowing up your database
Disable trackbacks and self-pingbacks.
When these come from your own internal linking, it’s annoying. When they don’t, they’re usually spammy or at least scammy. In any case, they’re more junk in your WordPress database. Junky database = junky page speed.
Turn off trackbacks and pingbacks by going to Settings > Discussion and deselecting the first two checkboxes under Default article settings near the top of the page.
Use a lightweight anti-spam solution.
We’ve found that AntiSpam Bee is more lightweight than Akismet, and edges it out slightly in the spam-catching department.
We used AntiSpam Bee until spammers and scammers started hitting our contact and intake forms. Now, CleanTalk AntiSpam protects our site’s comments and forms from abuse.
Regularly purge spam/scam comments.
You shouldn’t have much if you’re using a good anti-spam solution, but a few here and a few there and next thing you know your database is full of ’em.
It’s easy to purge these manually from the WordPress dashboard. But it’s even easier to let WP Rocket handle it as part of its automatic database cleanup feature.
Avoid ‘heavy’ commenting systems like Disqus.
If you’re looking for something with better features than WordPress’s built-in comments, try WP Discuz. It also happens to be more lightweight than either Disqus or the inbuilt comments.
Disable Gravatars.
Gravatars can offer a friendly touch to your site’s comments section. But the more active your comments are, the more Gravatars can slow your site.
Their file sizes aren’t as a big an issue as the fact that visitors’ browsers have to go elsewhere on the web to fetch each Gravatar. When there are a lot of comments, page load crawls.
Turn off Gravatars by going to Settings > Discussion and scrolling down to Avatars. Deselect the Show Avatars option, then click the Save Changes button at the bottom of the page.
Disable comments completely if you don’t use them.
You can escape the spambots and speed up your site when you turn off commenting. However, turning comments off in WordPress’s Discussion settings won’t affect existing posts.
The simplest way to disable comments for the entire site, including existing posts, is with the Disable Comments plugin.
These scripts and bots drain server resources
Block bad bots and bad actors.
Some bots (Google’s, for example) serve a legitimate purpose. Others are questionable but not harmful (although you may want to filter them from your website analytics).
Then, there are the true cretins of the internet who’ll repeatedly hit your site and siphon away resources and speed. Block those suckers with CleanTalk Site Security or Wordfence.
Do not enable Wordfence’s Live Traffic reporting feature.
There are legitimate uses for occasionally monitoring live traffic with Wordfence. However, most of the time it’s simply entertainment for WordPress site owners to watch visitors move through their sites.
Live Traffic is a high-CPU feature that’ll drag your site down. Wordfence stopped enabling it by default (thank goodness), but if you use Wordfence you should make sure Live Traffic is indeed turned off.
Tips for running ads with lower impact on site speed
Reconsider ads that load content from outside your site.
Ad networks and ad embed scripts slow your site because of the content loaded in. And because they have to make trips out to the web to fetch the content. They’re an easy way to monetize a blog, but they’re not the best or only way to make money blogging.
If you use ads, go with a network that loads ads asynchronously (i.e., at the same time as your content instead of blocking its loading). Any quality ad network should do this, but ask before signing up. All ads slow your site. Poorly-coded ads will really drag it down.
If your site is monetized with external ads, limit the number of ads loaded.
Mediavine and Monumetric are two ad networks that offer bloggers a lot of control over ad placement. Limiting ads makes for better load times – and happier visitors.
Ditch Amazon product widgets.
If product recommendations earn you a significant enough amount of money that they’re worth keeping, consider bringing the content into your site.
Upload product images to your WordPress Media Library. Grab your affiliate links from Amazon. Then link each product image to Amazon using its affiliate link. It’s only a little work, but getting rid of the trips out to Amazon’s servers could shave a second or more off load time.
Reconsider Mediavine Video Player ads.
Mediavine’s player is lazy loaded so it is less bad than it used to be. However, it adds multiple requests and bumps up total page size. It also blocks other content, making for poor user experience.
Optimize Mediavine ads for mobile users.
All you need to do to pull this off is tick a box. When you do that, Mediavine won’t load ads until your visitor starts interacting with your page. It’ll allow all your content to load up more quickly, so visitors don’t get frustrated and leave.
On a site that’s otherwise well optimized, the improvement is likely to help rather than hurt impressions and revenue.
Consider optimizing Mediavine ads for desktop page speed.
When you select this option, Mediavine won’t load ads in the first screen. It’ll also wait to load anything at all until it detects the visitor interacting with the page.
If speed and user experience are your priority, this is the way to run Mediavine. It may, however, impact ad revenue.
Hit reset & start over with a clean WordPress install
If your WordPress site has been up for more than a couple of years, or you’ve added plugins or themes that weren’t always the best, it may be a good idea to start fresh. WordPress has options to export your current site’s pages, posts and media, while leaving behind its junky database.
Start your new site on a good host, with a good theme, and only carefully chosen plugins. Then import your pages, posts and media. You’ll have a zippy new site, with all your content.
Resources for faster WordPress
Before you even start trying to optimize your site, there are four must-know speed basics to get the best results with the fewest headaches. Get your head around these ideas simply and painlessly here: Watch Teresa’s WordCamp talk.
ShortPixel Image Optimization*
Perfmatters Performance Plugin*
Plugin Organizer Selective Plugin Loading
WP Rocket Caching & Performance*
CleanTalk Anti-Spam & WordPress Security*
AntiSpam Bee Comment Spam Prevention
Lightning Base Managed WordPress Hosting*
Did we miss anything?
Leave a comment below and let us know if you have questions. Or if you’re a WordPress speed freak (hi, friend!) and want to point out something we missed or got wrong.
Pin this bad boy
Some of the recommendations in this post include affiliate links. Here’s why.
Every day we research, test and work with numerous products and services that help us (or our clients) successfully run WordPress websites and blogs.
It’s work we don’t actually charge anyone for, and it often takes a considerable amount of time. Many of the companies whose products or services we choose use part of their marketing budget for affiliate programs designed to encourage people like us to spread the word.
Even if you don’t work with us directly, you can benefit from and support the solid advice we work hard to provide. Purchasing a product or service using one of our affiliate links may pay us a small commission, without increasing your cost.
We stand behind our recommendations and think you should use products/services we suggest whether or not you use our links.