W3 Total Cache - installation and configuration of a caching plugin for WordPress. Installing W3 Total Cache in WordPress


Hello, friends!

I haven't written for a long time. And today I will try to publish an article that will cover several of those that I could write in all the lost time.

Lately I've been puzzled by the goal of optimizing my site for maximum loading speed. It would seem that I have already done everything. But, analyze your resource with the service Google Page Speed ​​Insights, it turns out there is still work to be done.

I tried for a long time to achieve successful results following the recommendations of this service, but in some cases it did not seem realistic, since there are many plugins and scripts, style files that will somehow hinder the maximum loading speed.

And then I found out about the W3 plugin Total Cache, which automatically can do those tasks that would have to be done manually or would not be possible at all. I have installed this decision and managed to add more speed to the site + increase the score in the eyes of the Google PageSpeed ​​Insights service. Of course, this is not 100%, but maybe you can do it. The plugin may well help with this.

The material will be quite large. I would even say huge, since I will try not just to show where to put which checkboxes, but to explain each function in detail. And of course, it will not do without digressions towards explaining the importance of this or that function. In general, the goal remains the same - to create the best guide for the next plugin. I hope the material will help you. So let's get started.

Let's start by looking at the benefits, as they are worth understanding in order to switch to this plugin.

Benefits of the W3 Total Cache plugin

First, it’s worth saying that the main task of the plugin is to enable caching. Therefore, if you have caching enabled with another plugin, you can remove it when you switch to W3 Total Cache.

Caching is the recording of objects of various types into the cache (memory - in our case, a folder on the server) after their generation, in order to then issue these objects ( html pages, scripts, styles, pictures, etc.) are already in a ready-made form without the need to re-generate them and create queries to the database each time.

Various CMS (content management system engines) are dynamic sites. They consist of PHP code and constantly generate requests. In some cases, you can get rid of these requests by installing one of the caching plugins, thereby forcing the engine to show visitors ready-made pages from the cache. This significantly speeds up the site loading speed, which is a very important factor in search engine rankings. Google definitely pays a lot of attention to this factor and made it clear at the time.

After a short digression for those who did not know what caching is, we move on.

One of the advantages of W3 total cache is its functionality, which, in addition to standard caching, allows you to optimize all the required functions for maximum loading speed. And do this without third-party intervention in the site files, which will have to be done without the plugin itself. This, of course, simplifies the task for beginners, but at the same time it makes it quite complicated, since understanding the settings will be, I would say, very difficult. The fact that there is no Russification, such as in Hyper cache, is upsetting.

What kind of functionality is this?

  1. Firstly, you can optimize html, CSS and javascript files, which includes minimizing and combining all kinds of various files into one. This way you can significantly reduce the site loading speed + make the site code lighter;
  2. Second, you can enable client-side browser caching, database query caching, gzip compression, and other features that require intervention in site files.

Initially, I wanted to do all the minification of script and style files manually without using a plugin, but I was unable to do so. Not due to lack of knowledge, but due to the inability to do this in some special cases. The plugin coped with these tasks.

Another significant advantage of the plugin is that you do not need to insert various lines of code into the design template to enable caching. The plugin starts working immediately after its installation and activation.

The disadvantages of the plugin include some delay before loading the page. When we want to go to some page, we can notice a slight delay, as if the plugin was thinking about it, and then it produces a ready-made version of all kinds of data from the cache. Maybe it's something with my site in terms of loading. Try to track this moment at home and, if you really think about the plugin, then I ask you to unsubscribe in the comments.

Now we move on to the settings, of which there are quite a lot.

I note that not everyone will need to activate all the settings that I activated. As much as possible, I will explain what's what so that you understand what you need and what you don't. Why overload the site in vain if you can not use some functions? Therefore, we read the material very thoughtfully and carefully.

Let's get started.

After installing and activating the plugin, a new item will appear in the site’s admin panel.

Also, an item with the same name appears in the top administrative menu. Only it is needed not for plugin settings, but for clearing the cache of the site as a whole and its individual elements.

  • Purge from cache - removes the page we are currently on from the cache;
  • Empty all caches - clear the entire site cache;
  • Empty page cache - clear the page cache;
  • Empty minify cache 0 clear the cache of elements that have been minified (scripts, styles, html code);
  • Empty database cache - clear the cache of sql queries to the database;
  • Empty object cache - clear the cache object.

So, let's start from the very first item of the plugin settings (dashboard) and get to the last.

Dashboard settings item

As in any other plug-in or program on a computer, on this dashboard (functional) panel you can see various information about the plugin and how it works.

In this case, we see several blocks on which we can:

  1. See the price list for connecting other plugin features (paid support);
  2. Support the plugin different ways;
  3. Connect the plugin to work in conjunction with the MaxCDN file storage system to make downloading faster;
  4. View data on site speed;
  5. Monitor statistics on the speed of the site according to the Google Page Speed ​​service.

1 - options paid support; 2 - support the plugin in various ways; 3 - connect the plugin to work with MaxCDN; 4 - view site performance statistics; 5 - connecting the Google pagespeed service to view performance

Also on the Dashboard tab, you can manage clearing the cache, both of the entire site with all its elements (style files, scripts, etc.), and the cache individually.

You can also view information about the installed plugin modules and its compatibility (compatibility check button).

As for the first point, it is simple. We won't do anything on it for now. Let's move on to the main settings, where we can already customize the work of the plugin to suit our needs.

General Settings

In the main settings we enable the functions we need, and then in the following paragraphs of the plugin settings we can configure each function individually in more detail.

Each settings item consists of several blocks, which includes settings for working with each type of site element.

General block

  • Toggle all caching types on or off (at once) - this checkbox serves as a switch between the active and inactive states of all checkboxes for each caching type. If you need to enable all cache types, then check the box and save the settings (Save all settings). All cache types are disabled in the same way in the “General settings” item - you just need to uncheck the checkbox and save the settings. I don't recommend enabling this setting since we don't use everything;
  • Preview mode - preview mode of the plugin. If you want to first test the work of the plugin so that no one (except the administrator) can see the results of its work, then activate this mode by clicking on the "Enable" button. If you want to make the work of the plugin visible to everyone, then disable this mode (disabled by default).

Page Cache block

In this block we indicate whether caching will work for site pages and what caching method will be used.

Since the main function of the W3TC plugin is caching, we must enable the function ("Enable" checkbox).


  • Page cache method - caching method. The default option is "Disk: Enhanced", which implies that you are using shared hosting. This option is marked as the best, so we use it.

You can also choose the "Disk: Basic" option if you have low-cost, weak hosting. If you notice that after selecting the recommended option (Enhanced), the site begins to work noticeably slower or some functions are slow, then install the Basic option.

You can also choose other options, but I recommend leaving the default option.

Minify block

In this block we can minify CSS, Javascript and html files.


