‘A-Z of WordPress’ with Nathan Wrigley and David Waumsley
It’s the third in our series of chats called the A-Z of WordPress, where we attempt to cover all the major aspects to building and maintaining sites with WordPress.
Today, it’s the letter ‘C’ for Caching (including server side caching, front end caching (plugins) and CDNs. However, we avoid getting too deeply into page load times and scores, which we cover separately on another podcast.
What is caching?
Here’s a definition…
In computing, a cache is a hardware or software component that stores data so that future requests for that data can be served faster.Wikipedia
WordPress has to process PHP and query a database to be able to serve a web page to visitors. On the frontend, this is seen as the time to first byte TTFB. (the level above for Google being the First Contentful Paint – FCP).
This is fairly insignificant if running WordPress with a lightweight theme on a reasonably powered server (with not too many concurrent users.
But many are running resource heavy Page Builders, backups, security plugins, forms plugins, along with other heavier plugins like eCommerce, LMS, memberships, bookings, etc. They all add to the number of processes and queries.
When the visitor hits the site, serve them a stored HTML version of the page. The instruction being in the .htaccess file.
With WordPress now being more people than ever, and many wanting to be ‘code free’ whilst still maintaining high speed expectations, serving a stored (cached) HTML file seems like a good idea.
Page Builders only add to the amount of processing required. PHP 7 seems to process things almost twice as quickly as PHP 5.6, but memory_limits have typically gone up from 128MB to 256MB, with more often needed.
The problem with the solution…
Is dynamic content. Things get added to a cart, there are check out pages, content needs to be personalised, and this does not sit well with a cached page.
Caching often creates a false sense of security. Folk apply all sort of measures and services like Nitropack to achieve 100% Google insight scores, but is this just a case of polishing a turd?
So, if you’ve been in the WordPress space for any length of time, you’ll know that there’s a host of plugins available to help you out with caching. Some focus on caching – some on caching and other optimisations (lazy loading, minifying and combining CSS and JS (JS deferring too is used).
Here are some that we’ve heard of:
- WP Super Cache – original and popular repository (bad documentation)
- WP Rocket – first commercial – more like an optimizer but still the focus is on caching and simplicity
- Cache Enabler
- WP Fastest Cache
- Simple Cache – not much use if you have page builder clients
- Powered Cache (new)
The ones by hosting companies
All in one optimization
What most of these do is respect the Cache-Control: no-cache wrapped in to dynamic area of what a plugin outputs. An example would be something like WooCommerce.
Server site (where is gets messy)
Bytecode cache stores compiled PHP code so that the next time it is used the compilation step can be skipped. This should be off during development.
Example APC – Alternative PHP Cache
Object cache stores the results of database queries so that the next time that a particular bit of data is needed it can be delivered from the cache without querying the database. This speeds up PHP execution times and reduces the load on your WordPress database.
Example – Memcached
Varnish is an HTTP accelerator. Varnish stores data in virtual memory and leaves the task of deciding what is stored in memory and what gets paged out to disk to the operating system.
Storing asset on server closest to the visitor:
Litespeed needs a mention!
Litespeed is privately owned (it’s the only one to support HTTP/3).
LiteSpeed Cache (LSCache) for WordPress has one million+ active installations!
It’s an all-in-one acceleration plugin, with its signature feature powered by LiteSpeed Web Server’s built-in server-level cache. This built-in cache simplifies the server stack and makes for a faster, more efficient way to serve content. The LSCache plugin adds built-in PageSpeed optimisation, an image optimisation service, critical CSS generation service, third-party CDN integration, among other features.
One more thing
There are hosting companies that will flatten all of your WordPress website so that the pain of setting up and maintaining all of this technology is done for you. Here’s some examples:
This is all very complex isn’t it? It’s the sort of thing that either makes you run away or get stuck in.
The bottom line is that there’s no ‘right’ way to think about this. There’s just a bunch of options. Whatever you can do to speed up your website is certainly worth doing, and we hope that some of the links included in this post might give you some starting points.
As always, we’d love to hear your comments, either in the comments thread below, or in the WP Builds Facebook Group, where you can find the thread.
Transcript (if available)
These transcripts are created using software, so apologies if there are errors in them.
Nathan Wrigley: [00:00:00] Welcome to the WP Builds podcast, bringing you the latest news from the WordPress community. Welcome your hosts, David Walmsley and Nathan Wrigley.
Hello there and welcome to the WP Builds podcast. Once again, this is episode number 214. Entitled C is for caching. It was published on Thursday, the 28th of January, 2021. My name's Nathan Wrigley and a couple of things before we begin, if you like listening to podcasts, and if you like listening to WP Builds in particular, then go to your favorite podcast player and search for WP Builds.
And hopefully you'll be able to subscribe. If that fails, you could go to WP Builds.com forward slash subscribe and over there, there are some buttons and links which you can use in your favorite podcast player. There also underneath each episode on the WP Builds.com website. Underneath the player itself on that same subscribed page, you can join our Facebook group and follow our YouTube channel Twitter account and so on.
So one final time WP Builds.com forward slash subscribe. If you are in the market this week for a WordPress deal, perhaps you could make use of our deals. Pages, WP Builds.com forward slash deals. It's a searchable filterable list of absolutely loads of WordPress products, and you can get a significant amount off.
So that's WP Builds.com forward slash deals. And lastly, if you would like to have your product or service put in front of a WordPress specific audience, perhaps go to WP Builds.com forward slash advertise, and we'll be able to get you on the podcast player a little bit like AB split tested. Do you want to set up your AB split test in record time?
Like in a couple of minutes, use your existing pages and test anything against anything else. Buttons, images, headers, rows, anything. And the best part is it works with element or Beaver builder and the WordPress block editor. You can check it out and get a free demo at AB splits. test.com. Okey-dokey what are we on about today?
Episode 214 is C for caching. We've got this a to Zed series taking up 26 episodes and each week we've got to go to the next letter of the alphabet. We've already done a and B, and now we're on C and we decided to see is for caching. Now this is an area where I think a lot of us might get on stock.
It's very complicated. I don't. Confessed to know a lot. David's a little bit more knowledgeable. And so we chat through the different options. What is caching? How does it work? What are the different options in the WordPress space in terms of perhaps plugins or perhaps different hosting options all to do with caching this week?
I hope that you enjoy it.
David Waumsley: [00:02:51] Hello. It's the third in our series of chats called the eight as ed of WordPress, where we attempt to cover all the major aspects of building and maintaining sites with WordPress. And today the letter is C for caching. Ooh.
Nathan Wrigley: [00:03:07] Oh, this is going to be a tough one for me. I'm going to, I really am going to play the ignorant person in this one because I'm so green when it comes to this stuff, I genuinely am.
It's one of those subjects that I've just got very little. Interesting. I don't go out and try to figure out the latest thing. And I know a lot of people do, whereas you over the years have experimented with all sorts of different solutions. So forgive my ignorance, everybody, and also allow me to play the dumb person, asking the unintelligent question.
David Waumsley: [00:03:38] I think maybe or overthinking it because, I've tried a lot of the plugins for sure, but my understanding it's very basic, which we should just say what we're not covering in this one, because cachingg goes with trying to get better performance out of your website. That's true.
But we're going to stick with just serve a cashier front end cashier and plugins and CDNs, but we're going to avoid getting deeply into page load times and other things. Cause we'll try and cover that in another session. Yeah. So
Nathan Wrigley: [00:04:08] it's a fairly slimmed down addressing of the caching subject, but nice to do nevertheless.
David Waumsley: [00:04:13] Should we maybe we should start with what caching is cause we could we could, pedia tells us in computing a cash is a hardware or software component that stores data. So that future requests for that data can be served faster. I don't know if that really explains that any better. I was going to
Nathan Wrigley: [00:04:30] say that, but that's all I need to know.
Fine. This is over,
David Waumsley: [00:04:36] but for us, mostly, You know what it's doing and how I understand it best is that it's turning our WordPress sites into copies of haystack. So turning the WordPress site into HTML, so it could be served up quicker while WordPress is doing all of the things that it needs to do, because it needs to go off doesn't it.
And do all the PHP process in it needs to query the database and all of that time. Takes, delays the serving up of the first bites. So we have that time to first bite issue because if we've got lots of plugins running or really a higher level above, that is really what Google refers to or measures, I think, which is the first.
Contentful paint, which is the first time somebody sees something that is proper content on their page. So it's helping with that. Isn't it. It's helping with the delays that come with WordPress, but I don't think WordPress itself out of the box is pretty light. Isn't it? Yeah.
Nathan Wrigley: [00:05:40] Really takes me back to the good old days.
When I started building websites, basically I was building websites in the manner that the cash is serving up. Literally you were typing in the HTML and putting images into folders and then remembering the names of them and then typing them in as image tags. And so did you, were you involved in website building when you were literally creating HTML files, flat HTML files with no PHP at all?
David Waumsley: [00:06:06] Yeah, that's how I started. And then probably about the same time, the time when well, even, I think the first site I did was done in tables before really CSS taken off. So
Nathan Wrigley: [00:06:17] yeah. True. I built several sites in tables and try to push the boundaries and got really frustrated many times with just trying to get things to line up.
If it wasn't. Image based layout, you were trying to, in one case, I tried to replicate what a, an actual table that, a photograph of a table would look like. And so there was a cup and there was a computer and there was a keyboard and all that kind of stuff. And just trying to get them to match up was just horrific.
But anyway that's a bit of an aside, but that's the point is trying to get something. So that it's immediate as possible. Those two definitions that you just gave us the time to first bite and the first Contentful paint, are they? Yeah. Are they generally drastically different?
Is there a real difference going on there or are we often worrying about them unnecessarily? That's something that I never quite understood when people talk about them as if they're incredibly important. I never quite understood what the difference really was.
David Waumsley: [00:07:13] For me, when I got to understand, I got caught in the trap, which I'm sure I see people doing now, when it comes to speed, we talk about fast themes, fast.
It's really how much processing needs to be done. And what I'm when I really worked out was, when they understood this first concept and could measure it as time to first by which you can, with all of the tests. And that is effectively the time that it's taken for your WordPress install with all its plugins and themes to process, and, do its queries to the database.
And it can be massive in, I think if I'm running woo commerce or any of, the bigger plugins memberships or learning management systems and stuff like that. It's probably going to change the default. WordPress obviously hosting comes into this, so it depends what power's available, but for me on the servers, I see an increase of at least half a second through these bigger plugins going in.
And by killing that with caching, you know, I gain back that half a second, but it could be even more than that. Obviously, if you. Packed in a lot of plugins page builders. Of course. So another one that, that add to that.
Nathan Wrigley: [00:08:21] Yeah. It's a significant amount of time. Isn't it? If you can save half a second, Dave, everybody in the SEO game would tell you that half a second is the difference between being discovered and not being discovered.
The utility of this is not in question, is it? There's no doubt that this stuff is necessary and it works. Certainly in WordPress, if you just have a vanilla install, Then I agree. It's very fast, in fact, occasionally it's quite nice just to put a default install of WordPress up with the default theme and just browse around, the S the pages and the menus and the category archives and things, and it is virtually instant.
But the second that you start to add plugins into do almost anything. Then you are decreasing the amount of, or rather increasing the amount of time it takes to serve up the first bite, which is negatively affecting your SEO. I would imagine in some cases, then there must be use cases where people literally don't need to worry about this because the importance of the speed is negligible.
I'm thinking of my my father-in-law who is involved with our local history site. And it's really not that important. The users are, they already know. What they're looking for. They know the URL, they go there. They're happy to wait a couple of seconds. It's probably just not worth the hassle for him to install and maintain something like that.
But in most cases, if you're trying to be discovered through search, you
David Waumsley: [00:09:41] need this. Yeah. And I think, if you can build all your sites now just using Gutenberg and stuff, and you're not throwing in lots of heavy plugins, you haven't got a heavy security plugin and stuff like that. You can measure this stuff very easily.
You use it in something like query monitor plugin, which will tell you while you're in the backend. That will estimate how much is going to be your time to first bite, how much time is going in that processing. And there's an even easier one usage, Deedee and they really good to, to know when you're in the backend, as you're adding in your plugins.
You know what you're going to need to compensate for, and maybe you don't need to, if you've got really simple site, just running on WordPress, we've made lightweight plugins. Cause like I said, half a second. That's me being over these years, being very conscious about plugins I pick and making sure that the lightweight ones I've certainly been to plenty of sites when the CA when I.
Got the cash off, often check them. And it's well over a second that has gone just on that process in time. Yeah. It's
Nathan Wrigley: [00:10:40] definitely worth exploring all this sort of stuff. So how do they actually work then? How do these caching plugins do their work? What is it that they're creating?
What is it that they're up to and how do they do it?
David Waumsley: [00:10:51] Welcome to David's wonderful world of made up stuff. Yeah.
I think, that, all I understand is that all of these kind of caching plugins do the same thing. They put some instructions in the HT access file. So when a visitor comes here, it tells them what to do. Now, a lot of those instructions are up. Bout, holding browser caching and things like that.
But I think within that, I think, but someone might need to tell me, otherwise, this is where it contains the instructions, where to go and find the. It saved HTML files that your plugin as creative for you, which is usually, I think we'd nearly all of them is stored in your uploads folder in its own folder.
Nathan Wrigley: [00:11:35] could go into the uploads folder of your WordPress installed browse around, presumably inside another folder, suitably named after the caching plugin, you could locate the flattened HTML files. They're all in there, ready to be served up. And hopefully they're being expunged over a period of time so that there's not a.
A backlog going back for decades.
David Waumsley: [00:11:55] Yeah. And I'm, I can't get so technical. I think most of them will add Jesus in if they can, as well to even condense those files even further before they're served up. But yeah, I don't think that, as far as I understand, there's nothing complex about it.
That's what it's doing and, it's incredibly successful. It does take, just that act of caching. Just remove in that half a second or one second or whatever it is on your site makes a big difference. And for most of the plugins out there, WordPress is smart enough. So plugins say woo commerce.
It will be marked up in certain areas. So dynamic content within it system as already got a no cash surrounded, some tagging around it. And as long as the plugin itself respects that it keeps the dynamic stuff. From being cashed. So it still works. She'll places something in your cart and you've got one of those little heart header carts that change and the numbers change on there.
It's going to update. It works really well until it doesn't work. Of course,
Nathan Wrigley: [00:12:59] That was the. The point at which I, the while I begin to struggle at this point, when it stops working and the multitude of ways in which it can stop working and break things and just cause a frustrating amount of time, trying to figure out what the problem is.
So you, you mentioned to me before we did this, before we started recording that there were some plugins, which are so simple in their approach that they don't even honor those headers. They literally just flatten everything. And in many cases, if you've no need for a more complex solution, for example, commerce shopping cart or something like that might be suitable.
David Waumsley: [00:13:33] Yeah. Off the list there, the one that I tried that is really basic is simple cash. And it literally does that. If you've got a site which doesn't get updated, no one's going into the page builder and changing the content there. You could stick that on and it just keeps serving up the cash that it's got in it's.
Upload folder, as far as I understand, there's no system in it. That means it expires those HTML pages after a certain point or refreshes them. It's as simple as you can get. And I think almost similar is another one called cash enabler, which just focuses on doing the cash in. But it's, again, it's been a long time since I've tried it.
But with that, I think it does have some automatic clearance system. So most this is where it starts to get more complex. Isn't it? Because. Many of them will need to find a way of when say you publish it pages, your new pages, that it clears the cash out. And then that the next visitor who comes then is the trigger to put another version of that in the uploads folder.
Ready to serve the next time. And then there's going to be reasons. I believe why I don't, I never understand this to be honest, but if you look at the, one of the longest standing WP, super cache, which is free on the repository, and it's considered as the original and it's, I think it's owned by automatic.
It's got a big thing that the hardest thing about that is understanding how to set when it will automatically clear up its cash, when it will refresh the pages. Again,
Nathan Wrigley: [00:15:04] the plugins that you just mentioned, that, which were really simple, I guess there is a real use case for that though. Isn't there, I can think of quite a handful of sites that I have client sites, where literally there is no amendments to them at all.
Emma. It's just, there it is. That's what it might as well have been built in HTML. So that is a perfectly serviceable solution so long. Yeah. Did you know that there is that caveat that it's not checking to make sure that anything has been changed or published and obviously that would be a significant drawback if your client were to need access and log in, and then they save things only to discover that.
It, it says it saved, but I can't see it on the website. What's going wrong. But there's a perfectly good use case for that, but yeah, so having the cash cleared and reinvented every so often is a good idea. I presume that they clean up after themselves. Most of these plugins, or at least you would hope that they would stop saving everything over and over again.
David Waumsley: [00:15:58] Yeah. Yeah. I'm not entirely sure. Did I did some content before about how I moved off WP rocket, which is the first commercial, uh, caching plugin that I know of and and moved to breeze. And now I've gone back to it, but I think my memory was that it, in the olden days, WP, rocket didn't do such a good job of clearing out.
Those stuff recently I've tested it and it does a really good job. And I think yeah, I think last time I looked at super cash, it was leaving stuff in there, but it could be something to do with my install or stuff that's happening on my server. So no copy. Sure. So
Nathan Wrigley: [00:16:33] You've got a whole list of different plugins on the show notes that we've created.
Do you want to go through some of those or is there things you wanted to say first?
David Waumsley: [00:16:42] No, I think I tried to group these together into, cause it could be very confusing for somebody who's looking for cash plugging because some of them are focusing literally on doing that store in these HTML and serving it up and having a system to clear it, make it be easy to.
Preload those caches. This is the thing about WP rocket is it does this very well. You change something on your page. It knows you've done something good goes and serves up a new one that sticks it in the folder for you. That's what's nice about it. So there's those ones, then there's a couple of which I guess a little bit different in the fact that they're owned by hosting companies.
So there's breeze by cloud ways and there's SG optimizer, which is SiteGround's own caching plugin, and they're pretty simple. They're focused on caching. And then we've got another, I think another section, which is more about all in one optimization, which includes in, so one of the oldest ones, again, that was one of these big, all in one jobs was WP, total cash later was Swift.
And we've also got, but you don't hear so much about this one. Comet cash as well, which is another commercial one. So that's the way I've tried to rationalize
Nathan Wrigley: [00:17:53] this. I'll put the upper, all of those links in the show notes to anybody that's listening and we'll put them into the three sections.
So you've got basically out and out WordPress plugins. That's how they work. Then you've got ones which are. Presumably doing a similar job, but they're owned by a hosting company. And then finally, you've got ones where they're trying to do more. It's not just optimization with HTML files.
Is there anything that's beneficial if you're using cloud wise or SiteGround, do they have some sort of integration with their actual physical hardware that makes those a better choice if you're using their platform?
David Waumsley: [00:18:48] I don't think so. I'm not an expert on this one, but I, having used breeze for quite some time, I think, and again, it gets into areas where I'm not, I don't know enough of the technical side of it that they will say that some of these work better on certain types of servers over other ones, think. Breeze is one of those which will work better on now I'm forgetting what the name of it is. So what's the front-loading server that you get the speeds, things on genetics. That's the one, that's what I was looking for. Believe that breeze is supposed to work better on that on tests, but I've never seen anything that really breaks down the technicalities of this.
But they are at least simple. Cashier plugins. And I did in the simple ones, I mentioned WP rocket, but actually you could argue, it started with a simple basis of prioritizing what it thought was the key thing about speed, which was cachingg those pages. But over time, it's gradually added more of the things that you find as a total optimization.
So it's differing Java script. So it loads later if it's, felt the plugins are loading them top of your site, it will. Bundle those together. It's doing that mini fine. So it's, again, it's hard to know where to place that. It's just like it's priorities on the simple caching. Yeah.
Nathan Wrigley: [00:20:04] Uh, just the stuff that you've just talked about a few seconds ago is the area where I fall down really is the complexity that's added by many of these plugins and the possibility to be spending such a large amount of time.
Configuring things for fractional games. And obviously I understand that in many cases, there may be a genuine economic imperative for this. You really are by shaving off. I don't know, one 10th of a second. You may very well be outstripping your competitor. And you're vying for number one in Google, and that might be the difference.
But in my case, in most of the sites that I'm using, the competition is fairly modest and that they, It's just not worth the clients, paying the time for me to explore all that stuff. And so I never really have, so I've never come up with a standard operating procedure to do caching with a particular plugin where I just know it inside and out.
I'm more dabbling in different ones and hoping in many cases that the default configuration is suitable and I know I've broken things and then just undone them and then never really gone back and tried to figure out how I've broken things. So for example, some. Some of these plugins allow you to move, defer the loading of resources.
You can put it in the future instead of the header and Oh, okay. That broke something. Why did it break it? Not really sure. I'll just put it back to where it was, because I know it works over there. That's where I'm at. Whereas I guess somebody who's an expert in this would be spending the time thinking, okay, why did that break?
Can I fix that problem? Can I figure out a way to put it in the correct place? And I just never really have.
David Waumsley: [00:21:38] Yeah. There's a thing, with the things like WP, total cash with obviously there's more stuff that can go wrong and to do all of the various jobs that it needs to do, it uses up more resources in the backend to to get the speed at the front end.
And there's no doubt, if you use something like that and you know how to set it up and configure it, that you are going to shave some milliseconds off. But my approach is similar to yours. It's I guess what I've really tried to do now, having spent a long time trying to optimize and having problems down the line or getting lost is that I try to.
By the software that is only all that it's only what I need. So it's as lightweight as it can be for the job that I'm using for. And then just prioritize the simple caching and ignore all of the other optimizations because otherwise, if it's the other way round and you build your site, you're adding in plug enough to plug into achieve one little task that could be done with CSS.
It's almost a little bit like having that skinny Lottie, isn't it. But can you add whipped cream on the top?
Nathan Wrigley: [00:22:42] It's interesting because over time you flipped and flopped between a lot of these different caching plugins, as we discussed before we hit record. I'm just wondering what the kind of like the impact is on the business side of things of that.
In other words, if you. Let's say that you dropped WP rocket and go to breeze and then you drop breeze and go to WP rocket or whatever that is. Do you then find yourself going back through a bunch of websites consuming time in order to make them all the same? Or do you just leave the ones that you've already configured?
Just leave them as they are, rather than getting an, getting to be an expert in one way of doing it and then making every site the same.
David Waumsley: [00:23:23] Yeah, pretty much. I D my approach, not, but to move these out is to just get it to do it's simple cash in, and you see nearly even the ones that are focusing on cash is still give you some option to minify CSS or HTML or something like that.
So basically it stayed off. And then I just uploaded that across all of my sites with the same configuration. That's what
Nathan Wrigley: [00:24:09] I would do. Yeah, that's interesting. So even though it was doing its work, the, there was literally no way for you to measure the benefit in that particular case. And I suppose that's the, that is the problem.
Isn't it is that unless you can really see a gigantic difference, the amount of time put in can be difficult to justify to yourself. You might spend two or three hours trying to figure out something and really very small gain to be made.
David Waumsley: [00:24:36] Yeah, I think so. We it's, we are fixing the problem.
After the event, really, most of the time with these things, aren't we, if you've made your site as light as possible, WordPress does a pretty good job, but it's literally what is it? It's less than a quarter of a second on most hosted and much less than that. If you've got really decent hosting to serve up WordPress.
So it's all the stuff we add to it. And sometimes you can't. Get around that. If you're using WooCommerce, that's tough, it is resource heavy and you probably do need caching. But yeah, my approach is always the simplest it's my model, isn't it. I don't charge a lot for our ongoing care, so I can't possibly be fixing those things.
So I'd rather that the site was slower. In the beginning then have to keep fixing stuff because I'd done so much clever optimization and that's just my business model. Other people are obviously going to be different.
Nathan Wrigley: [00:25:30] Yeah. I'm just going to say this is a really solid, you can see it for yourself, the benefit of having fewer plugins and well-built.
And it does make it obvious by there's a, there is a lot going on here. Wouldn't it be good to combine a lot of this stuff. And I suppose in essence, the answer is no, it'd be better if it wasn't there in the first place, if you could get away with it.
David Waumsley: [00:26:13] Yeah. And I've got the other issue, I think, because I'm managing the service.
So I buy one server and I can put so many sites on it. So even if I get the front end, going really fast for the visitor, if that's at the expense of having to run a really heavy all in one optimizer that needs to do a lot, then. I've got less sites that I can put on my survey, even though they might be running faster at the front end.
So there's that, there's always these balances. Isn't there to make sure.
Nathan Wrigley: [00:26:41] Yeah, that's a good point. So there is actually a cost implication as well. Yeah. The amount of search sites that you can get on one server speaking of servers, You've got a section here called service sites. And this is where it gets messy.
You say what's this
David Waumsley: [00:26:53] all about it gets messy because I don't know what I'm talking about. So yeah, actually I stole a bit of an article from Kinston and it came up with the same kind of areas of service, like cashier, except I didn't know the terminology of it. So they got byte code caching is a type of server side, um, caching, which is really, it's acachingn that is storing the compiled.
PHP code. So the next time someone goes to the site, so that's serving not only the dynamic content. So of course, that kind of in, is not going to be relevant on a static site. That's already serving HTML page, but yeah, that's the kind of stuff that you probably want when you run in the big, dynamic plugins.
Nathan Wrigley: [00:27:37] It's also the kind of stuff that is literally beyond my pay grade, if I D I can understand the consequences of it, but I literally have no insight into how that stuff is happening. And I would simply have to rely on the honesty of the I, in this case, if it's kin stuff, for example, that you're using or SiteGround or whatever it was, you'd have to just trust that they'd done that stuff.
And, I don't even know how it's just voodoo to me though.
David Waumsley: [00:28:01] Yeah, exactly. But there are services out there and one of them is called APC and I've really, yeah. It's beyond my pay grade as well, alternative PHP cash. And it's something that should be turned off while you're developing, but once you've got your site on, it's going to be running.
So it's just storing those kind of PHP. Commands that, so it's much quicker for those dynamics stuff. So you can turn it on there and leave it to them. But there is that. And then there's the, there's also object Kashi, which stores the results of database queries as well. Again, it's something that you're not going to need if you don't.
I think you just don't need to turn this stuff on. If you've got a static side. And you're using a plugin, which is serving up almost everybody at HTML page. There's no benefit as I did. You know what I mean? My experience really only of this stuff is the fact that going back to my SiteGround days, they were one of the few shared hosting solutions that on the pro version they gave you mem cache, which was doing some of this.
And that's my only personal experience of having any of these kinds of service side. Um, Yeah. cachingg things going on.
Nathan Wrigley: [00:29:15] Yeah. That they talked about a lot. And then, they mentioned all over the places and as a sort of ideal way of doing certain things. And I can absolutely understand that if you're putting together those websites where you need these database queries cashed, that makes perfect sense.
But again, in the world that I live in this sort of stuff, Beyond my pay grade, nobody really particularly needs it. If you're working in a, an enterprise website area, if you're working for an agency, which is delivering big sites to big customers, this stuff, I guess you've got to know, but it's just not something that's crossed my, my, my boundary, but it's interesting, object catching, just getting the database.
I wonder. This is a slightly, I'm just being ridiculous. Yeah. I wonder if at some point somebody will figure out a way to cash the cash and then somebody will figure out a way to cash the cash of the cash. So eventually everything is cached by unit by something else. Cause it just strikes me that, go back.
20 years, everything was HTML. Then PHP came along and then suddenly PHP was brilliant. And then we figured out that, Oh, actually, no, this is a bit slower because of all the things that we're doing now, let's invent a caching technology to do this. And then somebody will probably figure out a quicker way to cash the
David Waumsley: [00:30:26] cash.
Yeah. Yeah. You helped me last night. There was a client of mine who said that the images weren't showing up and they said other people said the same as far as I could see it. Wasn't and it's one of those things where the first thing I go and clear the cash in my WP.
Rocket I'll go and clear the cash in it. My page builder. Yeah. Anywhere where I've got cash. So the more of these cashier things going on in the mall, when you've got a problem, you have to go around searching through numerous caches. So that's why I like to reduce them as much as possible. It isn't even mentioned piece sold the kitchen.
That's another one. Yeah.
Nathan Wrigley: [00:30:58] Yeah. Just before we get to page builder caching, then the, it is, it's become a bit of a mantra. Hasn't it is, if there's a problem on your website, have you cleared the caches? That's basically the first thing that comes out of your mouth and it just demonstrates how yeah.
Widespread. This is, but also it's a bit of a reach. Isn't it? You're just guessing that might be the problem because it likely is. Whereas, if there was no caching on there and there was a problem, you'd be thinking, Oh, there is an actual problem. I need to explore it. Whereas the first thing is just clear the caches it's probably that.
And 99% of the time I suspect it. Isn't something just went a bit wrong and cash needed to be rebuilt.
David Waumsley: [00:31:35] Yeah. Do you know, there's one other thing we should cover on the service side of things and it is available to me. And I turn this off all the time, which is varnish, which is a HTTP accelerator.
Did that throw in too many teas there? No, you got it right? That, yeah, that's perfect. Okay. Yeah. Which stores and I'm really, this is, it just blows my mind, this stuff. So varnish stores, data in visual memory, virtual and leaves the virtual psych. I should read these things, the task of deciding what is stored in memory and what gets paged.
Out to disk to the operating system. That's the technical explanation of that. But do you understand?
Nathan Wrigley: [00:32:16] No, not really. On a, literally an anecdotal level, I get it. I haven't the faintest idea how it might operate. I think I'm imagining that there are people listening to this who can. Blatantly obvious, come on.
It's obvious, but no, I don't really get it and I've never really encountered it or used it, but again, there'll be people shouting, really? This is important. You need to know. Don't. They'll
David Waumsley: [00:32:38] probably be shouting at me saying this isn't cachingg at all. So what you're talking about. Yes.
Cause I think that's probably true with it, but again, it's another one of those options, isn't it? And it's another one of those things where it can cause you problems when you're working on a site, it's ideal that you only turn this on. When you think you've got your site as you want it, so right. Yeah. Yeah. We've all
Nathan Wrigley: [00:32:58] played with it. We've all had a fiddle and we've all noticed that it does probably something, but whether or not there's many people listening to this podcast who genuinely deeply understand how it works and how it's building things and deploying things is something only the comments will tell us.
Yeah. Um, CTN caching.
Yeah. Oh, there's even more, it's a remarkable life, you think you've, you think you've covered everything and then along comes CDN caching.
David Waumsley: [00:33:26] So content delivery network caching, so you can store your assets under the cloud and services will serve those assets to, from the server nearest to the visitor for speed.
And I guess the best. No one's out there or public jet pack, of course. Cause we're talking about WordPress. And you get that for free, don't you? It will store your images if you install jet prac. Yeah. It will serve up. That and we've got CloudFlare as well as popular because that's also free. But do you, have you used these not
Nathan Wrigley: [00:34:01] Jetpack, but I've used CloudFlare.
And again it is a bit of a reach in that most of the sites that I'm using sorry, a building really. That just there in the UK, that every single person that's looking at them is in the UK. So whilst it's highly desirable the fact is that most clients sites just simply, it's a bit too much, this is a free thing.
CloudFlare will do this stuff for free. You just have to point the DNS at it. So I make use of it. Why not, but I think probably there's not a great deal of benefit in the case that I'm talking about. But if you've got a site where there's international visitors it's a no brainer remarkable, really that they do this stuff for free and offer it for free.
I know that there's clearly a paid tier to CloudFlare and. Many people are doing it, but services like CloudFare the free offering is utterly amazing. That the DNS and the sort of the protection that they offer in the hopes that you'll boost up to the page offerings is really
David Waumsley: [00:34:59] quite clever.
Yeah, absolutely. And my experience with, I've put it on all sites some years back and then and it was quite easy to clear the cache, but again, you had to go to their interface to do that. And there again, there are issues, again, if you're working on certain things, they have rocket accelerator comment, boys called it's rocket something does cause problems if you're working on the site.
But I, it got vague, there was a period, I think, with CloudFlare where they had a security issue and then they had that. Down, thus the problem, if they have any downtime, which is very rare, of course, then, it's beyond your control, isn't it? So it's going to affect your sites. Yeah.
Nathan Wrigley: [00:35:38] And of course the other big problem is if it is behind your credentials if you've got like 50 sites on your CloudFlare account, whatever it may be and your client.
Can't clear those caches and you are asleep and they desperately want something to be live. And excuse me, that, that is the problem. Then yeah, and it's a, it's just another impediment to things working perfectly, obviously. Great. When it's all working. And like you said, amazing that it's so much for free and what a great service, but when the client needs to log in, really, they're probably just going to be phoning you up or sending you an email, asking you to clear things.
So it's just another impediment whilst being brilliant. There's a, there's an object. You've got a barrier causing a problem.
David Waumsley: [00:36:22] Yeah. I can't, I haven't mentioned any of the paid services out there, but I did try jet pack wants. And of course this is so many years back. I can't really say too much on it, but I did hit a problem very early on.
I was just absolutely frustrated with it because I don't think there's any actual control to be able to delete your cash on a kind of, if you want one image to just go, you don't get that kind of control on it. And I've found myself. It didn't a problem with it. So yeah, I'm sure it works perfectly for most people, but I did, I realized there was a bump I hit I just needed to clear a particular image because it needed to change.
And it wasn't Ave.
Nathan Wrigley: [00:37:01] That is the interesting thing about this subject is really, it never gets spoken about in positive terms. Nobody's going into Facebook groups and talking about how. Wonderfully they've configured their caching. Everybody just wants to talk about when it goes wrong, because it's really only at those moments where it becomes crystal clear how important it has been and how much it can mess things up for you.
David Waumsley: [00:37:24] Yeah. You bet. You know what I'm going back since I've gone to a simple thing, Wong caching, plugin focusing just on serving up those HTML. Honestly, it. Very few issues. I've just had a life long period of trying to get the answer to this and and experimenting and just messing it up. Really, for most people, starting with WordPress, if they've installed some heavy plugins, they could do without it in the first place, but if they've got some heavy plugins getting a simple caching solution, It's probably going to be the end of it for them.
It's going to do the job. Yeah.
Nathan Wrigley: [00:37:58] So what is your, you may have said it already and forgive me for making you repeat something, but what's the solution you've, you're happy with as of this time, we're in late 20, 20 what's David Wamsley's recommendation.
David Waumsley: [00:38:13] Yeah I've wandered back to WP rocket.
So I was a big fan of breeze because it was a little bit like WP rocket, when that came out simple, you know, just few things to set up and, it would solve the majority of your problems. It would be fast. But just for me, for some reason, I don't know why it just didn't seem to be. I should have already talked to them.
It's my fault. And because, but it stopped cutting out that time to first bite. I can't notice it. So I just decided to go back to a WP rocket. So I'm really happy with it. I know there's some, it's got more complex, so it's introduced some more issues, which I know people have found with it, but it's been working for me.
Nathan Wrigley: [00:38:53] you say that you noticed that the time to first bite wasn't being improved, is this something that you periodically go and check? Have you got some sort of automated thing going on checking this, or do you manually go out and check a few of your sites on a regular basis just to see how all that stuff's going?
Cause I think many people wouldn't be doing that. They built the client site, put the caching on told the client that they occasionally need to clear it. If they. If they're running into any problems and that's it. Maybe you don't come back to that and look at that side of things, but do you, is that how you discovered the time to first bite wasn't in fact being affected?
David Waumsley: [00:39:28] Yeah it's only, partly it's down to the fact that I was until recently, you're always on a very low net, so I would really experience these things. So just working on my own sites, using the same solution as my clients and noticing it online, go, this seems slowly the same slope. And then I checked it and go, Oh, okay.
This is gotcha. What about my client's sites? Oh yeah, they are too. Instead of actually. Talking to the people who made that one, I just actually just swapped it out, which I think is one of the nice things about caching, plugins. At least it's one of those things that, if you're keeping it to the simple thing, you can take it out and then just pop in another one and you're done on this.
Nathan Wrigley: [00:40:08] ever had any problems with. Removing a plugin. Not, yeah, not so much the cleaning up side of things where it deletes its files and so on, but a problem whereby you've uninstalled or deactivated, a caching plugin, and it's caused chaos. You ever had anything like that?
David Waumsley: [00:40:23] No, that's not been a problem.
Some things, some of them, you probably, you need to check at least that is when you've well, not actually deactivate it on most of them. I think at the point where you deleted, then go take your HT access file because most of them will be writing some other rules in there. Often about browser caching, I think, as I mentioned, and it fails cleared itself up you've installed your new one, but it's still.
Bay in the rules of the old caching plugin. And I've hit upon that. I've only installed it and I'm thinking man seems to be something,
Nathan Wrigley: [00:40:57] Oh, I say in the declarations, the rules inside the HT access file, for some reason didn't go.
David Waumsley: [00:41:03] Yeah, exactly. Exactly. It's got the priority of your HT access file, even though you've got rid of the plugin.
So it's probably worth checking that's the only thing that I've, I've realized much later she's at,
Nathan Wrigley: [00:41:15] that could be quite an impediment to things working correctly. That's pretty important to chase it. Yeah. Yeah. Good point. Okay. Looking at the show notes again, you've you've mentioned Lightspeed as one of the final things.
David Waumsley: [00:41:27] Yeah. I don't think people are shouted as if we don't mention it because, in terms of, speed fans, that's the thing, isn't it. But that's it. So privately owned server technology, isn't it to rival the publicly owned a patchy. And with that, the combination of their Lightspeed caching plugin, which also caches.
So really Lightspeed is just. The configuration of the survey is supposed to be better than the patchy, how it works, but that's all I know really yeah.
Nathan Wrigley: [00:41:57] Experience with. I certainly haven't. You either I'm taking it. No.
David Waumsley: [00:42:02] Yeah, but I think it's almost, something you can't argue with. I think their servers are quicker, but the key thing for WordPress is there are less cash for WordPress and that installs that.
And it's its own it's somewhere. I'm caching. Plugin. Yeah. Okay. In that case,
Nathan Wrigley: [00:42:18] we've done the we've done the right thing by mentioning it, but we've added absolutely no value by mentioning that. There you go. It's been mentioned. That's fine. And then last but not least is the newly emerging flattening services, things like static and Hardy press to get shifter where.
Everything is done inside a sort of virtual machine. So your website is held in a virtual machine, which is spun up, you interact with the website and then if you click save and it publishes all the changes and then that virtual machine goes away and all you've got is the flattened files, which I think.
Is, can you imagine what's going on behind the scenes to make that work? It must just be breathtakingly difficult to pull that off. But anyway, it's been done. These companies seem to work because the downside is you are literally serving up HTML files. So there's just, no, there's no possibility of having WooCommerce or at least that's my current understanding and things like forms are going to find it hard work because there's no PHP switched on the backend to interact with.
David Waumsley: [00:43:23] Yeah, exactly. In my mind how I see this, and I know it's much more complex than that, but I just see this as I know my caching plugin will store my HTML files in this folder on my server. This is they've taken that folder and put it on their server to serve up. But with their situation.
Yeah. You can only get that you, it doesn't work and set off WordPress, which of course on your server always does. Even if you're being served up that HTML is still processing WordPress. So that's how I see it.
Nathan Wrigley: [00:43:54] The ad, there is a sort of benefit in disguise with that setup as well as in the it's really difficult to hack something which isn't there.
So really all you'd be hacking is flat HTML files because there's not this, there's no server technology going on in the background. And I think that's a message which doesn't really get talked about quite as much. It's mainly. When people talk about these services, they're talking about the speed, but there is this security benefit.
Like I said, there's nothing going on dynamically in the background in order to be hacked, you can't inject some random bit of PHP and make things happen on the server and take it over and start spraying out emails for your, your latest Bitcoin venture. Yeah. Because there's nothing switched on.
And so I think that's a nice little added benefit, of course, that these services are much more costly because they're a bit more niche and probably require a lot more manpower to keep developing and keep maintaining. That is to say the companies need employees to develop this technology much more so than free open source software, like Apache, which you can bang on just about anything.
But interesting, definitely interesting. And it seems to me like these companies are. Scooping up a growing proportion of the market.
David Waumsley: [00:45:03] Yeah. Do you think it really is, obviously it's going to avoid those people who are going to look for security flaws in WordPress. It's going to get rid of those, but surely any server with HTML could be.
Hacked, you could get, find your way onto the server. Couldn't think clearly
Nathan Wrigley: [00:45:21] there's a machine somewhere that's being told to serve up a flat HTML file. But my understanding is that's literally all that there is HTML files and presumably some sort of file server going on. But I don't really know.
I just certainly know that the PHP is all switched off. There's none of that going on. And so that, that side of things is taken care of. But yeah, you could be right. There must be a computer on somewhere, but I think you'd have to be far more ingenious than. The nugget of regular hack of WordPress, which I think is, if you know what you're doing, I would imagine WordPress is.
So it's easy to find vulnerabilities in various plugins, which are lying around on outdated software, which obviously in this situation is just switched off. It's not there.
David Waumsley: [00:46:01] Yeah. It's this is a topic for another time, but always, it's a curious thing that I hear when I read a lot of reports seen something like 40% of hacks are to do with the hosting the service.
And you'd just think. Okay. But the ones that the only ones I've ever known about are not, they're actually due to some issue with a plugin. Yeah. Yeah. I don't know who
Nathan Wrigley: [00:46:23] gathers these statistics and sends them out on our behalf. Any sort of final conclusions of we, do you think we've covered the topic?
Is there anything that we missed along the way?
David Waumsley: [00:46:33] No, I think that it sounded like I probably made the whole thing sound more complicated than it is. But I do think probably I made the point in night that I think, for anybody who's just, for me, just getting a simple caching plugin that.
Does that serving up the HTML is what reduces the majority of speed. And it can be just so simple context to set that up, but yeah.
Nathan Wrigley: [00:46:56] Yeah, I think, yeah, there's quite a lot of overthinking of this isn't that? And yeah as always settle on something. Learn it, deploy it and, you don't need to be casting around forever and ever, once in a while have another look, but yeah, interesting subject.
I hope we haven't messed anything up too horrifically along the road. If we have, please let us know in the comments that would be greatly appreciated. It's always nice to be told when you've said something, which we do quite a lot. Yeah. But yeah, if that's it, should we
David Waumsley: [00:47:25] knock it on the head?
Yes for me. Stupid David.
Nathan Wrigley: [00:47:29] Okay. On me. Stupid Nathan borrowing. I hope that you enjoyed that who knew there was so much to say about caching. As I said at the top of the show, this is not an area that I know a great deal about, but David's explored it a little bit more and so many different options, different plugins, different settings you could set up in your hosting environment and indeed hosting companies themselves.
If you've got any comments about what we said, perhaps we said something in error, or perhaps we miss something out. Please head over to WP Builds.com. Find episode number 214. There's an archive in the main menu at the top. And you could comment there or WP Builds.com forward slash Facebook. Join in the conversation in the thread over there as well.
Let us know what we did, and what we got wrong. The WP build's podcast is brought to you today by AB split test. Do you want to set up your AB split test in record time? The new AB split test plugin for WordPress. We'll have you up and running in a couple of minutes. You can use your existing pages and test anything against anything else.
Buttons, images, headers, rows, anything. And the best part it works with element or BeaverBuilder and the WordPress block editor. Check it out. Get a free [email protected] Okay. We shall be back next Thursday for a podcast episode. This time it will be an interview because we flip flop between a chat with David and I and an interview also on Monday 2:00 PM, UK time head over to WP Builds.com forward slash life or our Facebook group.
And we do our, this week in WordPress live summation of the WordPress news. It's followed up a day later by a newsletter, but if you want to see it live and join in the conversation, we'd very much like to have you. Okay. I hope that you have a nice week. Stay safe. I'm going to fade in some cheesy music and say, bye-bye for now. .
Tagged with: A-Z - APC - Breeze - Cache Enabler - Caching - Cloudflare - Comet Cache - HardyPress - Jetpack - Litespeed - Memcached - Plugins - podcast - Powered Cache - SG Optimizer - Shifter - Simple Cache - Strattic - Swift Performance - WordPress - WP Builds - WP Fastest Cache - WP Rocket - WP Super Cache - WP Total Cache