Hfarazm File Fetcher
Fetch any remote file and save it into your WordPress directory.
by Hfarazm Software LLC · github.com/farazi482/simple-remote-file-fetcher · 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/farazi482/simple-remote-file-fetcher/archive/refs/heads/master.zipA lightweight WordPress plugin that lets site administrators fetch any remote file via URL and save it directly into the WordPress directory — without needing FTP or shell access.
Features
- Fetch any publicly accessible file by URL (ZIP, PHP, images, etc.)
- Save the file to any path relative to the WordPress root
- Simple admin interface under the WordPress dashboard
- Uses WordPress's built-in
wp_remote_getfor reliable, timeout-tolerant downloads - Restricted to administrators (
manage_optionscapability)
Requirements
| Requirement | Minimum Version |
|---|---|
| WordPress | 5.0 or higher |
| PHP | 7.2 or higher |
PHP allow_url_fopen |
Must be enabled (or cURL available) |
| User Role | Administrator |
Your server must be able to make outbound HTTP/HTTPS requests. Some managed or restricted hosts block these — check with your host if downloads fail.
Installation
Option 1: Manual Upload (Recommended)
- Download or clone this repository.
- Copy the
simple-remote-file-fetcher.phpfile into your WordPress plugins directory:/wp-content/plugins/simple-remote-file-fetcher/ - Log in to your WordPress admin panel.
- Go to Plugins → Installed Plugins.
- Find Simple Remote File Fetcher and click Activate.
Option 2: Upload via WordPress Admin
- Download the plugin file.
- In WordPress admin, go to Plugins → Add New → Upload Plugin.
- Upload the
.phpfile (or a ZIP containing it). - Click Install Now, then Activate.
Usage
- After activation, go to File Fetcher in the WordPress admin sidebar.
- Fill in the form:
- Remote File URL — the full URL of the file you want to download.
Example:
https://example.com/files/package.zip - Save Path (relative to WP root) — where to save the file on your server, relative to your WordPress installation root.
Example:
wp-content/uploads/package.zip
- Remote File URL — the full URL of the file you want to download.
Example:
- Click Fetch File.
- A success message will show the full saved path, or an error message if the download failed.
Save Path Examples
| Intent | Save Path |
|---|---|
| Save to uploads folder | wp-content/uploads/myfile.zip |
| Save to a custom folder | wp-content/myfolder/script.php |
| Save to WP root | myfile.txt |
Note: The path is always relative to the WordPress root (
ABSPATH). Leading slashes are stripped automatically.
Security Notes
- Only users with the
manage_optionscapability (Administrators) can access this plugin. - The URL is sanitized with
esc_url_rawand the save path withsanitize_text_fieldbefore use. - Be cautious about the paths you specify — saving executable files (
.php) to web-accessible locations can be a security risk if the source URL is untrusted.
Troubleshooting
Download fails with a timeout error
- The default timeout is set to 300 seconds. For very large files, your server's PHP
max_execution_timemay still cut it short. Increase it inphp.inior.htaccessif needed.
"Error: Could not connect" or similar
- Your server may be blocking outbound HTTP requests. Contact your hosting provider.
File is not appearing at the expected path
- Double-check the save path is relative to the WP root, not an absolute server path.
- Ensure the destination directory exists and is writable by the web server.
Author
Hfarazm Software LLC
License
This plugin is released under the GPLv2 or later license, consistent with WordPress plugin standards.