Plugin Directory

Simple Download Monitor

Count the number of downloads without having to maintain a comprehensive download page.

  1. Create a subdirectory in your '/wp-content/plugins/' directory and extract the plugin there. The plugin subdirectory can be anything you like - I use 'simple-download-monitor', but the plugin should accept any name.
  2. Activate the plugin through the 'Plugins' menu in WordPress.
  3. You will see a 'Simple Download Monitor' item in your 'Settings' menu. You can enter three options there:
    • Allowed directories. The plugin could potentially be a huge security hole because it could be used to download source files of your site (e.g. 'config.php' - you definitely don't want to allow that!) This option restricts Simple Download Monitor to directories matching a regular expression. The default value of 'files/' means that Simple Download Monitor will only allow download of files in the '/files' directory and its subdirectories.
    • Allowed extensions. Much like 'Allowed directories', allowed extensions protect your site's files from unwanted downloads. It is a regular expression too and it is recommended to only place "safe" extensions such as 'zip' or 'jpg' here. Do not EVER allow 'php' extension, either directly or through wildcard (such as '.*' - that is a BIG NO-NO!).
    • Store detailed info. If this option is checked, detailed information about each download (such as referer, user's IP address or name, and date of download) is stored. This could fill your database quickly if you have a well-visited site so you can turn detailed info off and only keep the number of downloads and the date of last download.
  4. The last step involves editing the '.htaccess' file. The default '.htaccess' skips default WordPress processing for existing files, which means that direct-linked files would get downloaded directly, without Simple Download Monitor ever learning about it. You need to modify the '.htaccess' file so that downloads are passed through Simple Download Monitor. This is easy enough to do: Open your '.htaccess' file and locate line RewriteCond %{REQUEST_FILENAME} !-f Add this line directly above it: RewriteRule ^(files/.*) /index.php?sdmon=$1 [L,QSA] (replace 'files/' with your download directory).
  5. (Optional step) If you want to see country flags in the download stats page, download, install, activate and set up my Country-To-IP Plugin ( http://wordpress.org/extend/plugins/ip-to-country/ ). See changelog of version 0.12 for details.

Requires: 2.8.0 or higher
Compatible up to: 3.4.2
Last Updated: 2012-9-4
Downloads: 22,158

Ratings

4 stars
4.2 out of 5 stars

Support

0 of 2 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

0,1,0
100,2,2 100,2,2
0,1,0
75,4,3 100,1,1
0,1,0
0,1,0
50,2,1
0,1,0
33,3,1
0,1,0
60,5,3
100,1,1
100,2,2
100,3,3