Title: Country Caching Extension
Author: wrigs1
Published: <strong>يناير 4, 2015</strong>
Last modified: مارس 24, 2021

---

Search plugins

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://s.w.org/plugins/geopattern-icon/country-caching-extension.svg)

# Country Caching Extension

 By [wrigs1](https://profiles.wordpress.org/wrigs1/)

[Download](https://downloads.wordpress.org/plugin/country-caching-extension.zip)

 * [Details](https://ary.wordpress.org/plugins/country-caching-extension/#description)
 * [Reviews](https://ary.wordpress.org/plugins/country-caching-extension/#reviews)
 *  [Installation](https://ary.wordpress.org/plugins/country-caching-extension/#installation)
 * [Development](https://ary.wordpress.org/plugins/country-caching-extension/#developers)

 [Support](https://wordpress.org/support/plugin/country-caching-extension/)

## Description

DUE TO PERSONAL CIRCUMSTANCES I AM NO LONGER ABLE TO DEVELOP OR SUPPORT THIS PLUGIN.
IF YOU ARE INTERESTED IN ADOPTING THIS PLUGIN SEE https://developer.wordpress.org/
plugins/wordpress-org/take-over-an-existing-plugin/

Solves [wrong country content for visitor Geo-Location](http://wptest.means.us.com/caching-and-geoLocation/)
issues. Enables Comet Cache to display the correct page and widget content for a
visitor’s country.

**Bonus** also makes Cookie Notice work correctly with Comet Cache (whether using
country/EU geolocation or not).

If you need country caching with other caching plugins then see “Advice” below.

This plugin adds an extension to Comet Cache enabling it to create separate snapshots(
cache) for each page based on country location.

Extra caching **can be restricted to specific countries and/or a group of countries**.
E.g. if you are based in the US but show different content to Canadian,Mexican &
EU country visitors, you can set separate caching for CA & MX visitors + single 
group cache for EU visitors; the remainder of your visitors will standard cache (“
US”) content.

It works on normal WordPress and on Multisite (see FAQ).

**Comet Cache** is designed to work with add-on scripts and should work seamlessly
with this plugin.

**Identification of visitor country for caching**

Via Cloudflare or Maxmind. (this product includes GeoLite2 data created by MaxMind,
available from http://www.maxmind.com ) It is also possible to connect a different
GeoLocation sytem of your choice (see documentation).

If you use Cloudflare and have “switched on” their GeoLocation option ( see [Cloudflare’s instructions](https://support.cloudflare.com/hc/en-us/articles/200168236-What-does-CloudFlare-IP-Geolocation-do-))
then it will be used to identify visitor country. If not, then the Maxmind Country
Database will be used.

**Updating** (If not using Cloudflare for country) The installed Maxmind Country/
IP data file will lose accuracy over time. To automate a monthly update of this 
file, install and enable the [Category Country Aware (CCA) plugin](https://wordpress.org/plugins/category-country-aware/)(
Country Caching and the Cataegory Country Aware (CCA) plugins use the same Maxmind
data file in the same folder and the CCA plugin includes code for its update). The
CCA plugin has many other features and functionality you may find useful. Alternatively
you can manually update (FAQ below).

**Additional Info and support**

**ADVICE:**

Don’t use ANY Caching plugin UNLESS you know how to use an FTP program (e.g. Filezilla).

Support forums show that Caching plugins including Comet Cache can result in “white
screen” problems for some users; the only solution may be to delete files using 
FTP/Cpanel or OS command line.

The Country Caching plugin deletes files on deactivation/delete, but in “white screen”
situations you may have to resort to “manual” deletion – see FAQ for instructions.

**WP Super Cache:** is also designed to work with “add-ons” and an equivalent of
this plugin is available in the WordPress repository.

**W3 Total Cache** does not _currently_ provide a suitable hook for plugin country
caching. Others have [requested this facility](https://wordpress.org/support/topic/request-add-hook-to-allow-modification-of-the-cache-key).

### License

This program is free software licensed under the terms of the [GNU General Public License version 2](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
as published by the Free Software Foundation.

In particular please note the following:

This program is distributed in the hope that it will be useful, but WITHOUT ANY 
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
PARTICULAR PURPOSE.

## Screenshots

[⌊Simple set up. Dashboard->Settings->Country Caching⌉⌊Simple set up. Dashboard-
>Settings->Country Caching⌉[

Simple set up. Dashboard->Settings->Country Caching

[⌊Configuration and Server Info⌉⌊Configuration and Server Info⌉[

Configuration and Server Info

## Installation

The easiest way is direct from your WP Dashboard like any other widget:

Once installed go to: “Dashboard->Country Caching”. Check the “_Enable CC Country
Caching add-on_” box, and save settings.

If you want automatic “3 weekly” update of _Maxmind Country->IP range data_ then
also install the [Category Country Aware plugin (here on WordPress.Org)](https://wordpress.org/plugins/category-country-aware/).

## FAQ

### Where can I find support/additional documentation

Support questions should be posted on WordPress.Org
 Additional documentation is
provided at http://wptest.means.us.com/quick-cache-and-geoip-enable-caching-by-pagevisitor-
country-instead-of-just-page/

### How do I know its working

See [these checks](http://wptest.means.us.com/quick-cache-and-geoip-enable-caching-by-pagevisitor-country-instead-of-just-page/).

### How do I keep the Maxmind country/IP range data up to date

Automatically: install the [Category Country Aware plugin](https://wordpress.org/plugins/category-country-aware/)
from WordPress.Org and enable its settings; it will update your Maxmind data every“
month”.

Manually: monthly/whatever; download “GeoLite2-Country.tar.gz” from [Maxmind](https://dev.maxmind.com/geoip/geoip2/geolite2/)
and extract the file “GeoLite2-Country.mmdb” and upload it to your servers “/wp-
content/cca_maxmind_data/” directory.

### Will it work on Multisites

Yes, it will be the same for all blogs (you can’t have it on for Blog A, and off
for Blog B).

On MultiSites, the Country Caching settings menu will be visible on the Network 
Admin Dashboard (only).

### How do I stop/remove Country Caching

Deactivating the plugin will remove the Caching Extension. Then clear Comet’s cache(
Dashboard->Comet Cache->Clear)

If all else fails:

 1. Log into your site via FTP; e.g. with CoreFTP or FileZilla.
 2. Delete this file: /wp-content/ac-plugins/cca_qc_geoip_plugin.php
 3. Delete this directory: /wp-content/plugins/country-caching-extension/
 4. Then via your WordPress Admin: Dashboard->QuickCache->Clear

## Reviews

![](https://secure.gravatar.com/avatar/c2ef8942aab5c72f164efbd4a7740d5ff5aa0be6c336f1016e8cc04f30ac68ae?
s=60&d=retro&r=g)

### 󠀁[Saved my butt!!](https://wordpress.org/support/topic/saved-my-butt-24/)󠁿

 [Owen Davey](https://profiles.wordpress.org/ojdavey/) نونبر 7, 2019

Thanks so much for creating this plugin. I was about to have a meltdown after purchasing
a currency converter plugin where I needed it to select the currency on a geolocated
country. Thought I was screwed then found this! You are awesome 🙂

![](https://secure.gravatar.com/avatar/2ea003c0f0010f06ffbb1a4e581ff4b75b7e2e6bdb0677f8430e51c1c2628465?
s=60&d=retro&r=g)

### 󠀁[Wow – Lifesaver for Cookie Notice Problems](https://wordpress.org/support/topic/wow-lifesaver-for-cookie-notice-problems/)󠁿

 [Farbweiss](https://profiles.wordpress.org/farbweiss/) يوليوز 19, 2018

Hey – just want to thank you so much for this plugin. It is great for country caching
with Comet Cache but first of all I use it on a variety of sites now to get proper
caching for and without cookie notice. This works great. Again – this is a lifesaver!

![](https://secure.gravatar.com/avatar/9165327a3ca9fa5970d1a614c1ccd5cb1c844022ca505a864d0fcd12e871b99c?
s=60&d=retro&r=g)

### 󠀁[Great plugin](https://wordpress.org/support/topic/great-plugin-17336/)󠁿

 [mark8888](https://profiles.wordpress.org/mark8888/) مارس 25, 2018

Finally found a solution to have both, geotargetting and caching. Great support –
fast and professional.

![](https://secure.gravatar.com/avatar/e08ceab9b6071708055ab2885565d028bf4738c648b1668103e3495b95e9af91?
s=60&d=retro&r=g)

### 󠀁[Simply awesome](https://wordpress.org/support/topic/simply-awesome-173/)󠁿

 [chillpilllike](https://profiles.wordpress.org/chillpilllike/) دجنبر 23, 2017

Saved a lot of money, thanks, developer. the plugin works flawlessly and fulfils
every need based on geoip.

 [ Read all 4 reviews ](https://wordpress.org/support/plugin/country-caching-extension/reviews/)

## Contributors & Developers

“Country Caching Extension” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ wrigs1 ](https://profiles.wordpress.org/wrigs1/)

[Translate “Country Caching Extension” into your language.](https://translate.wordpress.org/projects/wp-plugins/country-caching-extension)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/country-caching-extension/),
check out the [SVN repository](https://plugins.svn.wordpress.org/country-caching-extension/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/country-caching-extension/)
by [RSS](https://plugins.trac.wordpress.org/log/country-caching-extension/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.2.0

Fix for Cookie Notice, to make it work correctly with Comet Cache (whether or not
you are using geolocation or CCA to restrict CN to EU visitors)

#### 1.1.0

(if your site is not using Cloudflare) Maxmind GeoLite2 will be used for country
look-up instead of Maxmind Legacy (no longer updated by Maxmind).
 Connector also
provided to allow use other GeoIP look-up system in place of CF/Maxmind country 
lite.

#### 1.0.0

Added checking of additional server variables for visitor’s IP Address.
 Fixed display
bug on “Support Tab” – extension info will now display even if Caching has not been
enabled in Comet Cache. Support Tabs “Display GeoIP data” now displays values of
the server’s visitor IP variables

#### 0.7.2

Maxmind data files are now auto installed (when you first enable Country Caching)
in a shared directory for use by other plugins.
 The data files are provided by 
Maxmind under Creative Commons license, but the WordPress.org repository requires
all files stored there should be licensed under GPL. The Plugin has been altered
to comply.

## Meta

 *  Version **1.2.0**
 *  Last updated **6 سنوات ago**
 *  Active installations **10+**
 *  WordPress version ** 3.3 or higher **
 *  Tested up to **4.9.34**
 *  PHP version ** 5.4 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/country-caching-extension/)
 * Tags
 * [cache](https://ary.wordpress.org/plugins/tags/cache/)[caching](https://ary.wordpress.org/plugins/tags/caching/)
   [country](https://ary.wordpress.org/plugins/tags/country/)[GeoIP](https://ary.wordpress.org/plugins/tags/geoip/)
 *  [Advanced View](https://ary.wordpress.org/plugins/country-caching-extension/advanced/)

## Ratings

 5 out of 5 stars.

 *  [  4 5-star reviews     ](https://wordpress.org/support/plugin/country-caching-extension/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/country-caching-extension/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/country-caching-extension/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/country-caching-extension/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/country-caching-extension/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/country-caching-extension/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/country-caching-extension/reviews/)

## Contributors

 *   [ wrigs1 ](https://profiles.wordpress.org/wrigs1/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/country-caching-extension/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](http://means.us.com/)