Of course, we enable the setting by activating the “Enable” checkbox next to the “Minify” item.

  • Minify mode - select the minimization mode. The default option is "Auto", which means that all file minimization will occur automatically. It’s better to leave this option if it works fine. In my case, there are scripts that are loaded from other services and when they are minimized by this plugin, conflicts occur due to which some functions stop working. Therefore, as you can see, I chose the “Manual” minimization option, which we will configure a little further in the “Minify” plugin settings;
  • Minify cache method - select a caching method for this function. Leave the default option "Disk";
  • HTML minifier, JS minifier, CSS minifier - these items are responsible for choosing the minimization method. The default options do the job well. But, if you see that some functions are not working correctly, for example, the script has stopped working or the styles have gone wrong, then try changing the minification method to the corresponding files. I left everything as default.

After all the changes made, do not forget to save the settings.

Database Cache block

Here we can enable caching of some SQL queries to the database, thereby increasing the site loading speed.

  • Database Cache - enable caching of queries to the database by activating the "Enable" checkbox;
  • Database cache method - similar to previous methods For caching, leave the default option (Disk).

This feature is worth turning on to enable object caching to further reduce execution time for common operations.


I did not activate this function, since it will not help speed up the site if virtual hosting (shared server) is used. If you are using a dedicated server, then enable it.

Regarding the caching method, we set the same “Disk”.

Browser Cache block

This item enables browser caching on the client side. When a visitor accesses your site, all the site elements are generated for him, which takes quite a long time in some cases. If you enable this checkbox, which must be done, then when you access the site again, most of the objects will be taken from the browser cache and the requests will be several times less, and maybe ten times less, which has a significant impact on the loading speed.

Be sure to enable this setting.


But there is one subtle point. It is not always necessary to enable this setting. It needs to be activated if your hosting does not add it by default necessary headers to your server configuration to enable browser cache.

It's easy enough to check. You can use the same service Google PageSpeed ​​Insights. Enter the site address on the server page and look at the verification result.

If you see that the browser cache is in the red zone and marked as “Must be corrected,” then your browser cache is not working right now. But this is not accurate either, since the hosting may add a browser cache header that Google simply does not recognize in this tool. It turns out that there is a browser cache and it is enabled on the hosting, but Google does not see it. This also has a very positive effect on loading speed. Therefore, do not be alarmed that this service does not see caching.

To understand whether the browser cache is enabled or not on your hosting, I recommend enabling the caching setting in the W3 total cache plugin and checking the site again in this service. If it shows that caching is enabled or is no longer in the red zone, then the browser cache is not activated on the hosting by default and can be enabled manually, either using a plugin, or by adding a certain header to the .htaccess file. In our case, the plugin itself adds certain headers to this file without our intervention.

If it shows the same result, then your hosting most likely already has some kind of header installed to enable the browser cache, which is not recognized by Google PageSpeed ​​Insights and which you cannot overwrite, since the configuration is set by the host itself. To make sure that the browser cache is enabled on your hosting, I advise you to contact support. I did so and it turned out that caching works for me using the eTag header, which the Google service does not recognize.

I tried to write all kinds of directives using this plugin and still the headers were not added, since the hosting functionality is working, which I cannot rewrite. But browser caching on the client side works and that's good news. Therefore, I simply ignore the recommendation that this moment needs to be corrected, since I know that everything works for me. Without contacting the support service, I would have been trying for a long time to bring everything to fruition, not knowing that everything was fine anyway.

Be careful with this setting. Do as I described above.

  1. Checking the site;
  2. If the browser cache is disabled, then enable it in the plugin;
  3. If, after re-checking, the service still complains and there are no changes at all, then we contact hosting support to find out whether caching is enabled in the browser on the client side. If enabled, then this setting can be omitted and the readings from the Google PageSpeed ​​Insights service regarding this item can be ignored. If not, then we ask your host to enable the browser cache, as this is one of the most important settings for optimizing site speed.

So, I hope that I was able to describe in general terms when you need to enable this option in a plugin, and when there is no point.

By the way, after enabling this function, you need to make sure that the plugin is set to required settings to add the required headers to enable the browser cache. By default, they seem to be active immediately after activating the plugin. But we will get to them a little later in paragraph 8 of this article.

CDN block

Using this settings item, we can download static files of our site not from our hosting, but from the content delivery system. In this case, this is the MaxCDN system (or its analogues, for example Amazon S3). It is paid and I assume that hardly anyone will pay for it, even though it costs mere pennies.

If you still decide to take this step, then activate the “Enable” checkbox and select your preferred CDN. I recommend MaxCDN and Amazon S3.


As far as I could understand, this item is similar to the item using CDN, when files are cached not on your hosting, but on another cloud storage. At this point you can specify the servers to which caching will occur.


Monitoring block

You can enable site performance monitoring with the New relic system. But then you will have to create an account in it and get an API key, which should be entered in this plugin settings block.

Licensing block

This block contains a field in which you need to enter a license key, which is issued after you have made a paid subscription to the plugin. If you did, then enter the key in the field.


Miscellaneous block (miscellaneous)

In this block, the only thing that should interest us is activating the site performance monitoring function together with the Google pagespeed service. To do this, we check the appropriate checkbox and enter the key, which can be obtained from the link below the input field.

The rest of the settings can be left untouched. We especially don’t touch them if we don’t know what they are about and in what case they need to be changed. I am one of those who don’t know, that’s why I don’t touch them. By default they are in a state acceptable to us.

I won’t tell you how to get this API key yet, since I haven’t bothered with this issue and haven’t used the monitoring function. Let me just say that you need to follow the link that I pointed to in the screenshot above and do the necessary actions there.

Maybe in the future I will deal with this point and then I will certainly update the information in this article to make it more complete.

Debug block

By activating the checkboxes in this block, in source code At the very bottom of the page, debugging information will be displayed for each item that we activated in this block.


Here's what it looks like in source code.


I do not enable these settings so as not to unnecessarily load the site and not display this information for prying eyes.

Import/Export Settings block

This is the last block of settings in the General settings item, in which we can export the plugin settings to a file, so that we can then upload this file to another site using a similar function, only this time importing. This will save time without having to configure everything again.

You can also reset all W3 total cache settings to their original state, which is available immediately after installing and activating the plugin.


  1. Import settings from a configuration file;
  2. Export settings to a configuration file;
  3. Reset settings to original state.

We've covered the basic settings. Let's move on to the next point.

Page Cache

At this point we configure how and what will be cached in relation to our pages. As in the previous paragraph, there are blocks that divide the settings into their categories. Let's move on to the first block.

General block

Here we configure what will be cached in relation to pages: what types of pages and for what user roles.

As you can see, I cache all types of pages. The last checkbox is responsible for deactivating caching for certain user roles. If we don’t want authors or editors not to be given ready-made (cached) pages, then we activate this option and select the necessary roles.

Cache preload block

As far as I could understand, in this block we can activate the preliminary entry of a published page into the cache even before visiting it, that is, there is no need to go to it and create a request for its generation so that it is entered into the cache.

We enable all checkboxes.

  • Automatically prime the page cache - automatically create a page cache;
  • Preload the post cache upon publish events - preload the page into the cache immediately after the moment of its publication.
  • Update interval - a time interval at which a new batch of cached pages is created once. The value is set in seconds. The value 604800 is one week. You can set a smaller interval. Here, experiment and monitor the load on your site on your hosting. Now I have set the default value to 900 seconds;
  • Pages per interval - the number of pages that will be cached in the previously specified time interval. I didn't change anything. The default value is 10;
  • Sitemap URL - specify the path to the XML sitemap. From this map priorities will be determined for different types pages and caching will occur according to them.

