Downloads

Downloads in WordPress: one address, a counter, and members only

The price list, the brochure, the form, the manual, the annual report — the files a visitor is meant to take away. They live in groups, each with a line saying what it is, and they go out under an address of the plugin instead of a link into the uploads folder. That is not cosmetic: it decides whether a link still works in two years, and whether "members only" means anything at all.

Downloads in WordPress: one address, a counter, and members only

The file

  • A name, a line saying what it is, and the group it belongs to
  • An address that never changes — not even when you replace the file
  • Replacing says that it is replacing, and clears the old file away
  • Members only, per file or for a whole group
  • The files live in the media folder "Downloads", not among the photos

On the site

  • A block with the list, narrowed to one group if you like
  • A block for a single file as a button
  • Each line says what the file is and how big it is
  • What is for members is simply not there for anybody else
  • No link into the uploads folder for somebody to pass on

The figures

  • How often each file was taken — thirty days and altogether
  • One bar per day
  • Requests are counted, not people: no address, no account
  • A HEAD request does not count, or link checkers would flatter it
  • A file nobody takes in a month is worth a second thought

The address stays

Next year's price list, under the same link.

You put a new file behind the same entry, and every page, every newsletter and every bookmark leads on to the current version. The field shows what lies there now, the address underneath it, and says that the replaced file is removed rather than left behind. Whoever links into the uploads folder instead has twenty places to change next year — and will not find three of them.

Next year's price list, under the same link.
How often, on which day, which file.

Counted without counting anybody

How often, on which day, which file.

Because the files go out through the plugin, they can be counted — per file and per day, over thirty days and altogether, with a bar for each day. Requests are counted, not people: no address, no account, nothing about who. That is enough for the question that matters: which paper somebody actually takes, and which has stood on the page for a year without anybody touching it.

Members only means members only

A locked file you can still get by a detour is not locked.

Those files live in a folder of their own that is locked — with a rule for Apache and, because an .htaccess does nothing on nginx, also under a folder name nobody guesses. Both, not one of them. The only address that leads to the file is the plugin's, and that one asks. A tick on the group moves every file in it behind the lock at once; each file keeps its own tick either way.

A locked file you can still get by a detour is not locked.

Questions

How is this different from a link into the media library?

A link into the uploads folder is valid forever, for everybody, and changes the moment you swap the file. The plugin's address stays, can be locked, and can be counted.

Do Google and link checkers count too?

A HEAD request — which is what checkers send — does not count. What is really fetched is counted.

What is stored about visitors?

Nothing about the person: no account, no address. What is stored is a number per file and per day.

Can I replace a file without changing the link?

That is exactly what this is for. Pick the new file, save — the address stays, the old file is removed.

How many files does a group take?

As many as you like. Beside the groups there is a list of all files with a search and a filter, so you do not have to read through thirty rows.

The WordPress theme builder has a name.

ambera Theme Builder

Built in Switzerland. Built for WordPress.