If your site is configured with excessively strict security restrictions, you might see an error message saying that the GeoIP database cannot be downloaded, or located. If the message keeps apeparing even after you downloaded and installed it manually, as described in the article about the new geolocation features, please check the following:
1. Check that the GeoLite2-City.mmdb is in the correct location
The GeoIP database must be located in the uploads folder in your WordPress installation. This is usually in wp-content/uploads.
2. Check that the path of the uploads folder is correct, in your WordPress settings
The error message will show you where the AFC plugin is expecting the GeoIP database to be stored. You will see a paragraph saying something like "extract the file from the archive and copy it to /some/path/wp-content/uploads". The part in bold is the path configured in WordPress as the uploads folder. This must match the path to the folder where the GeoIP database is stored.
If the path doesn't match, you can fix it as follows:
WordPress 3.5 and later
WordPress 3.5 doesn't show the upload path in the Media settings. You can find and change the path as follows:
- Open file wp-config.php. The file is located in the root of your WordPress directory.
- Look for a line like the following:
define( 'UPLOADS', 'wp-content/uploads' );
If the line is not present, then your site is most likely configured to use the default path, which is wp-content/uploads.
After finding the upload path, you should check that the path exists and it's writable (see section #3, below).
WordPress 3.4.x and older
- Go to WordPress Admin > Settings > Media
- Scroll towards the bottom of the page and find the setting labeled "Store uploads in this folder."
- Enter the correct path in the field (see screenshot, below)
3. If the path is correct, and the GeoIP database is in the correct location, check permissions
If you checked both the path and location of the GeoLite2-City.mmdb file, and thy are both correct, you should contact your hosting provider to make sure that there are no security restrictions that may affect the file_exists() function.
4. If the permissions are correct, check that function file_exists() is not blocked by the hosting provider
The file_exists() function is what the Aelia Foundation Classes plugin uses to verify that the geolocation database exists. If it's blocked, for any reason, the plugin will not be able to read the GeoIP database and will show the message. Allowing the execution of that function will solve the issue.
If you're not sure if function file_exists() is blocked, you can contact your hosting provider, who will be able to check that for you.
You can purchase our WooCommerce plugins from our online shop.