Purge policy: Page cache block

In this block, we set the settings for clearing the cache, namely clearing certain types of pages when creating new documents, editing them, or adding new comments to pages.

This is very important so that, for example, when a page is edited and new content is added to it, it is re-entered into the cache and an already modified version of the page is displayed, and not the one that was before the edits.

At this point everything is quite simple and you don’t need to change anything. Here are my settings.

Advanced block

More advanced settings are already being made here. I recommend not changing them, since the standard settings in all advanced options of any solution (plugins, programs, etc.) are set in a configuration that suits the user in “standard mode,” that is, everything is suitable for use under normal conditions.

But still, I used some functions, which I will explain to you now.

The first setting does not turn on for me, so I could not turn it on. There is no need to do this, because... The description of the option says that it can increase the site response time. And we don't need it.

  • Compatibility mode - compatibility mode. The developers say that by enabling this option, site performance may drop by about 20%, but in return we will get higher compatibility of the plugin with most hosting providers. I recommend enabling this setting, which is what I did;
  • Charset - this setting solves the problem with possible problems in the encoding of already cached pages. I turned it on;
  • Garbage collection interval - interval for clearing garbage (cache that has expired). The default value is 3600 seconds (1 hour). That is, every hour the cache that has expired will be cleared. The cache will be deleted and a new one will begin to be created. For busy sites (where there is little space on the hosting, but many pages, that is, in the future there is a lot of cache), small values ​​are recommended. I set the value to 1st day (86400 seconds) and so far everything is working well.

In the following fields of the advanced settings block, you can add your own exceptions to prohibit/allow caching of certain pages/directories according to the specified parameters:

  • Accepted query strings - indicate the strings with queries and URLs on which these queries will be made and will always be cached;
  • Rejected user agents - we enter those user agents that will never be given cached pages (agents are essentially the devices the user is using, for example an Apple 5 iPhone);
  • Never cache pages that use the specified cookies - never use cache for pages that use specific cookies;
  • Never cache the following pages - never cache the following pages. We indicate those pages that should never be cached;
  • Cache exception list - list of cache exceptions. Here we indicate those pages/directories that need to be cached even if they were added to the item previously “Never cache the following pages”;
  • Specify page headers - specify page headers given by the server, which should also be cached.

Minify

In this settings item we will configure the minimization parameters of our pages, scripts and CSS styles. Whether to use minification on your site is up to you. But you must understand that minimizing all elements that are constantly loading significantly reduces their size, which affects the loading speed of the site.

And, as we know, site loading speed is now taken into account when ranking in search engines. But here you also need to have a certain line. There is no point in minimizing if we don’t see much effect from it. Everything should be harmonious. And clean nice code and its small size to boot quickly. That’s why I disabled this section for myself at this stage, since I didn’t notice much of an effect, although there were improvements. On another site, when I create it, I will try to completely minimize everything to the maximum and see what comes of it.

As in the previous settings of the W3 Total Cache plugin, there are blocks and each of them is responsible for minimizing a certain type of element on the site.

General block


  • Rewrite URL structure - this option is active by default. So I left her. Responsible for rewriting the URL structure for CSS and Js files;
  • Disable minify for logged in users - deactivate minification for logged in users. If you activate this setting, then for you, as an administrator (a site user logged into your account), minimization will not be applied. But for other visitors, minimization will work. Here we put it at your discretion, but I didn’t include it;
  • Minify error notification - notification about minification errors. If you want the plugin to notify you about errors during minimization, then select a notification method in the drop-down list on the right. There are 3 notification methods: in the admin panel (admin notification), by email (email notification) and the last combined option.

HTML and XML minification block


Opposite the "HTML minify settings" item, set the parameters according to which the HTML and XML will be minimized on the site page.

  • Enable - enable minimization;
  • Inline CSS minification - minify CSS so that everything is built compactly on one line. Spaces and indentations are removed in places where they can be removed. This makes the code very compact without unnecessary white space, which reduces its size;
  • Inline JS minification is the same, only for JS elements (scripts) on a site page;
  • Don't minify feeds - do not minify feed channels. I would minimize them, so I did not activate the option;
  • Line break removal - remove line breaks in the code. When we remove all indents and empty spaces in the HTML code using the 2nd and 3rd settings, the code will already be compact, but there may be line breaks. To remove these hyphens, we activate the last setting and the code will become one line. IN Google browser chrome, you will not see one line in the source code of the page, but the merged code will simply be shown. To make sure the code is on one line, check the source code in your browser Mozilla Firefox- it displays the way everything really is.

Ignored comment stems - ignore comments when minimizing page code. When minimizing, comments in the code are always removed, since they do not carry any information search robot. But there are comments that carry a semantic load. These may be different codes simply in a valid form, which makes them ordinary comments, but in fact they work.

By default, the first 2 exceptions are added to this field, which are often found in the code in such a form that they are made into comments. I also added a 3rd option - noindex. In my template, quite a lot of places are closed with this tag. But I didn’t close them in the standard form ( ), and in the valid version (<--noindex-->). Such a valid option is perceived as a comment in the code\

And, if I had not included this tag in the exceptions, it would simply have been removed from the source code, which is absolutely not necessary for me.

JS (Javascript, scripts) minimization block

As with minimizing the page code as a whole, we can configure the minimization of scripts individually. To enable it, activate the "Enable" checkbox.

In the "Operations in areas" settings block we can choose 2 options for script optimization:

  1. Or their complete minimization (minify);
  2. Or combine only.

I prefer to choose the most stringent option when I can minimize it to the maximum. Therefore, I chose the first option.

Next, we remove all comments from the scripts (Preserved comment removal) and line breaks (Line break removal) so that the script is lined up on one line. These 2 options do not work with the combination only option.

A rather interesting setting item in minification is the “JS file management” option, which allows you to control the location of scripts in various theme file templates.

What I mean. For example, there is my current template. It contains file templates responsible for each type of page (categories, home, article, and so on). And, knowing the file path of a specific script, we can assign it a different location on each type of page. This is very convenient, since most scripts can only be placed on one type of page, for example, only on the articles page. It turns out that these scripts need to be loaded only in articles. Why do they need to be loaded on other types of pages? That's right, there's no need.

How to use this option? First, we select the template we will work with and click on the “Add script” button.


A field will appear for entering the address to the script file (1), for selecting a template for displaying a certain type of page (2) and for selecting the placement location (3).

When choosing the script location area, we can choose 3 options for its location:

  1. In the header section of the site (head section). In this area, I recommend placing only those scripts that do not work in the bottom area of ​​the site (before the closing body tag);
  2. After the opening body tag;
  3. Before the closing body tag. This is the option I recommend using so that the scripts are loaded into the very last area.

We can add a lot of such scripts. By clicking the "Add a script" button again, another field will appear for adding a new script. This way we can make sure that on each type of page only those scripts that are needed there will be loaded. As a result, the download speed will be increased. The setting is very interesting and is worth using if a lot of different scripts have been added to the site, which perform their own function on each page.

