Unlimited WordPress themes, graphics, videos & courses! Unlimited asset downloads! From $16.50/m

Next lesson playing in 5 seconds

Cancel
  • Overview
  • Transcript

4.2 Installing and Configuring the WP-Optimize Plugin

In this lesson, I'll show you how to use the WP-Optimize plugin to speed up your site.

Related Links

4.2 Installing and Configuring the WP-Optimize Plugin

Hello, and welcome back to this Tuts+ course on essential WordPress plugins. In this course, we're gonna continue looking at performance, and I'll show you how to install and configure the WP-Optimize plugin. So let's start where we always do in the Add Plugins screen, and here I've searched for performance. And if I scroll down a bit, I get WP-Optimize. So I click on the Install button, wait for it to install. And then I'll click Activate. So the plugin is now activated. And to access the settings, I go to WP-Optimize here. So this gives me settings and configuration that I can use to make WP-Optimize work better for me. Here in the introduction screen, you can see there are some links. So there's a link to documentation if you want to find out more. And there's also a link to the premium version, which gives you extra features. But let's start by dismissing that and taking a look at some of the options. So this plugin gives us three main ways that we can optimize our site. The first one is by optimizing the database. And that means clearing out anything that's not needed in the database and just generally tidying up the database are making things run more smoothly. The second is images. By compressing images to the size that's actually needed on a page, we can save a lot of space on a server and we can also save time when pages are loading. We've then got caching. Now if your hosting provider already includes caching in their hosting plan, you should not turn this on. So by default, it's turned off, and I will leave it turned off because my hosting provider caches as part of their service. But if you turn it on, what that will do is every time a page is loaded, it will save that page as an HTML file. And then when that page is loaded again, it will just pull up the HTML file instead of having to reload the page and recreate it from the database using the PHP template from your theme. We've also got some settings, so we can schedule clean-ups and we can set where to save logs of optimization that we do. And we can also change settings with discussion, so that's trackback and comments. Which might be that the site a little bit because it means that the site all particular posts aren't going out and looking for trackbacks and comments and spending time populating the page with those. So let's start with the database. Now because I'm also running a UpdraftPlus, I can check this box here where I take a backup before I optimize the database. And it's a really good idea to backup your site before we optimize the database. Because otherwise if something goes wrong, your site is broken. If you take a backup first it means that you can restore from that backup if you need to. So let's dismiss that, let's take a look at the defaults here. So by default, it's cleaning out post revisions, because every time a post revision is saved, that creates an extra object, an extra post in the WP posts table. So you can clean all those, you can clean out auto-draft posts, which is where WordPress creates an automatic draft for you. Rather than you saving a post as a draft, you can clean trashed post, you can remove spam and trash comments, and unapproved comments. And then we have options with regards to transients options, ping backs, trackbacks, metadata, comment metadata and relationship data. Now, there's no data here for it to clean up so it hasn't checked those So I'm gonna change one item because I don't want to clean up all my post revisions because I do sometimes use those. Now, it's worth looking at your site and identifying if that's necessary. So, for example, in some of my client sites, I use post revisions quite a lot. Because occasionally in the start, the client might go in, add some content or even copy in some code from somewhere. And if it goes wrong, I can then roll it back to the previous revision and make edits for that client if they need me to. But on your own site, you could probably clean up all the post revisions. So let's do that. So it will optimize database tables, but it won't optimize tables using the InnoDB engine. And if you want to know more about that, you can read the FAQ by clicking this link. But I'm gonna stick with the defaults because I generally trust the defaults on a lot of these plugins. So, we click on our first check take a back up with UpdraftPlus, and then we click on run all selected optimizations. So it's uploading some files to remote storage because I already set up dropbox with the UpdraftPlus plugin, and it's running my backup. And it'll also run the optimizations at the end. So if I go down now, you'll see that there are zero post revisions, autodrafts, etc. Because it's removed all of those for me. That's one way I can clean things up. I can also look at specific tables and get data on those and remove some tables that belong to plugins that I'm no longer using. So I'm gonna remove that one. Again, it's taking a backup before it runs the optimization. I'm gonna remove that one as well, Because I know I haven't got that plugin installed. Now ideally, when you uninstall a plugin, not when you deactivate it, but when you want when you install it, it should remove any database tables that the plugin has added. But that doesn't always happen. So optimizing the database like this cleans out your database and removes any tables that you don't need. So, all that looks fine. So now let's have a look at images. Now compressing images can really speed up your site, because it speeds up the loading of each page. So for example, if you've uploaded an image that's say 2,000 pixels wide, and you're displaying it at full size, or even if you're displaying it large size and that's 1,000 pixels wide. But the actual space in the page that's required is 500 pixels, all you want to load when you're loading the page is a 500 pixel image. And compressing images will create compressed versions of those images so that you are not loading images that you don't need to. And here I'm gonna check on automatically compressed newly added images, so it will do it for a week from now on, every time I upload a new image. So by default here with compression, it's going in between maximum compression and best image quality. So it's giving me a compromise. So I'm gonna go with that. And you see I've got a load of images here that are uncompressed. So I'm gonna select all of them. And then click on Compress the selected images. So that's now working away to compress my images. And you can see it's counted how many images need to be done and how many have been done. And that number will gradually go down and that will gradually get up. While this is happening, you might wanna go make yourself a cup of coffee and just let it run away in the background. Don't close your browser window as it says, just let it do it. Because if you try and stop this process halfway through, it could end up breaking some of your images and meaning they don't load properly in the page. So now that's complete and I get a message telling me 66 images were compressed, and one wasn't. So I can look at the logs to find out what's wrong there. But I'm happy with that for now, so I'm gonna close that. And that's my images done. So here, we've got some other features which are premium features. So those can speed up your site even more with the images. But I'm not gonna worry about those at the moment because we're focusing on the free version. Now if you wanted to use caching, you could select the Enable page caching here. And you've got settings here with regards to caching. So for example, separate files from mobile devices, logged in users, and how long you keep the cache for. You can also purge the cache if you need to, which is something I've got up here because this is provided by my hosting provider. So I'm gonna turn that off again. Now you can also preload the cache. So normal caching means that if a page is loaded anyway because somebody visits it, it gets cached. But with preloading, the plugin will visit every single page in your site and preload all of them into its cache. Now, that could speed things up if you've got a site where people are visiting all of the site or most of the site. But if you've got a site with quite a lot of old blog posts, for example, that aren't likely to be visited very often, that's something that's gonna take up space, all those HTML files, and they might very rarely be used. So I'm not gonna worry about that. We got some advanced settings, so you can exclude some specific pages from your cache if you want to. So if you got a given page or post that you want to ensure isn't cache, something where you got dynamic processes going on or some JavaScript running, you can exclude that from the cache. Gzip compression is enabled, and that will compress some of the files within my site. And we've also got browser static file caching turned on, all of which are things that will help speed up your site. So if we look at the settings, we can see here that we've got how much data we want to keep, an admin bar link. So if I turn that on, I have to wait for a little moment for it to come on. I'll have to save it, I imagine, and you can schedule cleanups. So, let's do that weekly. And we've got either optimizing the database tables or some more specific things. So I am going to keep that as the defaults. And I'm happy keeping track backs and comments enabled. So I'm gonna save those settings and then WP-Optimize has appeared up here. So you can now see how you can use this plugin to speed up your site. So we've got it running a lot of things in the background. So it's gonna automatically do an optimization every week with the database. It's going to optimize all of our images whenever they're uploaded. And if you wanted it too, it could cache pages. So they are created as HTML files whenever they're loaded. So that's how you use the WP-Optimize plugin to speed up the performance of your website. In the next part of the course, we're gonna move on to SEO. And I'll take a look at why SEO or search engine optimization is so important for your WordPress site. See you next time and thanks for watching.

Back to the top