WooCommerce Shipping & Tax offers automated tax calculation, shipping label printing, smoother payment setup, and other hosted services…
About WP-DownloadManager
This document provides instructions for using the WP Download Manager plugin. It explains how to regenerate permalinks, embed files into posts or pages, limit the number of embedded downloads shown, sort embedded downloads, choose what to display within the embedded file, embed files and categories, and configure download options and templates. It also provides instructions for creating a downloads page and adding download statistics widgets. The document includes development and translation information, as well as credits and a request for donations.Screenshots









Changelog
2.0.2
- FIXED: Updating to 2.0.1 could reset your download path to
wp-content, and every file then answered “File does not exist” — the listing still showed them, the links still pointed at them, and none of them downloaded. The update re-checks your settings, and the check that keeps the download path insidewp-contentresolved one end of the comparison and not the other, so a path that had never left it read as an escape on any host where the site’s directory is reached through a symlink —/home2standing in for/homeon a lot of shared hosting, or a release directory for the live one. It also ran with nobody watching: an automatic background update reset the path and the notice explaining why went nowhere. Both ends are resolved now, and a path that is already the one in use stands whatever it is — the check applies to a path being moved somewhere new. If your path was reset, set it back under Downloads -> Settings and it will hold - FIXED: Manage Downloads lost its ID column in 2.0.0, which left the Edit link’s URL as the only place on that screen to find the number
[download id="…"]needs. The column is back, and sorts
2.0.1
- NEW: A Settings link on the plugin’s row on the Plugins screen
- CHANGED: A stylesheet named
wp-downloadmanager.cssin the parent theme now overrides the plugin’s copy too; a child theme’s copy still wins over both - CHANGED: The update migration runs on any request rather than only when an admin page loads, so a site updated by an automatic background update no longer serves its front end from unmigrated settings until somebody logs in
- FIXED: A fresh install shipped one category, General, in the numbered slot that means “no category”, so the Add File dropdown offered it as category 0 and every file you added was filed there. The first time you saved the Settings tab — for any reason at all — the category list was renumbered and General became category 1, while your files stayed at 0 and stopped showing a category on the downloads page, in the feed, in the widget and on Manage Downloads. Nothing warned you, and re-picking the category on every file was the only way back. The list now ships with that slot empty, and updating moves your categories up one and moves every file with them, so a file filed under General still reads General
- FIXED: Manage Downloads read “N/A” for a file in no category, or in one you had deleted, while the Delete File confirmation for that same file left the category blank — one click apart, on the row you had just clicked
2.0.0
- FIXED:
%FILE%and%FILE_DOWNLOAD_URL%were substituted into the templates unescaped, where%FILE_NAME%and%FILE_DESCRIPTION%are filtered. Those two are the fields a site owner is meant to put markup in; a file path and a URL are not. The stock templates put the URL in a double-quoted attribute, which is the only reason it never bit — a template of your own using single quotes had nothing behind it - FIXED: Search highlighting rewrote already-rendered markup, so a search term that happened to appear inside an attribute —
examplein a stored link toexample.com— spliced the highlight into the middle of the attribute and ended it early. Any visitor could corrupt a listing’s markup through the search box. Only the text between tags is highlighted now - FIXED: The Browse source stored whatever file name was posted, and the download endpoint read it. A name climbing out of the downloads directory —
/../../../wp-config.php— was accepted by Add File and served to anyone, because the stored name is a relative path and neithersanitize_text_field()nor the character filter that follows it touches.or/. Add File now refuses such a name, and the endpoint resolves the path and confirms it is inside the downloads directory before reading a byte, so a row written by anything else is refused too - FIXED: A remote file URL was checked for its scheme and its port and nothing else, so
http://169.254.169.254/latest/meta-data/andhttp://127.0.0.1/were both accepted — and the endpoint proxies a remote file withreadfile(), which is notwp_safe_remote_get()and makes none of the checks WordPress otherwise would. The host must now resolve outside this network, it is checked again when the file is served rather than only when it is saved, and redirects are no longer followed.wp_downloadmanager_host_is_publicis the escape hatch for a mirror that genuinely is on the local network - BREAKING: Requires WordPress 6.8 and PHP 8.2.
- BREAKING: The
downloads_pagefilter is nowwp_downloadmanager_pageand thedownload_embeddedfilter is nowwp_downloadmanager_embedded. The old names are gone. - BREAKING: The nineteen
download_*option rows are consolidated intowp_downloadmanager_options, and the schema marker intowp_downloadmanager_version. Settings are migrated automatically and the old rows deleted. - BREAKING: Download Options and Download Templates are two tabs on one Settings page, so their admin URLs have changed.
- BREAKING: Every class gained a
WP_DownloadManager_prefix, andDownloadManager_TemplatesbecameWP_DownloadManager_Template. - BREAKING:
%FILE_ICON%is the complete icon element rather than a GIF file name, and the plugin ships no images at all. - BREAKING: The
stats_displayandstats_mostlimitrows shared with WP-Stats are replaced by this plugin’s own settings, and WP-Stats collects sections through thewp_stats_sectionsfilter. - NEW: A
wp downloadmanagerWP-CLI command:list,get,stats,reset-hitsanddelete, the last two asking for confirmation anddelete --delete-filetaking the file off the server as well. - NEW: Two editor blocks, Download and Downloads Page, wrapping
[download]and[page_download]. The shortcodes are unchanged, still registered and still supported —[download],[download=2],[page_download]and[page_downloads]all behave exactly as before, nothing needs re-saving, and the blocks render through the same code so the two are identical. - NEW: Manage Downloads is a real
WP_List_Table, with sortable columns, row actions, bulk delete, a search box and a per-user rows-per-page setting. - NEW: One inline SVG icon sprite, drawn in the theme’s own colour and covering modern file types the GIF set never had.
- NEW: Restructured into
includes/class-wp-downloadmanager-*.php, with nothing loose at the plugin root. - NEW: The
wp_downloadmanager_capabilityfilter controls who reaches each screen. - NEW: The widget supports selective refresh in the customizer.
- CHANGED: Dropped jQuery entirely. The quicktag, editor button, timestamp toggle and template reset buttons are vanilla JavaScript, and inline
onclick=handlers are gone. - CHANGED: The stylesheet sets no fonts or colours, uses CSS logical properties so one file serves both text directions, and honours
prefers-color-schemeandprefers-reduced-motion. - FIXED: SQL injection in
get_downloads_category(), reachable by anyone able to edit a widget, which could expose files marked Hidden. - FIXED: SQL injection in the Manage Downloads search box.
- FIXED: The listing and feed sort columns reached
ORDER BYunvalidated. - FIXED: The upload subfolder was not constrained to the downloads directory.
- FIXED: A file name or description holding markup reached the downloads page and the
[download]shortcode unescaped, where the widget and the WP-Stats sections had always filtered it. All five now run it through one allow list. - FIXED: A search term containing regex metacharacters blanked the file name it was highlighting.
- FIXED:
wp_get_sites()was removed in WordPress 5.1, so activating or uninstalling on a network fatalled; uninstall also stopped at 100 sites and unwoundswitch_to_blog()one short. - FIXED: The widget’s “Display Link To Download Page?” setting never showed as selected and silently reverted, and widget edits made in the block widget editor or the customizer were discarded.
- FIXED: Files in a deleted category no longer emit “Undefined array key” warnings on PHP 8.
- FIXED: The downloads directory is actually created on activation now.
- FIXED: Saving the options screen no longer resets the download path when the directory does not exist yet.
- FIXED: Deprecated
upgrade-functions.phpinclude andadd_option()third argument removed. - FIXED: Removed
download-admin-css.css, a zero-byte stylesheet that had been enqueued on every plugin admin screen since 2010. - NOTE: Some translated strings gained numbered placeholders (
%1$s), which changes their msgid. Those strings need retranslating. - NOTE: The downloads RSS feed’s title is built with a placeholder instead of gluing the site name onto a translated string that began with a space. Translators could not see that space, so the feed title ran together in every language but English. The msgid changed, so an existing translation of it falls back to English until it is retranslated
- NOTE: The bare “to” between the file chooser and the folder select carries translator context now. That msgid changed, so an existing translation of it falls back to English until it is retranslated