The only thing that may have to be done for each script is separate file or combine the scripts that will be loaded together into one file. For example, on the post page, I load scripts for the up button and for enlarging images when clicked. I combine these scripts into one JS file and place it before the closing body tag using the above option.

All other scripts are loaded either on regular pages (not articles) or on the main page. I will also combine them and add them to the option under consideration.

Don't forget to use the "Verify URL" button to check the correctness of the address to the script file.

You can also control the loading of scripts manually using various codes, but we will look at this in another article about manually optimizing site loading speed without using any plugins.

Minifying CSS style files

Everything here is the same as in the previous block of settings related to minimizing scripts. We do everything exactly the same. The only thing is that I can’t tell you anything about the “@import handling” option. I haven't figured out what it affects. Didn't touch her. You will do the same.

For the rest we set it as in the screenshot below.


The settings are similar to the advanced options block in the “Page cache” plugin settings item, which we reviewed earlier. It's just a little compressed.

Here we can set time intervals between loading and updating external files in the cache (1) and time intervals for clearing files whose cache has already expired (2). In both options I set the values ​​to 86400, that is, 1 day.

The remaining fields concern exceptions.

  • Never minify the following pages - never minify the following pages;
  • Never minify the following JS files - never minify the following JS files. I recommend using this field if conflicts occur after minimizing scripts. It is possible that minimizing a script leads to conflicts and because of this, all scripts stop working. To do this, we identify the problematic script and add it to the exceptions;
  • Never minify the following CSS files - never minify the following CSS files;
  • Rejected user agents - specify user agents that will never receive minimized data.

Database Cache

In this W3 Total Cache plugin settings item, we can enable caching of some database queries. Also very interesting feature, which is not present, for example, in the Hyper Cache plugin.

I did not touch this item of settings in terms of changing any values ​​because I am not an expert in this matter and I believe that the standard values ​​are always set in an acceptable range. Therefore, I advise you not to touch anything. Here, in principle, there is no need to touch anything. Especially if you don’t know how the site functions in terms of database queries.

We simply activate caching of database queries in the “General settings” item of the plugin settings and remove the effect.

Object Cache (object caching)

As mentioned earlier, this function will not increase the loading speed of the site if it is hosted on regular shared hosting. Since this is exactly my case, I did not activate it at the very beginning in the “General settings” item.

If you are using a dedicated server, then enable this option. There is no need to configure anything, since the default values ​​are set correctly.

Browser Cache (browser cache)

One of the most important points in the plugin settings, or rather one of the most important things in speeding up the site. What’s what and what it affects I wrote earlier in the same material. If you have not read the entire material, then you will be transferred to where I described everything.

So, when you understand that you need to enable browser caching (your hosting does not enable it by default), then you can configure this item. Otherwise, you can simply skip it and disable it at the very beginning of the settings in the “General settings” item.

In this settings item there are several blocks, each of which is responsible for caching certain site elements (scripts, styles and HTML with XML). In addition to these blocks, there is also a General block, which is responsible for general caching settings in the browser.

If we set some parameters in the General block, then they are automatically set in all other blocks below. Therefore, if we make the same settings everywhere, which is what I recommend, then we configure only the first General block, and all other blocks will be set automatically with the same parameters.

If it is necessary to set individual parameters in some block, then after assigning general settings, we return to the desired block and set it at our discretion.

Let's now set up browser caching if you really need to enable it.

I've highlighted with a green box the headers that might enable client-side browser caching. Select one of them if you want to enable this option. There is no point in including all the headings; one is enough.

I chose the "Set expires header" function since it is the most common. The same can be said about the first heading in the list of these items. It can also be selected.

By the way, if you use Makhost or Eurobyte hosting, then you can safely disable the caching setting in the browser, since it is enabled by default on these hosting sites. And in general, any more or less normal, and even more so popular, hosting provider includes this aspect in its work. You just need to make sure of this by asking the support itself.

Enable HTTP (gzip) compression is also an important setting, which is again active by default on most hosting sites. It compresses all data and places it in an archive compressed format gzip. Browsers can recognize content in this format. This way the client does not load all the information into full size, but only in a compressed format, which significantly reduces page loading time.

To check if gzip compression is enabled on your hosting, just ask your hosting or follow this link and check your site.


If you see exactly the same picture, then gzip compression is enabled and there is no point in enabling it additionally in the plugin settings. If instead of “Yes” you see “No”, then the setting will have to be activated.

As you can see, compression reduced the data size by 74.1%. I have highlighted this moment with a green frame.

We can leave the rest of the settings in the browser caching settings block on the client side intact. Our main task is to enable caching if the hosting does not enable it by default. The same is true for gzip compression.

In addition to the main set of settings in the browser caching settings blocks for specific types of elements, we can configure the lifetime of headers on the client side. Let's take the "CSS & JS" block as an example.


Other blocks have the same item. I recommend leaving the default values. For scripts, style files and media files, maximum values so that the user can store them for as long as possible. But regarding pages, the value is 3600 seconds - the minimum header life interval on the client side.

User Agent Groups

As far as I understand, at this point we can make redirects for certain user agents. For example, we can redirect them to another domain or show them a different theme.

By default, 2 groups are created, which contain the most common user agents. Each group has its own priority. You can change the priority of a group by dragging it higher or lower in the list of all groups.

Each group has its own redirect settings.

Let's look at the example of a standard group, which is created by default and has a priority of “high”.


To activate, check the "Enable" checkbox.

In the Theme item, we select the theme that will be shown to visitors who come from the user agents specified below in the "User agents" field. Sometimes this is advisable when it is created for a mobile version separate template and, to avoid showing the full version of the site to visitors from these mobile devices, a special mobile template was shown. Although in fact it is easier and more competent to do responsive template, which will itself adjust to the resolution.

In the "Redirect users to" section, indicate the domain to which you want to redirect the visitor. The application is reasonable in the same case with the mobile version of the site. There may be a full version of the site on the main domain, and a mobile version on a subdomain. Then specify the subdomain in this field and a visitor who comes from one of the specified user agents will be redirected to the mobile version of the site.

Referrer Groups

