How To Clean Your Options Table For Better WordPress Performance
Did you know that there’s a really good chance that your WordPress database is still cluttered with the ghosts of plugins you no longer use? Not only that, some of those options are automatically loaded up on every page view of your site. Clogging things up. Taking up more memory. All for no reason whatsoever.
Let’s talk about the wp_options table and fairly simple way you can remove the bloat and speed up your WordPress site.
Transcript Of This Video
[00:00:00.29]
When it comes to WordPress performance, one of the things, many things that you want to check out is the size of your WP options tables, basically where WordPress stores all the settings. And specifically, you want to look at the ones that are being autoloaded every time that somebody does a page view on your site. So how can you check out to see if your options table is actually giving you a problem or not? I want to show you that in this video. So Okay, so let’s keep this short and sweet. I don’t want to get too overly nerdy on you here if we can help it. So basically, behind the scenes, what stores all the data of your WordPress site is a database. You can think of your database like a big Excel file, so to speak, okay? And then if you ever use Excel, you know you’ve got little sheets, or you can have multiple sheets inside of a one spreadsheet file. Well, one of those sheets could be the equivalent what’s called a database table. And your database for your site has a whole bunch of tables, and chances are it’s probably got well over 100.
[00:01:07.28]
The core WordPress setup doesn’t have all that many, but as you add more plugins and stuff over time, you get more tables, and it just makes the database larger. It’s completely normal. Now, one of those tables is what’s called WPoptions. And the options table is where WordPress stores all of the settings and basically things that need to be accessed processed on the fly by your plugins and your themes and by WordPress itself. And so, for example, if you have a setting screen on one of your themes, and you save those things, it’s storing all that stuff in your options table. So here’s the thing. Over time, we all test things out. We all install different themes, we all install different plugins. We usually also deactivate and remove those things over time. And so the older that your site is, the more likely it is that you’ve had things in there before that you no longer have in there. And those things stored stuff in the options table, and they will more than likely stay there when you turn off the plugin. And it’s an unfortunate thing. It’s basically most plugins do not remove all that stuff when you deactivate and uninstall the plugin.
[00:02:19.00]
And so all that stuff stays there. You can almost equate this to the days of Microsoft Windows. I don’t use Windows anymore. I’m on a Mac. But if you’re on Windows, you know that you might something called a registry on there. And you can go out there and get optimization software that will go on there and find orphaned stuff in your registry, and it will help you remove the stuff from the registry. And the idea would be that it would make Windows run faster. Well, it’s similar when it comes to WordPress. Its version of the registry is basically the options table. And over time, things just get left around in there, and they also get automatically loaded up. It’s called autoload on every single page view, even if the plugins that put those things there aren’t there anymore. Okay, just to show you what I mean by the table here. This is basically a blank install of WordPress that I set up with InstaWP. I’m going to go in and pop into the database editor here. This is a really simple database here. This right here, it’s got a different prefix on it, but this is the WPoptions table.
[00:03:25.26]
If we click over to that, you’ll see the four fields. We’ve got the ID ID, which is just an automatic internal ID field. You could basically ignore that. You’ve got the option name, which is the name of the option itself. You’ve got the value of that option. And then you got autoload, which is going to be either yes or no. If it’s set to yes, it means it’s going to be loaded up every time somebody visits your WordPress site. If it’s set to no, it will just sit there in the database. It takes up a little bit of room, but no big deal. But it will only be queried out when it’s actually necessary. If we go over to Select Data on this, you’ll see what standard, pretty much a default setup looks like. You’ve got these options names here, and then you got the value. Now, over time, this is a real simple one here because this is a blank install of WordPress. But over time, you’re going to find that you get a whole lot more data showing up inside of this WP options table, and sometimes you need to clean it out.
[00:04:22.27]
Now, the question is now, how can you tell how big your options table is, and how can you tell how much data your site is autoloading? That’s That’s really the key, is you need to find out just how big of a footprint your site has. Now, you can run some raw database queries inside of phpMyAdmin if you’re nerdy enough to want to do that. And in fact, if you’re reading this blog post along with the video on my website, I’ll give you those queries. You could just basically copy and paste them. You can run them yourself. But I do have an easier way, and let me show it to you. The plugin is called Auto Load Checker. It’s not a heavily used plugin, but it works really well, completely and totally free. Go in and search the plugin repository for autoload and install this. Now, if we pop on back to my little test install, I actually have already installed it. And if we come over here, click on Auto Load Checker, and there we go. So what this plugin is going to do is it’s going to give you the total size of your autoload, which is, in this case, only 33 gigabytes.
[00:05:22.11]
Really, really tiny. And that’s because it’s a blank install of WordPress. And then it’s going to tell you the top options ordered by how big they are of the autoloaded options. Now, again, this is a blank install. There’s not much to show you. Let me show you what it would look like on an active site. Here’s the autoload size on blogmarketingacademy. Com. So you can see I’m just a little bit over one megabyte as far as autoloaded data, and you see some of my largest autoloaded options. Now, again, this is already one that I’ve actually removed some garbage out of. When I first got here, it was a little bit bigger than that. Here’s another site that I helped run, and you could see on this one, We’ve got almost 1.8 megabytes in size of autoloaded data. And you could see some of the option names, like this one’s almost 700 kilobit all by itself. Probably has something to do with a Facebook, Google plugin for Woocommerce, just judging by the name. This one probably has to do with Yost SEO. So sometimes you can just tell by looking at the option name exactly what it actually goes to.
[00:06:25.13]
So the question is, how big is too big? Okay, well, here’s the thing. If you’re Coming in at about a megabyte or less, I wouldn’t even waste any time on this. It’s just not worth worrying about. As you can see with the blog marketing academy, I’m just a hair over one megabyte. I actually already have spent a little bit of time on it to get to that point, but now that it’s there, I’m not going to worry about it. It’s just not a big deal. Now, if you’re over one megabyte, especially if you’re substantially over, so you might want to spend a little bit of time optimizing it and removing some of the bogus entries that you’re no longer using with any plugin or themes that you’re using anymore. Because if it gets really bloated, what happens is it makes your site have a bigger memory footprint. It will use up more RAM, essentially, on the server because it’s autoloading all that stuff all the time. It does cache it. Servers have some ways of dealing with that stuff. But basically, you’re just making things work a little harder to run your site, and in a lot of cases, for no darn reason, because some of this autoloaded data is not even relevant anymore, but it’s still being loaded up all the time.
[00:07:31.06]
And so it’s a pretty easy thing to do to just remove some of the old stuff that’s no longer necessary, at least some of the really big ones, in order to try to get your autoloaded data to get down to around a megabyte or less. So going back to my website, we see that it’s got about a megabyte of autoloaded data. It shows me some of the larger things that are taking up space. Not a real big deal. So the question is now, how would you actually go about removing some of this stuff? Well, the The other plugin I want to tell you about is called WPDB Cleaner. So it’s WordPress Database Cleaner. Let’s go ahead and load that screen up here. Now, I am using the Pro version here, Advanced DB Cleaner. You can look it up, though. You can get this plugin for free, Advanced DB cleaner. The pro version adds a little bit more capability in the fact that it will allow you to run searches for various options. It just gives you some more stuff here. But the option that we want to know is the options table. Click Click on that tab, and then here we are.
[00:08:32.22]
We can actually see what all the options are. The cool thing is we can scroll through them with pagination. In this case, I can search for them. You’re not going to have these search options if you’re using the free version, but you could still go through. You can sort them. So you can actually click this little column. It’ll load up a second here. There we go. Let’s hit it again in order to get the bigger ones on the top. Okay, there we are. We You can see here that the biggest option that I have in here is for Elementor. I don’t even use Elementor anymore. And so it’s storing almost 600 gigabytes of crap in there for Elementor. Now, in this particular case, it’s not being autoloaded. So really, it doesn’t really matter that much, but it’s there. And if I wanted to delete it, I could. And so this plugin, even with the free version, you can sort, you could find the big ones. And what you could do is check them off just like you want a blog post. And basically, you can delete or you can also set the autoload to no, in which case it’ll still be there.
[00:09:35.16]
It’s just not going to autoload all the time. Now, it probably goes without saying, but I’m going to say it anyway. Absolutely back up your database before you do any of this stuff, you can definitely screw up your site by deleting options that your site actually needed. So definitely run a full site backup, but especially the database before you start playing with this options table, because if you screw up your site, you need to be able to put back again. Now, a lot of times when you’re going through these different options names, you can tell what they’re for by what they’re called. I want to give you an idea here, what I mean by that. I used to use Thrive Themes on this particular site. I no longer use Thrive Themes for a multitude of reasons. But if you search for the word Thrive here, let’s filter this list. Look at this. I’m actually seeing things like the thrive license. These are all things related to Thrive lead, something with probably the Aweber connection for thrive, thrive cloud. This is all stuff that’s sitting in the database. Some of it is being autoloaded, some of it is not.
[00:10:38.25]
But almost all this stuff, just by looking at the things, are no longer relevant because I am no longer using any Thrive Themes tools in this particular website. So this would be a good case of probably select all and delete it all from the options table just to save space and keep things a little bit more optimized. Another you could do if you’re unsure what an option may go to is to just simply put it into Google, see if Google will give you a hint of what it’s for. A lot of times it’ll get the juice is flowing. It’ll get you to go, Oh, I remember running that plugin, and maybe you tested some plugin like a year or two ago, and now suddenly you’re seeing some options that are still sitting in the database from that plugin that’s long gone from your site. So Google could definitely be your friend when it comes to trying to figure out what some of these options are. Sometimes you can also tell by looking looking at the actual value. Now, here inside of this database cleaner, advanced WCleaner, you can actually hover over these things and you can see the inside of it.
[00:11:38.14]
Now, this is a bunch of gobbledygoo. You’re probably not going to know what any of this stuff is, but sometimes by seeing some of the words that are in there, you could tell what this stuff is. For example, this one here with EDD, and I’ve got a bunch of these in here. This would probably easy digital downloads, which I actually, I think I did try on this site at one point. However, if you start looking around in the value, what you’re actually seeing is that these are probably activation things for various plugins that I have tried in the past that happen to be being sold through easy digital downloads. This one here looks like it’s Gravity View stuff. And I believe I did use Gravity View on this site some time ago, but I no longer use it. So this would be a prime case for almost a 400 kilabyte entry being able to be removed from the options table because I don’t use Gravity Gravity View anymore. Here’s another one for Gravity View. I’m no longer using it. Here’s something else for Gravity View. I’m no longer using it. So sometimes just by looking at the value, you can tell because, well, I keep moving it off, but you can look at this value field here and you can check it out that way.
[00:12:49.11]
Now, of course, if you’re not running a plugin like this, you’re going to have to do it manually in the database using SQL queries. It’s definitely more nerdy. But if you’re reading this post along with the video at the top of it on my website, I will actually give you some queries that you can go and you can copy and paste into your database administrator, and you can actually find some of this stuff, and you could delete stuff from in there. If you wanted to go that route, I definitely do find the plugin to be a lot easier having a nice user interface for this type of thing. So the idea here is basically if you find some really large entries that are being autoloaded, and you could pretty much tell that you’re not using that plugin or theme anymore, and it’s no longer relevant information, delete it. Just remove it. Now, the thing is, you want to only spend enough time on this to try to get that autoloaded data size down to a reasonable amount. If you can get it under a megabyte, You’re golden. There’s not a whole lot of point in trying to make it shrink beyond that.
[00:13:50.00]
Really, unless you’re just a little OCD and you just want to spend a lot of time on it, and it’s your time. You do with it what you please. But it’s only worth spending so much time on something like this and how far you want to take it. Okay, so that’s how you optimize your WP options table. Now, keep in mind, this is only one of many different factors that goes into the idea of increasing WordPress site performance. There’s a lot of things that can affect the performance of a WordPress site, and the options table is just one of them. Okay, so you got to keep in mind, keep it in perspective. I wanted to show you how to do it. Maybe you learned a little bit more about the internals of WordPress. If this is the stuff you just don’t want to spend any time on, a little too nerdy for you, well, you know you can have me check it out for you. And in fact, I’ve got a service over at blogmarketingacademy. Com called WPSpeedFix, where I can go in there and basically run the whole checklist on performance on your site and tweak the stuff and deal with nerdy stuff.
[00:14:49.16]
So you don’t have to. We’re going to get your core web vitals, your performance metrics up to where they need to be, and I can basically do it for you. So if you want to learn more about thatemy. Com. Click on Services. You’ll see the WP speed fix there, and I’m happy to help you out. If you have any questions, feel free to comment below, and I will talk to you later.