 Hi and welcome to Learn WordPress. In this session, we are going to take a closer look at caching and how you can use it to your advantage. Caching is a technique used to improve the performance of websites. It involves storing frequently accessed data in a cache, which can be quickly retrieved when needed, rather than having to retrieve it from the server every time a user visits the website. Caching is like having a personal bookshelf for frequently used files and data. When a user visits a cached website, the browser checks the cache first for required files. If found, the website loads faster. It lessens the server's burden by serving cached files instead of generating them repeatedly. Ultimately, caching enhances user experience by providing faster loading times and smoother website navigation. Adding a plugin is probably one of the most simple ways to optimize caching on your WordPress website. Cached plugins simplify implementation, optimize performance, offer advanced techniques and include cache management features for efficient and targeted caching on your website. Let's briefly look at six of the most common caching you will come across. Number one, page caching. Page caching saves a fully prepared version of a webpage, so when somebody visits the website, it can be quickly displayed without needing to be created from scratch. Number two, browser caching. When you visit a website, your browser saves certain files so the next time you visit that site, your browser can use the stored files instead of downloading them again. This helps to load the website faster since the browser doesn't have to fetch all the files from the server every time. Number three, server caching. Server caching involves storing commonly accessed website data. When a user requests that data, the server can quickly retrieve it from the cache instead of generating it again. And number four, CDN caching. Content delivery networks store copies of website files on servers located in different parts of the world. When a user visits the website, the files are loaded from the nearest server, reducing the time it takes for the content to reach them. Number five is object caching. Object cache is used to save on trips to the database. It stores all the frequently used website elements in memory for quicker access, making the site load faster and reducing server work. And lastly, number six, database caching. Database caching focuses on caching the raw data obtained from database queries, while object caching caches processed and ready to use elements of the website. Some plugins to explore are W3 total cache, WP fastest cache, and Lightspeed cache, but there are many others available in the plugins directory. In this example today, we are going to install and activate the W3 total cache plugin and then enable some of the most important settings. So let's make our way to plugins and then click on add new and then search caching. And in this case, we are going to click on install now next to W3 total cache and then activate. And once activated, we can make our way to settings. So when you get here, you will notice at the top, it is welcome to the W3 total cache setup guide. So they provide you a guide to follow. But you can also click on skip this setup guide if you wanted to. Otherwise, you can click on next and go through all of these types of cache one by one. Let's go ahead and test the page cache. And we are off to the fastest time. And as you will notice, they have also recommended the disk enhanced, which is actually the fastest time. Then we can click on next and select test database cache. Now at the bottom below recommended, it actually says leave this feature disabled as the server database engine may be faster than using disk caching. So let's move along and test object cache. And here we will notice that the fastest time is 1.85. So we will select that and click next, test browser cache, ensure that is enabled. And then it also says select lazy load. And we will talk about that in a sec. And when this setup is done, we can visit general settings to learn more about extra settings and features. So let's make our way to general settings. Let's take a closer look at some general settings. First up is page cache. The first thing we want to do is to ensure that this is enabled. Adding page cache can improve performance and reduce server load. And please note some hosts also provide page caching. Next, we are going to look at minify or minification. It reduces load time by decreasing the size and number of CSS and JS files. And it automatically removes unnecessary data from CSS, JS, feed page and post HTML. We can therefore go ahead and enable minify. I have read through the documentation so I will go ahead and say I understand the risks. And leaving minify mode on auto will suffice. Then we can scroll down to opcode cache. Opcode cache is available to pro version users and allows you to store compiled PHP code. Now we move on to database cache and object cache. Let's first talk about database cache. As you know it was recommended during the setup that it might be better to keep this disabled on the specific website. And it also states best used if object caching is not possible. Object cache is possible so we have therefore enabled this feature as it further reduces execution time for common operations. But please note database cache and object cache is not recommended when using shared server hosting. Up next we will ensure that browser cache is enabled. As it reduces server load and decreases response time by using the cache available in a visitor's web browser. As mentioned cdn caching is also important. And to implement this you need a cdn provider. So make sure you sign up for providers such as stack path, cloud flare or others. Let's move on to the Google page speed section. Here you have the option to connect to the page speed insights API which lets you analyse the performance of your website. If you authorise this it does require you to connect your gmail account. Next let's talk about lazy load images. When lazy load images is selected images and other media elements only load when the user reaches that section which will reduce website load time. You can also consider disabling the three options below. When you are in your dashboard you can use your left sidebar to fine tune more specific settings for different types of cache. Lastly it is worth mentioning that sometimes the cache won't realise you have made changes or updated your site and instead of loading the new version of your site it will load the old version. You might then consider clearing your cache to ensure the newest version of your site loads as a form of troubleshooting. You will find options to clear cache at the top of your dashboard. I trust you now have a better understanding of caching and that you will find the right plugin that works for you. It is also worth mentioning it is best to enable caching after you have finished building your site. Visit Learn WordPress for more tutorials and training material.