Today I had the honor and privilege of presenting at WordCamp San Diego, 2016.
I’m thrilled with the feedback that I’ve received on my talk thus far. A huge thank you goes out not just all of you who watched me speak, but to the organizers of the event who worked hard to ensure that it was an epic success.
Here are the major bullet points that were covered:
Test your Speed
Use online tools like Google PageSpeed Insights, Pingdom, or GTmetrix to measure your website’s speed. Check your speed often as you apply optimization enhancements to your site. Don’t become obsessed with a perfect score. It’s not worth it!
These tests will give you tons of information, and much of it can be confusing, but I’m primarily concerned with three things:
- Reducing the total number of requests
- Reducing the total page size
- Reducing the total load time
Get a good web host
You get what you pay for in the world of web hosting. Cheap, shared hosting environments can have slow an unreliable speeds in my experience. “Managed” WordPress hosting plans are generally faster and more reliable, again based on my own personal experience. VPS environments or dedicated-virtual servers are another good option for those who prefer a greater level of control.
Make sure you’re caching your pages
Use a caching plugin that you feel comfortable with. I prefer Comet Cache and I’m kinda scared of W3 Total Cache and it’s robustness, but there are other good caching plugins out there. Many managed WordPress hosting plans have a proprietary caching plugin/mechanism built in, so if you’re on one of those you may not need to worry about this.
Leverage browser caching
Browser caching ensures that your website assets are stored on the visitor’s computer for faster speeds on subsequent page loads. Achieving this is as simple as copying and pasting the code in my slides into your .htaccess file. Some caching plugins have an option to do this for you.
Minify & concatenate your CSS and JS (and maybe HTML)
Concatenation is the process of combining multiple files of the same language (i.e. CSS or JS) into one single file.
Minification is the process of eliminating all whitespace and line-breaks from these files so they become as “minified” as possible, thereby reducing their total file size.
This is an area that I’ve seen significant performance gains in that not enough people are doing, but it’s really pretty easy. I use a free plugin called Autoptomize to handle this. If anything goes wrong, it can easily be undone by deactivating the plugin.
Optimize your images
Strip out unnecessary data from your images that are adding to their total file size. I use WP Smush to do this for me, and all of my images are automatically “smushed” upon being uploaded to my site. In my experience, this saves me an average of 5-10% per image.
Enable gzip compression
gzip compression allows you to zip up all of your website assets on your web server, and send over a zipped version to the user’s browser. The browser will automatically unzip the files and display the website as normal. The end result: smaller files are transmitted across the web for a faster loading website.
This is accomplished by copying and pasting the code in my slides directly into your .htaccess file.
Maybe use a Content Delivery Network (CDN), or maybe not
Content delivery networks are good for media-intensive sites or sites with visitors around the country or the world. You won’t see as much of a benefit from utilizing a CDN if your website is primarily browsed from a single, isolated geographic region or your site does not have a ton of media assets.
In my experience CDNs can be a little tricky to integrate, and can create an additional “point of failure” that you’ll need to troubleshoot if something ever goes wrong.
I’m not saying don’t use a CDN. They can be great, but only when they’re the right fit for your website.
Use a fast and lightweight theme if at all possible. Many themes contain features/functionality that is not being utilized, but the code for these features loads behind the scenes on every page, thereby slowing down the site. If you have a super-robust theme and you’re not taking advantage of all of its features, consider ditching it for something lean and mean.
Eliminate all unnecessary plugins. What’s “necessary” can only be determined by you, but if a plugin isn’t directly helping you achieve your goals with your website consider dropping it.
Whether you attended my talk or not, if you have any questions please leave them in the comments section below. I will answer you to the best of my abilities.