The same as the previous point, only redirects work not for user agents, but for certain “referrers” (sources linking to us.

For example, the user came from the Google search engine. In this case, the Google site is the referrer. You can set a redirect for it. Same for other sites.

Honestly, I don’t know where this functionality could be applied, but since the developers have implemented it, then it has a place to be.

The setup principle is similar to the previous point.

CDN

This item will be useful to you if, along with your website, in addition to regular hosting, you will also use a content delivery system (CDN).

The bottom line is that such systems/services can significantly reduce the load on hosting and withstand any volumes of traffic without sagging the site itself. Therefore, if the site is really huge and heavily loaded, then this is really a reason to think about either moving to a dedicated server, or connecting one of the CDN systems (for example, MaxCDN or Amazon S3).

By tradition, the settings are divided into several blocks.

General block

Here we check the boxes next to the types of files that will be processed by the CDN. I have selected all file types here except for the last item, since it is not responsible for the file type, but for adding a certain “canonical” header to them. Apparently, this is similar to the rel="canonical" attribute that is added to the main page. But still, this setting is disabled by default, so I would not touch it.

Configuration block

You can also enter the host (server address with CDN) that will replace the address of your domain in the site code. I marked where I need to add it with a green frame.

By clicking on the "Add CNAME" button at the bottom of the input field, you will add some more fields that will be responsible for replacing the address not in all hosted elements of the site on the CDN, but for certain ones, for example, for replacing the address in script files located in the Head section of the site. The same goes for scripts placed before the closing body tag and so on. The very first field concerns style files.

Advanced block (advanced settings)

In this block, the main task is to indicate the types of files that should be processed via CDN. The items highlighted with a red frame already list the main file types that are often used on sites, but you can add some more file types.

They are added in the “*.extension” format, for example “*.xls”. Each type is written separated by a semicolon (;).

  • The "Custom file list" item indicates the directories and file types located in them, which should also be hosted on a CDN. Here are directories that are different from the theme folder and the wp-includes folder, which are processed by the plugin by default (highlighted in red frames).
  • In the "Rejected user agents" field, enter the names of user agents that should not receive data from the CDN. They will be given original data from the hosting.
  • The "Rejected files" item contains directories with file types that should not be used in conjunction with a CDN.

Monitoring

If we enabled the site performance monitoring system in the "General settings" settings item, then we can make some settings here. Although, I would not recommend changing them too much. It's better to leave everything as is.

The only thing worth remembering is that to activate this monitoring system you need to register and enter special key in the corresponding block in the "General settings" item, and also activate the "Enable" checkbox.

I wouldn't touch the settings.

Extensions

At this point we can configure the plugin to work with some extensions. I would not see the point in this point if it were not for the presence of such an extension as “Wordpress seo by yoast”.

By activating it, we can configure the operation of the W3 Total Cache plugin in accordance with the recommendations of the WordPress seo by yoast plugin. This item can already be activated, but considering that I have this plugin, this is more than relevant.


FAQ (help)

As expected, answers to all sorts of questions are included. Of course they are in English, but no one has canceled Google translator yet.

You will not be able to discuss all other issues with support unless you pay at least the minimum subscription of $75, which is quite expensive for us.

Install

Here we can see instructions for installing some additional functions, as well as recommendations for their correct use. I believe that this section is strictly prohibited for a beginner)

About

If you want to know all the features of the plugin, then in this section they are described in a step-by-step list. This is actually a page about the plugin.

That's all, friends. This completes the analysis of the W3 total cache plugin. I hope that it helped you configure the plugin in a way that suits your site better.

The plugin is really good, although a lot could be removed, as for me. That's all. If you have any questions, then write them in the comments. And don't be afraid that the question will sound stupid. This is what I am here to do, to correct you and help solve your problems to the best of my ability.

The material was written for quite a long time and it was very difficult to write it yourself, since I studied and tested many functions of the plugin right while writing the article. I hope it turned out well. If something is wrong, correct it. This is always welcome.

Next up are detailed materials on creating an adaptive version of a website template so that you have a mobile version and a couple more educational materials on making money on websites and creating them. It will be interesting.

See you later.

Best regards, Konstantin Khmelev!

Have questions? Write a comment!

Hello! Today we will look at a popular plugin – W3 Total Cache, designed to speed up a website by caching files. The plugin has a large arsenal of additional functions that you can customize based on your preferences. Main functions of the plugin:

Compatible with any type hosting.

Connectivity and CDN management(content delivery network).

Mobile device support and user agents.

File compression, HTML, CSS, JavaScript.

Browser caching using cache control.

Caching http database requests.

Object caching function.

You can install the plugin directly from the WordPress admin panel. Go to the page: Plugins – Add new, enter the name of the plugin in the search form, press Enter, install and activate the plugin.

After installing and activating the plugin, go to the page: Performance. Additional information about the plugin is displayed here; you do not need to configure anything here. If you have a notification displayed at the top, then click on the button – Hide this message to hide the notification.

Settings

Toggle all caching types on or off (at once), If you check the box here, you will immediately enable all the functions at the same time that are presented on this page. It is better to configure all functions separately, since you may not need many of them.

– Preview mode, you can enable preview mode to check the script configuration. Designed for testing settings, does not have to be turned on. If you turn on the mode, then when you click on the Preview button, your site will open and you will be able to watch how it works when you enable a particular function.

Save settings.

– Page cache, check the box to enable caching of pages on your site.

– Page cache method, here you can select the page caching method. Basic – standard caching, Enhanced – improved caching, Memcached – caching for multiple servers. For a regular site, leave it as default.

Save settings.

– Minify, check the box to enable minification of HTML, CSS, JS files to speed up the site.

– Minify mode, file minimization mode, it is better to select Auto to automatically compress files. Manual – manual mode, you will need to specify which files to compress.

Other settings leave it as default. Save settings.

– Database Cache, check the box to enable database caching to reduce http requests and reduce the response time of pages and records.

– Database Cache Method, caching method, leave it as default for regular sites. Memcached - if you have several servers. Save changes.

– Object Cache, check the box to enable object caching to further reduce the time it takes to complete common operations.

– Object Cache Method, leave the caching method as default. Save settings.

Browser Cache, check the box to enable browser caching, reduce server load and reduce response time when using the cache in the site visitor's browser. Save settings.

– CDN, you can enable the CDN function – Content Delivery Network, but it is not required. The function allows you to place files on another server to reduce the load on your server. CDN is a paid service. You will be asked to register with the MaxCDN service and receive a 25% discount.

– CDN Type, here you need to select the name of the service where you enabled the CDN function.

– Enable varnish cache purging, you can enable caching of the varnish function if you use it on your site. Varnish is designed for very large sites with very high traffic, such as Facebook.

– Varnish servers, here you will need to specify the IP address of your server on varnish.

– New Relic, you can connect server monitoring, user monitoring, mobile monitoring. The function will allow you to monitor server processes and user behavior, etc. It is not necessary to enable the feature. Monitoring is a paid feature.

– License, if you purchased Pro version plugin, then you need to enter the license key here and save the settings. For the free version, simply skip this field.

Enable Google Page Speed ​​dashboard widget, you can enable support for the Google Page Speed ​​service so that a widget with service results is displayed on your main page of the admin panel. To connect the function, you need to enter the API key; to do this, click on the tab - APIs Console.

– Verify rewrite rules, there should be a checkmark here.

– Enable file locking, enabling file locking, is not recommended for an nfs system. Leave unchanged.

Optimize disk enhanced page and minify disk caching for NFS, You can enable this option if your hosting uses the NFS network file system. To improve performance.

– Enable Edge mode, DO NOT click on this tab, testing an experimental plugin feature may cause an error. Save settings.

– Debug Mode, you can enable debugging mode to receive information (logs) about the operation of the plugin. If you enable this function, the logs can be seen in the source code at the end of the page after the comments. The function can allow you to identify problems in the operation of the plugin and fix them, it is not necessary to enable it.

– Import/Export, you can export or import plugin settings to or from another site. To export from another site, click on the button – Select file. To import to another site, click on the button – Download.

Page Cache

– Cache posts page, check the box to cache WordPress posts.

