Horje
Purge the Nginx FastCGI cache manually, or automatically when content is updated. Supports purging of individual pages.

Noted That:

  • To install correctly this snipe-nginx-cache.zip.
  • Fisrt Download the snipe-nginx-cache.zip to your computer
  • Extract/Open snipe-nginx-cache.zip to Your Computer.
  • Then, Find readme.txt file inside snipe-nginx-cache.zip and Open readme.txt.
  • Now, Read the Requirements of this plugin. Which Wordpress Version and PHP Version are required to run this Plugin in Your Wordpress Site.
  • Then, Follow the the Tips Below.

Start the Tips:

1. First Download "snipe-nginx-cache.zip" Plugin to your Local Computer. (Click Download)

2. Then, Login to your "yourdomain.com/wp-admin" Dashboard.

/stack/wp/e1593231376d7d849d2-4597-4fa3-a6ff-1eca18f72aab.png

3. Then, Click on "Plugins" + "Add New" from left sidemenu of Dashboard.

/stack/wp/e1593231378Screenshot20.png

4. Now, Click on "Upload Plugin" button.

/stack/wp/e1593231380Screenshot-2019-4-2AddPluginsHorjeWordPress.png

 

5. Now, Browse "snipe-nginx-cache.zip" Downloaded plugin from your computer, Where you downloaded snipe-nginx-cache.zip According to Step – 1 Above then, click on "Install Now"

/stack/wp/e15931461531577025694plugin.png

6. Now, Click on "Active Plugin"

/stack/wp/e15932313830ca45529-bf73-4101-8178-53ae60ce549f.png

7. Then, See left sidemenu. "Cache Sniper for Nginx" folder is added on left sidemenu. Now, Click on "Cache Sniper for Nginx" folder.

   Noted that: If you do not see "Cache Sniper for Nginx" folder on left sidemenu then, see at left sidemenu "Settings" or "Tools".

8. Now you configure yourself oR Watch video tutorial below about Cache Sniper for Nginx Configurtions and Settings or How to work "Cache Sniper for Nginx" in your WordPress site.

 

oR

After Activated Plugin According to Step-6 then,

  1. Go to "Plugins" + "Installed Plugin" from Wordpress Admin Panel Leftside Menu.
  2. or Direct go to: https://yourdomain/wp-admin/plugins.php
  3. Then, Find "Cache Sniper for Nginx" Activated Plugin from Plugin List.
  4. Then, Click on "Settings" from Plugin that is Cache Sniper for Nginx
  5. Now, Edit/Add/Config the setting and Click on "Save Changes" button,
WP Plugin Setting



Guide
  1. Upload the plugin files to the /wp-content/plugins/snipe-nginx-cache directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the Plugins screen in WordPress
  3. Go to Tools -> Nginx Cache Sniper to configure the plugin

Usage

  1. Clear the entire cache by going to the Nginx Cache Sniper drop-down in the top Menu bar, and click Clear entire cache.
  2. Clear the homepage cache by going to the Nginx Cache Sniper drop-down in the top Menu bar, and click Clear homepage cache.
  3. To clear the cache for an individual Post (or Page), click on Clear cache for this page, either on the All Posts or Post detail pages.
  4. When configured to do so, you can purge the cache for a Post (or Page) by updating it.
  5. When configured to do so, you can purge the cache for a Post (or Page) where a comment was created/updated/deleted.

Configuration Settings

Cache Sniper for Nginx comes with the following settings:

  1. Cache Path: This is the filesystem path where the FastCGI cache is stored on-disk. Set this to the value you used for fastcgi_cache_path from your Nginx configuration. Note: Nginx needs read/write access to this location.
  2. Cache Levels: This sets up a directory hierarchy under the cache path. Set this to the value you used for levels from your Nginx configuration. For example: fastcgi_cache_path /var/lib/nginx/cache levels=1:2 keys_zone=CACHE:100m;
  3. Automatically clear page cache on content update: Check this box to automatically purge the cache when a page is updated. This only purges the updated page — it does not clear the entire cache.
  4. Automatically clear page cache on comment: Check this box to automatically purge the cache when a comment is created/updated/deleted. This only purges the cache of the page where the comment resides — it does not clear the entire cache.
  5. Automatically clear homepage cache on content update: Check this box to automatically purge the homepage cache when a page is updated. This only purges the homepage — it does not clear the entire cache or the cache of the page where the content resides.
  6. Automatically clear homepage cache on comment: Check this box to automatically purge the the homepage cache when a comment is created/updated/deleted. This only purges the cache of the homepage — it does not clear the entire cache or the cache of the page where the content resides.

Configuration via WP CLI

For those scripting out infrastructure, Cache Sniper for Nginx can be configured via WP CLI:

  1. wp plugin activate cache-sniper-nginx
  2. wp option add nginx_cache_sniper_path '/var/lib/nginx/cache'
  3. wp option add nginx_cache_sniper_levels '1:2'
  4. wp option add nginx_cache_sniper_auto_clear 1
  5. wp option add nginx_cache_sniper_auto_clear_comments 1
  6. wp option add nginx_cache_sniper_auto_clear_home_page 1
  7. wp option add nginx_cache_sniper_auto_clear_home_page_comments 1

For instructions on setting up FastCGI caching with Nginx, refer to this Digital Ocean blog post.

Server-side configuration

There are a few things that need to be configured on the server in order for this plugin to work.

  1. Be sure to set $scheme$request_method$host$request_uri for fastcgi_cache_key. For example: fastcgi_cache_key "$scheme$request_method$host$request_uri";
  2. The Linux account running Nginx needs read-write permissions to the cache path on disk.

supports, updated, purging, individual, pages, content, automatically, nginx, fastcgi, cache,

Name

Reffered: https://wordpress.org/

Share on: