Explanation of the W3 Total Cache plugin settings


In this post, God willing, we will explain the important settings for adding w3 total cache with an explanation of each feature and the role it plays. Of course, from the name of the add-on, we know that it specializes in cache work and also helps in cdn settings, such as adding wp super cache, which I explained in a previous post. But this addition has more advantages. The important thing is to get to the pointBy the way, the addition helps you apply some Yahoo tips to speed up browsing the site, which we talked about previously in a private post

Add page here . The method of installation, whether from WordPress direct installation or by uploading to the plugins folder Manual installation

Working conditions for adding w3 total cache

Some conditions must be met for the add-on to function properly, which are:

  1. You must make sure to install the following two models, Apache mod mime and mod rewrite for the apache server
  2. Safemode must be disabled (PHP safemode:OFF)

Solve some w3 total cache problems

After installing the add-on, you will see some warning messages that you must fix in the event that they appear before setting up the add-on, most of them are due to writing powers

w3 error

This problem can be fixed in two ways:

1. Open the wp-config.php file and add the following code:

define('WP_CACHE',"true"); 

2. Contact the host to solve the problem of writing on files, such as installing the mod_suphp library

error write wp content w3 total cache - WordPress Magazine

This issue is related to the permission of the .htaccess file and wp-content folder

1 . For the htaccess file, click on the view code and copy it, open the .htaccess file and paste the code inside

2 . For wp-content folder, just change its permission to 755

This is all about the warning messages that appeared to me. You may see other messages that can be dealt with easily, such as permanent links, you must change them to the other. We now move to explaining the settings

Before we get into the explanation, disable the preview mode for the add-on by pressing the disable button, as shown in the following image:

message deploy w3 total cache - WordPress Magazine

In the explanation for the main settings, each general setting we explain with it, we explain its sub-settings and they are located under the Performance menu

Pgae cache

w3 total cache menu general - WordPress Magazine

For Page Cache methode settings, use Disk enhanced because it saves pages in a static format. The option in the image depends on php. Of course, it saves static pages for themes and pages are better.

w3 total cache general settings page cache - WordPress Magazine

As for the rest of the options, they are for people who have private servers or VPS virtual servers, for example xcache, you must install it in the server. Of course, there are many explanations for these options.

w3 total cache menu page cache - WordPress Magazine

As for the sub-settings, they are divided into several settings:

  1. General
  2. Advanced
  3. Cache Preload
  4. Purge Policy

What matters to us here are the General and Cache Preload settings

For General settings

w3 total cache page cache general - WordPress مجلة

As for the Cache Preload settings, you must activate it in order to prepare static pages in advance before anyone visits the topics

w3 total cache page cache preload - WordPress Magazine

The rest of the settings, such as Advanced and Purge Policy, leave them in their default mode. By the way, the red circle means to put a mark so that no one leaves it empty

If you are using a Yoast plugin, go to the extensions page and activate Yoast SEO

W3 Total Cache Extensions yaost - WordPress Magazine

Minify

These settings are for reducing the size of js, css and html files and they contain tools to do this process automatically. “Minimize HTTP Requests” was mentioned in Yahoo Tips. The important thing is that we will talk about the special settings as well

w3 total cache menu general - WordPress Magazine
W3 Total Cache general minify - WordPress Magazine

We hate these settings as they are in the default mode and move to the sub-settings

w3 total cache menu minify - WordPress Magazine

For general settings, do the following:

  1. Rewrite URL structure tick
  2. The Disable minify for logged in users tick
  3. The Minify error notification is disabled (Disabled)

For HTML & XML, do the following:

  1. HTML minify settings Enable them by checking Enabled
  2. Inline CSS minification Tick
  3. Inline JS minification Tick
  4. Don’t minify feeds tick
  5. The Line break remova tick

For JS, don’t enable it, it may cause you problems with the template

For CSS, do the following:

  1. CSS minify settings Enable them by checking Enabled
  2. The Combine only do not check here
  3. Preserved comment removal (not applied when combine only is active) tick
  4. Line break removal (not applied when combine only is active) tick
  5. Eliminate render-blocking CSS by moving it to HTML body (Available after upgrade) for paid versions

For Advanced, leave it as is

Click on the image to see all Minify settings

w3 total cache minify - WordPress مجلة

Database cache, Object cache

These settings I tried using APC cache for the database. I noticed that the control panel became somewhat slow in general. After doing a simple search on this matter, I found that these options are used when you have very large visits, knowing that I tried it for a friend as well, with no benefit.

Browser Cache

This feature is important and must be activated because it deals with the cache in the visitor’s browser and helps reduce pressure on the site

w3 total cache menu general - WordPress Magazine
w3 total cache browser cache - WordPress Magazine

For general settings, do the following:

w3 total cache menu browser cache - WordPress Magazine
  1. The Set Last-Modified header tick
  2. The Set expires header tick
  3. The Set cache control header tick
  4. The Set entity tag (ETag)
  5. The Set W3 Total Cache header tick
  6. Enable HTTP (gzip) compression Tick
  7. The Prevent caching of objects after settings change Do not check here
  8. Don’t set cookies for static files tick
  9. The Do not process 404 errors for static objects with WordPress tick
  10. Rewrite URL structure of objects Do not check here
  11. Check the Apply HTTP Strict Transport Security policy

For CSS & JS leave it as is

For HTML & XML leave it as is

For Media & Other Files, leave it as is

CDN

As for the cdn settings, do not activate it unless you are a subscriber to a CDN service such as MAXCDN. I have a simple experience with this feature. I used it when I was using Google App Engine such as CDN

Varnish

There is no need to talk about it. This is an advanced service for those who have separate cache servers. I will just put a video of it from the official website

Explanation of the W3 Total Cache plugin settings

CloudFlare

If you want to use cloudflare with the addition of w3 total cache, you must enable this feature from extensions and then configure it

W3 Total Cache Extensions cloudflare - WordPress Magazine

We talked about it previously ( CloudFlare service to protect and speed up the performance of the WordPress blog )

Conclusion

I did not explain all the settings in boring detail because explaining such things requires a lot of effort and time. I skipped some settings because I hadn’t tried them before and I didn’t want to go into them without my knowledge of them. I hope that you will benefit from this humble explanation of this important add-on for everyone who owns WordPress and suffers from problems with loading and slow browsing. If there is any inquiry or lack of explanation, please comment? And don’t forget to subscribe to our mailing list, thank you very much

Leave a Comment