YTDLP-WP Video Downloader - Lite
A free plugin to integrate YT-DLP library in a WordPress website and create a video downloader website.
by Mian Shahzad Raza · github.com/wpacademy/ytdl-wp-lite · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/wpacademy/ytdl-wp-lite/archive/refs/heads/main.zipReadme
YT-DLP WordPress Plugin
A simple and secure WordPress plugin that integrates yt-dlp for video downloading with a minimal backend settings page and feature-rich frontend UI.
YTDLP-WP Pro Version
Buy the premium version and unlock more features and improved downloading
Features
- Simple Backend: Minimal settings page for easy configuration
- Rich Frontend UI: Beautiful, responsive download interface with shortcode support
- Multiple Formats: Support for MP4, WebM, MKV, MP3, M4A, WAV, and FLAC
- Quality Options: Choose between best quality or smaller file sizes
- Video Preview: Display video thumbnail, title, uploader, and duration before downloading
- Secure Downloads: Token-based download system with automatic file cleanup
- File Size Limits: Configurable maximum file size to prevent abuse
- AJAX-Powered: Smooth user experience without page reloads
Server Requirements
Required
- PHP: 7.4 or higher
- WordPress: 5.8 or higher
- yt-dlp: Must be installed on the server
- Shell Access: PHP must be able to execute shell commands (
shell_exec,exec) - FFmpeg: Required for format conversion (audio extraction, format merging)
Permissions
- Write permissions for WordPress uploads directory
- Execute permissions for yt-dlp binary
Installation
Step 1: Install yt-dlp
On Ubuntu/Debian:
sudo wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -O /usr/local/bin/yt-dlp
sudo chmod a+rx /usr/local/bin/yt-dlp
Or using pip:
sudo pip install yt-dlp
Verify installation:
yt-dlp --version
Step 2: Install FFmpeg
On Ubuntu/Debian:
sudo apt-get update
sudo apt-get install ffmpeg
Verify installation:
ffmpeg -version
Step 3: Install WordPress Plugin
- Upload the plugin folder to
/wp-content/plugins/ - Activate the plugin through the 'Plugins' menu in WordPress
- Go to Settings → YT-DLP Downloader to configure
Configuration
Backend Settings
Navigate to Settings → YT-DLP Downloader in WordPress admin:
- YT-DLP Path: Full path to yt-dlp binary (default:
/usr/local/bin/yt-dlp) - Max File Size: Maximum allowed download size in MB (default: 500 MB)
- Download Timeout: Maximum time for a single download in seconds (default: 300s)
- Allowed Formats: Select which formats users can download
- Enable Logging: Turn on for debugging download issues
Frontend Usage
Add the shortcode to any page or post:
[ytdlp_downloader]
With custom attributes:
[ytdlp_downloader title="Download Videos" placeholder="Paste YouTube URL here"]
Security Features
Input Validation
- URL sanitization and validation
- Format whitelist enforcement
- File size limits
Download Security
- Token-based download URLs
- Temporary file storage
- Automatic cleanup after 1 hour
- .htaccess protection for download directory
PHP Security
- Nonce verification for all AJAX requests
- Capability checks for admin functions
- Escaped output for all user-facing content
- Command injection prevention via
escapeshellarg()
File Structure
yt-dlp-wordpress-plugin/
├── yt-dlp-downloader.php # Main plugin file
├── includes/
│ ├── class-settings.php # Admin settings page
│ ├── class-downloader.php # Download handler
│ └── class-frontend.php # Shortcode & frontend
├── assets/
│ ├── css/
│ │ └── frontend.css # Frontend styles
│ └── js/
│ └── frontend.js # Frontend JavaScript
└── README.md # This file
Usage Flow
- User enters video URL and clicks "Get Video Info"
- Plugin fetches video metadata using yt-dlp
- Video information is displayed (thumbnail, title, duration, uploader)
- User selects format and quality preferences
- User clicks "Download" button
- Video is downloaded to temporary directory
- Secure download link is generated
- File is automatically deleted after 1 hour
Supported Platforms
The plugin works with any platform supported by yt-dlp, including:
- YouTube
- Vimeo
- TikTok
- And 1000+ other sites
Troubleshooting
"yt-dlp not found" Error
- Verify yt-dlp is installed:
which yt-dlp - Update the path in plugin settings
- Check file permissions
"Download failed" Error
- Check PHP
shell_execis not disabled - Verify FFmpeg is installed for format conversion
- Check upload directory permissions
- Enable logging in settings to see detailed errors
Timeout Issues
- Increase timeout value in settings
- Check server PHP
max_execution_time - Consider server resources for large files
Format Not Available
- Some formats may not be available for all videos
- Try selecting "Best Quality" with MP4 format
- Check video source restrictions
Performance Considerations
- Downloads are processed server-side, consuming server resources
- Large files require adequate disk space
- Consider implementing rate limiting for public sites
- Monitor temporary directory size
Uninstallation
The plugin cleans up temporary files on deactivation. To fully remove:
- Deactivate the plugin
- Delete the plugin files
- Manually remove
/wp-uploads/yt-dlp-downloads/if desired
License
GPL v2 or later
Credits
- Built with yt-dlp
- Requires FFmpeg for format conversion
Support
For issues related to:
- Plugin bugs: Check WordPress debug logs
- yt-dlp issues: Visit yt-dlp GitHub
- Specific sites: Check yt-dlp supported sites list
Changelog
Version 1.0.0
- Initial release
- Basic download functionality
- Admin settings page
- Frontend shortcode with AJAX
- Security features implemented
Read the full README on GitHub →
Releases
| Tag | Published |
|---|---|
| 1.0.0 | Nov 16, 2025 |
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.