– Don’t cache front page, check the box if you don’t want it to be cached home page your site.

Cache feeds: site, categories, tags, comments, If you use an RSS feed on your site, then check the box to cache it.

– Cache SSL (https) requests, check the box if you are using an SSL security certificate, https.

Cache URIs with query string variables, You can enable caching of the search results page for your site.

– Cache 404 (not found) pages, you can enable caching of the 404 error page, but it is not necessary.

Cache requests only for q951123r.bget.ru site address, Check the box to cache requests only with your site address.

Don’t cache pages for logged in users, If this checkbox is checked, pages for authorized users will not be cached. If there is no registration on your site, then you don’t have to enable it.

Don't cache pages for following user roles, You can choose for which specific user roles not to cache pages. Check the boxes next to the user role. Save settings.

Automatically prime the page cache, check the box to enable automatic creation page cache and specify a time interval.

– Update interval, specify here the time interval at which a new page cache will be created. Please note that the shorter the interval, the greater the load on the site. The best option is 84600 approximately every day.

– Pages per interval, here you can specify how many pages will be cached in one session. Do not indicate many pages, because more pages, the greater the load on the site, it is better to leave it as default.

– Sitemap URL, enter your URL here XML maps, if you are using it.

Preload the post cache upon publish events, Check the box here to cache the newly published post.

Specify the pages and feeds to purge when posts are created, edited, or comments posted. The defaults are recommended because additional options may reduce server performance. Here you can mark the pages and channels that will be updated when new posts are created. For example, if you check the value – Post comments pages, then when a new comment is added to the page, the page will be updated. It is not recommended to check all the values, as this can create a serious load on your site, check only the main elements.

Specify the feed types to purge, Here you can note the types of update feeds that are available on your site.

– Purge Limit, the limit of pages that should be updated at a time, leave it as default.

– Additional pages, you can specify additional pages for updates that are not listed above.

– Purge sitemaps, indicated here regular expression for XML map, if you use it, leave it as default.

– Late initialization, provides support for WordPress fragmented caching functionality. Enabling the function may increase server response time, so it is better not to enable it.

– Compatibility mode, check the box to enable compatibility mode. Enabling the feature reduces site performance by approximately 20% in exchange for site compatibility with the plugin. If you have no compatibility issues, do not enable this feature.

– Charset, by checking this box you will disable UTF-8 encoding. Check the box only if there are problems with the encoding; scribbles are displayed instead of text.

– Reject HEAD requests, can be disabled http caching chapter requests, on most sites this function is not active, skip it.

– Garbage collection interval, specify the time period for clearing expired cache, the recommended value every day is 84600.

– Comment cookie lifetime, the lifetime of cookies is indicated here, the recommended value is once a day – 84600.

– Accepted query strings, you can specify here URLs that should always be cached.

– Rejected user agents, you can specify here user agents for which you do not need to cache pages, for example – Google.

– Rejected cookies, specify here the page cookies that will not be cached.

– you can specify the address of directories or sections of the site that will not be cached.

– Cache exception list, specify here the addresses of pages that will be cached even if they are in a section that is closed from caching.

– Non-trailing slash pages, cache page data even if they do not have a slash ending, a slash at the end of the address /.

– Specify page headers, you can specify additional page headers for caching.

Minify

– Rewrite URL structure, rewrite the URL structure, leave it as default.

Disable minify for logged in users, disable compression for registered users. At large quantities registered users should not disable compression.

– Minify error notification, specify here – Email Notification to receive notifications by Email if errors occur when compressing files.

– HTML minify settings , Enable – check the box to enable compression, Inline CSS minification – check the box to compress CSS files, Inline JS minification – check the box to compress JS files, Don't minify feeds – if check the box, then RSS the tape will not be compressed, Line break removal – check the box to remove empty spaces in files.

– Ignored comment stems, comments that contain these conditions will not be deleted. google_ad_ google advertising.

– JS minify settings, enable compression JavaScript files, the default value is recommended.

– CSS minify settings, enable CSS compression files, the default value is recommended.

Disable minify automatic file name length test, disable automatic compression of test file name length, leave it as default.

– Update external files every, interval between downloading and updating external files. Leave the default 86400 – once a day.

– Garbage collection interval, deleting expired cache data. Leave the default 86400 – once a day.

Never minify the following pages, indicate here the pages or sections of the site that do not need to be minimized or compressed.

Never minify the following JS files, indicate here the JS files that do not need to be compressed.

Never minify the following CSS files, indicate here the CSS files that do not need to be compressed.

– Rejected user agents, specify here the user agents that will not receive compressed content, example – Google, Bing, etc.

Include external files/libaries, Specify here the external files/libraries that should be merged. Save settings.

Database cache

Don’t cache queries for logged in users, Don't cache requests for logged in users must be enabled to support the default WordPress behavior.

Maximum lifetime of cache objects, here you can specify the maximum lifetime of the object cache. The lower the value, the greater the load on the server. I recommend setting the time period for all such values ​​once a day – 84,600.

– Garbage collection interval, specify here the interval for collecting garbage and outdated files. Recommended – 84,600 times per day.

Never cache the following pages, indicate here pages or sections that should never be cached.

– Ignored query stems, do not cache queries containing this data.

– Reject query words, do not cache queries containing these words or regular expressions.

Object cache

Default lifetime of cache objects, default object cache lifetime. I recommend specifying 84,600 – once a day.

– Garbage collection interval, garbage collection interval. I recommend specifying 84,600 – once a day.

– Global groups, indicate global groups for caching in network mode, leave it as default.

– Non-persistent groups, specify here the groups that should not be cached.

Browser Cache

– Set Last-Modified header, there should be a checkmark here so that the set of the last modified header on your site is available to the browser.

– Set expires header, you can set the expires header to encourage the browser to cache files more often, but this is not necessary. It is not recommended to enable this as it will increase the number of requests to your site.

– Set cache control header, you can enable the cache control header function, which will be added to htaccess file, not necessary.

– Set entity tag (eTag), adding eTag tags to headers to stimulate browsers, is optional.

– Set W3 Total Cache header, installing a general header cache is optional.

– enable GZIP compression, then disable this option.

– disable caching of objects after changes; it is not necessary to enable it.

Prevent caching exception list, list of exceptions to disable caching.

Don't set cookies for static files, do not set cookies for static files, not required to be enabled.

Do not process 404 errors for static objects with WordPress, Do not handle 404 errors for static objects with WordPress, not required to be enabled.

– 404 error exception list, list of exceptions for 404 errors.

You may not enable browser caching in the plugin, just add it to enable browser caching.

– Set Last-Modified header, set of last-modified header for CSS and JS files, must be enabled.

– Set expires header, check the box to specify the lifetime for the expires header in CSS and JS files, optional.

– Set cache control header, enabling the cache control function for CSS and JS files is optional.

– Cache Control policy, leave it as default.

– Set entity tag (ETag), adding ETag tags to the headers of CSS and JS files is optional.

– Set W3 Total Cache header, a common cache for headers of CSS and JS files, optional.

Enable HTTP (gzip) compression, You can not enable it if your site already uses gzip compression, link above.

