So this week was a bit different. Thanks to several “High Resource Usage Detected” warnings from my web hosting provider, I got to spend my writing time trying to be my own website optimization service, since I am way too poor to hire anyone else. W3 Total Cache and other free tools for the win!
As Brandon Sanderson likes to point out, writers are small business owners. In other words, if anything critical breaks on my website, it’s my job to make sure it gets fixed. Luckily, I found tools like W3 Total Cache, Heartbeat Control, Pagespeed Insights, and Plugin Organizer, as well as some handy tricks right in your cpanel. You can replace WordPress cron with a real cron job and even compress all content for Apache.
Please note: I’m not super technical. I can google, and I know some basics. While I’ll try to explain things as best I can, it’s possible that I might get some info wrong. I’ll link to other people who seem to know what they’re talking about.
TLDR
I did a ton of research to learn how a non-technical person can fix high resource usage issues not caused by increased traffic. Since other people could run into this problem, I figured I’d tell you what I’ve figured out. I’ll also warn you about some suggestions that require significant coding knowledge so you can avoid wasting your time.
Pagespeed Insights
I know I said that W3 Total Cache was the main tool I used to act as my own website optimization service, but Pagespeed Insights is one of the diagnostic tools I used to tell if what I was doing actually helped. Pagespeed Insights gives you a performance score, as well as scores for your accessibility, best practices, and SEO.
In addition, Pagespeed Insights gives you suggestions on how to improve in each category. While some suggestions require extensive coding, others don’t, and a few of them will depend on your website/plugins.
Suggestions that can be done without coding:
- Serve images in next-gen formats
- Adding alt text to pictures
Suggestions that might be able to be done without coding:
- eliminating render-blocking resources
- reducing the impact of third-party code
Suggestions that require coding:
- reducing unused javascript
- ensuring that text remains visible during webfront load
- avoiding document write
Other useful diagnostic tools I found were the “resource usage” tool in cPanel inside the Metric group, Google Analytics, and Code Profiler.
W3 Total Cache
W3 Total Cache is a WordPress plugin that helps optimize your website’s performance through various methods. One method even happens to fix the “Serve images in next-gen formats” suggestion from Pagespeed Insights. The free version has a lot of useful options that made a noticeable improvement on my Pagepseed Insights score. I stumbled around a bit before finding this W3 Total Cache Setup Guide, which is very helpful even if it says that there are better plugins than W3 Total Cache. I don’t know.
As mentioned something that W3 Total Cache does is allow you to convert your media files to “modern WebP formats.” The important aspect of that is that the WebP format can decrease the storage size of your pictures by over 90%. Smaller files load faster and provide a nicer experience for people visiting your website without a noticeable drop in quality, at least from what I’ve seen.
Some Thoughts on W3 Total Cache
It took a LONG time for the files to convert. I strongly recommend deleting any pictures that you’re not using, as well as any extra themes or stuff. The less data required to load your website the better, so dropping excess file weight is valuable.
Please note that some of the tools in W3 Total Cache, as well as Plugin Organizer and some of the suggestions later on, can break your website while you’re fiddling with them, so make sure to back up EVERYTHING before you start fiddling. Most of the plugins have warning messages about this potential issue.
W3 Total Cache seems to help, and it took long enough to get set up and convert all my files to the improved web format that I don’t want to change it at this point. My website isn’t optimized to the level my web host wants, but there are still a few more settings to experiment with. Hopefully one of them will finish the job.
Heartbeat Control
Heartbeat Control is a plugin that lets you control how frequently WordPress checks with your admin panel and “edit post” pages, allowing you to decrease the number of Input/Output calls your server makes while you’re editing your website. This is useful because excessive numbers of “IO Throughput” and “Entry Processes” are some of the most common things for my web host to complain about, and Heartbeat Control seems to help.
Plugin Organizer
I don’t know about you, but there are plugins that I only use on certain pages or posts. Did you know that each active plugin will load on every single webpage and blog post unless you tell it not to? I didn’t! That adds extra entry processes and CPU usage from your server anytime someone opens a page on your website.
Both of these are things that will slow down loading and get your web host to yell at you. Plugin Organizer can fix that by deactivating plugins on pages where you don’t use them, and if you get really fancy it can even change the order in which plugins load to help your website load faster. As I mentioned earlier, this tool can potentially break your website, so be sure to back it up first.
Other Suggestions
Replace WordPress cron with a real cron job. Apparently, there are a lot of functions in your website, plugins, etc. that want to run on a schedule. In order to follow a schedule you need to have some sort of clock to know where you are in the schedule, but there are so many ways to host a website and some of them use different kinds of software “clocks.” WordPress gets around this issue by making a fake clock called wp-cron that just tells all of the schedule-related functions to run each time you load a new webpage or blog post.
As you might have guessed, this means extra entry processes, CPU usage, and IO throughput each time anyone loads a page, slowing things down and annoying your web host. A real cron job doesn’t have this problem. There is a tiny amount of coding needed to fix this problem, but I found a website that will walk you through the process so you can fix the issue without breaking things.
Here it is: Replace WordPress cron with a real cron job
A second useful tip I found was to get on CPanel, then go to Optimize Website, and click “compress all content.” This only helps with websites that use Apache, but since that’s over ⅓ of the internet, it ought to be useful.
Until Next Week
Anyway, this has been a LONG week, and while I’ve made progress, the website’s still not fully optimized. Alas, my website optimization service of one is slower than I’d like. I’d dock his pay, except that I’m not paying myself for this. Hmm… maybe that’s the problem?
Hopefully, I’ll finish soon and be able to resume putting the work in.
Have a great week, and just keep writing!
Timothy Kuhn
