Unlimited Wordpress themes, plugins, graphics & courses! Unlimited asset downloads! From $16.50/m
by
Lessons:15Length:1.5 hours
  • Overview
  • Transcript

2.12 Optimize for Speed

Ensuring your site runs as smoothly and quickly as possible is essential for both happy visitors and performance in search engines. Learn how to optimize your site for speed in this lesson.

2.12 Optimize for Speed

Hey, welcome back to the WordPress Secure Setup Guide. In this lesson, we're gonna look at how you can optimize your site for speed. Now the cool thing is, just like with SEO, in the case of optimization, there's one plugin that's very well respected. That's gonna take care of the majority of things that you ever need to think about when it comes to optimization. So let's go to Plugins > Add New. And the one we want is W3 Total Cache. Now this plugin does a whole bunch of different stuff. One thing it does, as the name suggests, is it creates a cache of all your files. Like reducing the size of your files through minification, enabling gzip compression, getting a CDN set up for your site. All kinds of different stuff is in here. So let's install that. And we'll activate it. So we have this notice that's shown up here for us right away. It's asking if we wanna enable edge mode so we can get new updates as soon as they've come out. However, unless you are interested in being a part of testing of early features. It's probably better for you to just stick with stable, fully tested features. So just click Hide this message. So to get into the settings of this plugin, there's a menu item actually called Performance rather than W3 Total Cache. So from here you can go to the Dashboard. And you'll notice that it's offering us this message here. Saying, it appears that activating the WordPress SEO extension for W3 Total Cache will be helpful to your site. So, yes, we do want to use that. But don't actually click this button. It doesn't work for some reason. Click this link here. And then if we scroll down here, we can see that WordPress SEO by Yoast configures W3 Total Cache to comply with WordPress SEO requirements automatically. So given we're already using the Yoast plugin, we wanna go with this as well to work in with it. So we'll activate that. Now let's go ahead and actually enable some of the different functionality that W3 Total Cache includes. So we'll go to General Settings down here. Now you can just turn all of the different types of caching functions that it has on at once. But that's not actually gonna work right away because there are a few things that you need to get into deeper settings with. But to start with, there are a few that you can definitely turn on right at the beginning. So first up, we've got Page cache. So you can enable this. And basically, what this means is that, rather than every single time a new user comes to your site. WordPress has to fetch and prepare all of the data that goes into each individual URL. Once this is switched on, W3 Total Cache remembers what each URL contains. And then loads up that cached version of a post or page or whatever is at a URL very quickly. So you definitely want that one switched on. Next up, we have Minify. Now basically, what minification does is it takes a file, an HTML file, a JavaScript file, or a CSS file, and it strips out all the white space. So, for example, with the sting fles that we're working on earlier. You've got all of these lines of empty space. And they actually take up a little bit of load time when somebody is visiting your site. So when we minify all of these files, that crunches them down to the smallest size that they can possibly be. So we're gonna enable that, too. Now one thing to be aware of with this is because with WordPress sometimes you can have a whole bunch of different plugins. And then you have your theme. And you have all kinds of code coming from all different people. Sometimes, when you try to minify all of that stuff, you might find that things just don't quite work properly. So if you turn this on and for one reason or another your site isn't working. Perhaps there's a slideshow that's not working correctly. Or something driven by JavaScript that just isn't going the way you expect. Then turn off minification and see if it goes back to normal. If it does, then what you might be able to do is drill down further into your minification settings. So rather than having this set to Auto, you'll set it to Manual. And then you can try choosing different things here. You might choose a different compressor. Or you might actually dig into the minification page in the sidebar here. Where you get much more detailed settings. And go through all of these settings here. And see if you can find a setting that when changed allows you to keep minification going but without causing any problems. So that, by the way, is how this system works. In the General Settings here, you have basically one little white square for each different type of functionality. And then over on the left here, you have a dedicated page that goes into more detail with the settings for that functionality. So next up, we have Database Cache, and we're gonna enable that one. We have the Object Cache, we'll enable that. And we have the Browser Cache. So we're gonna enable all of those. We'll save those settings. So we've got only green announcements here, which means that this has all been successful. Now it's just letting us know that a couple of things have been changed. So we should empty the page cache. And also empty the minify cache. And when you have this plugin installed, you'll get little notices like that from time to time. Such as when you upgrade a plugin or you install a new plugin or you make any significant change that requires the cache to be regenerated. All right, so we got through this list as far as browser cache. And then the next thing is CDN. Now CDN is a content delivery network. Normally, you rely on your web host to deliver all of your images, videos, site files, and everything else to your user. However, your host may have variable performance. And you may find that for one visitor, they're on the other side of the planet. Now with a content delivery network, you basically outsource the serving up of your files to a third party who has a network of servers all over the world. And these servers are set up to do one thing and do it well. And that is to deliver web content and do it quickly. So now that person who is on the other side of the world from your server can load your site content from a location that's much closer to them. Which means it's going to be much quicker. Now this does require that you use a third party service. And the CDNs that you can choose from are listed here. So once you choose a CDN that you want to use, then you'll click Save Settings. You'll go into the CDN page on the left here. And then you'll need to go through and input your account information for the CDN that you've chosen. So that W3 Total Cache can take the process of integrating the CDN from there. As for the rest of the settings, generally speaking, you're probably not going to need to get into them. So, for example, unless you have Varnish servers, don't worry about this. You can, if you choose, sign up for an account with New Relic in order to monitor the performance of your site. But again, that's not compulsory, that's something you can do if you wish. And you also have the option to integrate the Google Page Speed dashboard widget into your site if you want. But that's also not really necessary. That's just for convenience. You can always just punch a URL into Google Page Speed any time that you want anyhow. So that's just if you choose. And then finally, once you have gone to the trouble of setting this all up how you want. If you do go through and do some of those more in-depth configuration processes. Then it's a really good idea to download a backup of your configuration. Just in case something goes wrong and you lose your settings, then you can easily restore them. Or if you have other sites, and you wanna roll out the exact same configuration to them. Then you'll be able to do that through this area here. Now from here, the only other thing that you need to be aware of is if you need to turn off all the caching for one reason or another. Then you can just check this box, uncheck it. And that is going to deselect all of these checkboxes below. And then you could save your settings. And that will turn off all of the caching functions. So other than that, outside of using this plugin and just familiarizing yourself with all of its different configuration options. One of the main things that you can do to keep your site running smoothly and quickly. Is to make sure that you optimize all the images that you put up on your site. So whenever you're about to add a photo or a GIF, just check the file size of that image. And if it seems like it's a little too large, then take it into Photoshop or into whichever image processing application you prefer. And just try to crunch down its file size. All right, so now you've got your site all secure. You've got a theme in, you've got your basic settings all set up. Your comments are all up and running. Your SEO is all set to go, and your speed optimization is all set up. So now the only thing left to do is to create a plan on how to maintain all of that. And keep it in that good form right throughout the period that you're running this site. And we're gonna go through how you could do that in the next lesson. I'll see you there.

Back to the top