Prevent caching of objects after settings change, prohibiting object caching after changes for CSS and JS files does not have to be enabled.

Disable cookies for static files, do not create cookies for static CSS and JS files, do not need to be enabled.

– Set Last-Modified heade, set of last-modified header for HTML and XML files, must be enabled.

– Set expires header, check the box to specify the lifetime of the expires header. Recommended duration is 84,600 seconds.

– Set cache control header, you can set the control header cache, cache control for HTML and XML files, optional.

– Cache Control policy, leave the cache control policy as default.

– Set entity tag (ETag), you can add an ETag tag to the header to encourage browsers.

– Set W3 Total Cache header, installing W3 Total Cache for the header is optional.

Enable HTTP (gzip) compression, enable gzip compression only if you are not currently using it on your site.

– Media Other Files, here you can enable the function – Set expires header to specify the lifetime of the media file cache, leave the lifetime at default. If GZIP compression is already enabled on your site, then disable the function - Enable HTTP (gzip) compression. Leave the rest of the settings as default. Save your changes.

Other settings

– User Agent Groups, here you can create a group of user agents to create a cache specifically for each selected device or group of devices. You can specify a topic or domain to which a redirect will be made when the specified device is detected.

– Referrer Groups, the same as above, only for search engines and browsers.

– CDN, if you are using the CDN (Content Delivery Network) function, then you can configure the parameters of this function here. It is not necessary to use this function.

– Monitoring, setting the parameters of the monitoring function. It is not necessary to use this function.

– Extensions, additional plugins are displayed here that you can install, but are not required.

– FAQ, questions and answers on working with this plugin.

– Support, here you can write a letter to the plugin support service. You can choose the topic of the question.

– Install, information about the operation of the plugin. This shows what changes have been made to your site after installing this plugin.

– About, additional plugin features that you can use.

Still have questions? Write a comment! Good luck!


Setting up the W3 Total Cache WordPress plugin new instructions updated: May 15, 2018 by: Ilya Zhuravlev

