AccessCode File Downloader
AccessCode File Downloader is a WordPress plugin that lets you protect your files with an access code. Users must enter a valid code to download files, ensuring secure and controlled distribution. Ideal for private resources, premium content, or confidential documents.
Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/sambanihit98/accesscode-file-downloader/archive/refs/heads/main.zipEasily protect and distribute your files with an access code in WordPress.
Users must enter a valid code to download files, ensuring secure and controlled file distribution. Perfect for private resources, premium content, or confidential documents.
Features
- Create a Custom Post Type for secure downloads.
- Assign access codes and file URLs to each download.
- Generate a download button shortcode for embedding anywhere.
- Modal popup for access code input before download.
- AJAX-based code validation for a smooth user experience.
- Temporary secure download links with token system.
- Admin columns showing Post ID and Shortcode, with copy-to-clipboard functionality.
- Built-in Customizer support to style buttons (background, text, hover states).
- Fully responsive and lightweight, no extra dependencies.
Installation
- Go to your WordPress installation directory.
- Navigate to
/wp-content/plugins/. - Create a folder named
accesscode-file-downloader. - Place the plugin file (
accesscode-file-downloader.php) inside the folder. - Go to your WordPress admin dashboard → Plugins → Installed Plugins.
- Activate AccessCode File Downloader.
- Create downloads from the AccessCode File Downloader menu.
- Add the access code and file URL for each file.
- Use the shortcode below to display the download button.
Usage
Shortcode
[acfd_button id="POST_ID" text="Download File" align="center"]
Parameters
id(required) – The Post ID of the filetext(optional) – Button label (default: "Download File")align(optional) – Button alignment:left,center,right
Customizer
You can customize the appearance of the download button directly from the WordPress Customizer.
Go to:
Appearance → Customize → AccessCode File Downloader
Available Options
- Button Background Color
- Button Hover Color
- Button Text Color
- Button Text Hover Color
Changes are applied instantly across all buttons generated by the plugin.
Notes
- Files must be located inside the WordPress uploads directory for security.
- Download links are temporary and token-based, expiring automatically.
- No page reload is required for validation — everything runs via AJAX.
Author
Sam Banihit
https://sam-banihit.vercel.app/