As I wrote in the previous article, in my life, in addition to hacker attacks on the blog, a lot of good and bright things happen. The helping hand extended by Roman Telichko, seemingly by chance, but in fact not by chance, is just one of these events (here is a link to his website http://romantelychko.com - you can get acquainted with what Roman is doing). In fairness, I must immediately say that he was not the only one who rushed to teach me the wisdom of how to put reliable protection on a blog. But let me not confuse everything and everyone, because today I’ll tell you what master class he gave me on setting up the W3Total Cache plugin and I’ll illustrate it with screenshots. Incredibly, there are a lot of people on the Internet who are struggling with. Roman is one of them.

Please note that there will be no theory about the plugin and its functions here. Cache is just that: Cache. It needs to be cleaned, but there are many ways, the depth varies and so does the effectiveness.

If you have been wanting to install the W 3 Total Cache plugin for a long time, then this article is just for you. Everyone knows how to download the plugin:

PLUGINS – ADD NEW – enter into the search box W3 TOTAL CACHE– DOWNLOAD – INSTALL – ACTIVATE

But!!! “The only problem is that setting up this plugin often depends on the capabilities and settings of both the server and the site in general on which this all happens. Remember what I asked you first? What caching methods are available?" (quote from correspondence with Roman). Let's consider this a starting point. These settings for the W3 TOTAL CACHE plugin in the described case are performed using the caching method Opcode: Alternative PHP Cache (APC). I saw possible options (methods) for myself after installing the plugin. And one more very important point: don't let the page be translated into Russian, if you are using the Google Chrome browser. Plugins love their native language.

Each block is configured separately, and in each you need to save the changed parameters. The order doesn't matter. You can go from top to bottom in order, but do not forget to save your settings before moving on to the next block. When you hover over the name of the Performance plugin in the menu, a drop-down menu of its blocks appears.

01. w 3 cache plugin menu

Let's go in that order.

This is a general view of what we should get after setting up the w 3 total cache plugin.

03. Page Cache - w3 total cache

Now in minimization we set the same parameters as in the image.

04. Minify - W3 Total Cache

We reached the database. Please note that the default time is different. Let's put ours.

05. Database Cache - W3 Total Cache

Caching objects. Here, too, do not forget to check the default time and correct it to your own:

06. Object Cache - W3 Total Cache

That's all. When all the settings are completed, you need to go to the top of the page and enable the plugin. Definitely through viewing. First we press preview, and only then, when the page in the next tab loads completely successfully, deploy. And so after entering additional changes to any block. View - turn on! At the same time, you can view the code for my blog page and yours. If you find a difference, please write in the comments. This is me bragging so subtly. 🙂

I wish everyone well-optimized blogs, high degree Internet security and more good people near!

P.S. Please pay attention to the comments. Many necessary nuances are discussed there.

I also suggest that you take a break from serious matters for a moment and read, which I wrote as part of a competition held by Devaka (Sergei Koksharov) and the Rotapost exchange at the junction of 2014 and 2015. 🙂 I want a prize!!!

Want to know the secret to fast loading sites on Wordpress? Besides good hosting and correctly written extensions, use caching and CDN (content delivery network). For example, the W3 Total Cache plugin.

In this article we will look at installing and configuring W3 Total Cache for maximum performance. We will also give an example of a combination of using caching and CDN services to maximize site loading speed.

Before you start, it is recommended to check the performance of the site using online services Google Page Speed and/or Pingdom Tools. This should be done in order to compare the previous results with those obtained after all the settings.

What is W3 Total Cache?

W3 Total Cache This is the most complete and fastest plugin for optimizing performance in Wordpress. This is confirmed by its use on many popular sites such as: AT&T, Mashable, Smashing Magazine and many others. W3 Total Cache increases site speed by improving server performance, caching all aspects of the site, reducing response time, and providing seamless content delivery network (CDN) integration.

Installing W3 Total Cache in WordPress

Before installing W3 Total Cache, make sure that all other caching plugins are removed. If you do not do this, an error will appear when activating the W3 Total Cache plugin.

To install you will need to follow a simple procedure:

Go to the site's administrative panel and click on " Plugins»→ « Add new" In the search bar, type " W3 Total Cache" and see it in the search results:


Click on the button Install", after installation, activate the plugin.

W3 Total Cache Options and Configuration

W3 Total Cache is a very powerful plugin and has a lot of customizable options. On the one hand, this is good; for those who know how to use them, this is a gold mine. Beginner webmasters may be confused by these parameters. We'll go through all the settings sections in detail so that you can optimally configure W3 Total Cache. Let's start with the general parameters.

General settings

To go to the general settings page, click on the “Caching” menu in the Wordpress admin panel. It shows the general settings of the plugin. Make sure you are in General Settings and not in the W3 Total Cache plugin console page.


What is page caching?

The first option you can see is page caching. It is responsible for creating a cached static page for every loaded page on the site. Thus, instead of constantly generating a dynamic page, the visitor will be shown a cached static page. In the image below you can see how this function works:


The picture shows the following: Typically, when a user visits a site, Wordpress runs PHP scripts and database queries to display the requested page. Then PHP processes the data and creates the page. This page rendering process consumes certain server resources. Enabling page caching allows you to skip the page generation process.

For shared hosting, which is used by most novice website owners, it is recommended to use the “Disk:Enhanced” page caching method. Select "page caching" and save the settings.


For most this will be enough. This guide is for beginner-level webmasters. And we deliberately skip all the advanced page caching settings, implying that the default settings are quite sufficient.

We also skip minification, database query caching, and object caching. Due to the fact that not all servers provide the ability to use these parameters.

The next settings item is the browser cache.

What is browser cache?

Every time a visitor visits a site, his browser downloads all images, css files, js scripts and other static files from the site page into a temporary directory. This is done so that when you go to another page, the files are not downloaded again, but are opened from the browser cache. This speeds up site loading and saves traffic.

The browser caching option in W3 Total Cache allows you to specify how long cached items are retained. As long as you don't change the logo every day, caching for 24 hours won't cause any inconvenience. Just highlight this option and save. After that, go to “Caching” => “Browser Cache” to set other settings.


As you can see in the screenshot above, we have enabled all the options except for the 404 error handling option. When saving settings, all settings on the page will be saved as default.

In this simple Wordpress setup, other options are enabled by default. Everything discussed above will work well on most web hosting servers. But W3 Total Cache has other options. Let's try to look at what they are and why they are not included on all sites.

Minification

Minification is simply reducing the size of your site's static files to save every kilobyte possible. But using file minification on the fly increases the consumption of server resources. And in some cases, the usefulness of using this feature may be questionable. And besides, not every server has the ability to use it without prior configuration.

Caching database queries

Database query caching reduces server load by caching SQL queries. This reduces or eliminates database query processing time, which may not be noticeable on most small sites. But enabling this feature may increase the load on the server itself. Therefore, in some cases it is better to use the built-in cache buffers of the database server itself. Many hosting providers do not recommend using this caching.

Object Caching

If you have a site with a large number dynamic objects, then you should look towards the possibility of caching objects using W3 Total Cache. This is primarily used for complex, resource-intensive database queries. For most novice webmasters, this feature is not required.

So, once everything is set up, it will be good to take a backup of your W3 Total Cache settings. To do this, go to the general settings page of the W3 Total Cache plugin in the “Import / Export Settings” section and click “Download settings file”.

This concludes the brief guide to installing and configuring W3 Total Cache. We hope that this article was useful to you and your site has regained its wings.

The w3 total cache plugin has a lot of functionality and can take your site to a new level in speed. Let's look at its capabilities.

W3 Total cache

I liked the plugin because, unlike others, it did not cause any problems with the site, working correctly (although I still recommend creating a backup copy). For example, the Hyper-cache plugin ruined it for me css styles, after deactivating and deleting the plugin, the problem was not solved. I didn’t bother to figure out what exactly was the matter.

Also, w3 total cache has fairly clear settings. Let's look at them. After installation we have the performance side menu

The most important tab for us is General, it is responsible for enabling or disabling additional features. In order

Toggle all caching types on or off (at once) – enable all options; this is unlikely to be useful to us; we don’t check the box.

Page cache, a very necessary and important tab, allows you to reduce response time from the server by caching pages on the server. That is, the plugin generates html pages, puts it in the cache folder and serves it on request, saving time on generating the Apache page. Page cache method is set depending on the hosting, in this example it is set for virtual hosting, if you have , select the appropriate parameters.

create a new project

enable “PageSpeed ​​Insights API” in it

and create a new public api access key (browser).

Let's get this picture on the dashboard

Verify rewrite rules – error notification, enable.

Leave File locking and optimize disk disabled.

Enable edge mode – enables developer mode and new features. May be unstable.

Debug. Debug mode. Adds technical information to the code of each page. It is not recommended to leave it on, use as needed.

Import Export Allows you to save and load plugin configuration.

Advanced settings

The following menu items are responsible for fine-tuning the features included above.

Page cache General

Cache front page – caching the main page

Cache feeds – caching of categories, tags, comments

Cache ssl – if your site uses SSL encryption

Cache URI s with query string variables – caching search queries

Cache 404 (not found) pages – Caching 404 page

Cache requests only for site.ru site address – cache only for this site address (without www)

Don’t cache pages for logged in users – do not cache pages of authorized users (so that non-authorized users do not see the cache of your page)

Don’t cache pages for following user roles – Do not cache pages for the following roles

Cache preload the cache is created in advance, before the user requests the page.

Update interval – frequency with which the cache is created

Pages per interval – the number of pages that are created during the created interval.

Sitemap URL – specify the path to your sitemap, and then the page cache will be created according to the sitemap and the priorities in it.

Preload the post cache upon publish events – creating a cache when publishing a post.

Purge policy: page cache– cache sections that will be updated when a post is published.

Advanced – by and large, service settings; you don’t need to touch them.

Minify General

Rewrite url structure – shortens the path to js and css files

Disable minify for logged in users – disable compression for authorized users.

HTML & XML

Enable - enable

inline css minification – optimizes CSS

Inline JS minification – optimizes JS

Don’t minify feeds – does not compress feed styles

Line break removal

Operations in areas – up to the head tag, minify only or merge only.

Embed type – Type of script embedding. Default – default, blocking. It’s better to try choosing non-blocking using “async”.

Preserved comment removal – saving comments (in a script)

Line break removal – removal of breaks (not safe)

Combine only – just combine.

Preserved comment removal (not applied when combine only is active) – save comments. Cannot save if “merge only” is active

Line break removal (not safe, not applied when combine only is active) – removal of breaks. Cannot save if “merge only” is active

Advanced

Service settings, you don’t have to change anything.

Database cache General

Object cache

Maximum lifetime of cache objects: – cache lifetime

Garbage collection interval – period for removing outdated cache.

Browser cache

The General tab includes the selected parameter in all groups below: CSS&JS HTML&XML MEDIA&OTHER FILES

Set Last-Modified header – Sets the date the document was last modified in the header.

Set expires header – cache lifetime.

Set cache control header is a new cache life directive that takes precedence over expires.

Set entity tag (eTag) – entity tag, tag, assigned to a resource, changes when the resource changes. Allows the browser to understand whether the content has changed or not.

Set W3 Total Cache header – sets the w3 total cache identifier in the header.

Enable HTTP (gzip) compression – enables file compression using the deflate method, will not work in conjunction with nginx.

Prevent caching of objects after settings change – disable caching for specified objects.

Prevent caching exception list - list of caching exceptions.

Don’t set cookies for static files – do not set cookies for static files

Do not process 404 errors for static objects with WordPress – do not generate a 404 error for static objects not found.

404 error exception list – list of exceptions

Extensions

CloudFlare – Reverse proxy server reverse proxy) - a type of proxy server that relays client requests from an external network to one or more servers logically located on the internal network. At the same time, for the client it looks as if the requested resources are located directly on the proxy server. (paid)

FeedBurner is a web service that runs RSS feeds, corrects minor errors in them and can add additional functionality to the feed, for example, a Play button for podcasts. (paid)

Genesis Framework is a framework for WordPress. (paid)

WordPress SEO by Yoast – SEO plugin.

Answers on questions.

Contacting support

Installation instructions

If you have questions, ask them at , or below in the comments.







2024 gtavrl.ru.