Upload to GitHub WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA
Upload WordPress media files directly to a GitHub repository instead of the default uploads folder.
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/inject3r/upload-to-github/archive/refs/heads/master.zip
Upload to GitHub
Upload WordPress media files directly to a GitHub repository instead of the default uploads folder.
Banner

Description
Upload to GitHub automatically uploads all your media files to a GitHub repository.
Key Features
- Direct GitHub Upload: All media files are uploaded directly to your GitHub repository
- Automatic Repository Creation: If the repository doesn't exist, it will be automatically created
- Support for All Image Sizes: WordPress generates multiple image sizes - all are uploaded to GitHub
- Private and Public Repositories: Support for both public and private repositories
- Custom Upload Path: Define custom paths inside your repository
- Migrate Existing Media: Transfer all existing media files to GitHub
- GitHub Pages Support: For private repositories, media is served via GitHub Pages
How It Works
- Configure your GitHub credentials (username, repository name, and Personal Access Token)
- Choose repository visibility (public or private)
- Upload media files as usual - they'll be sent to GitHub
- All media URLs are automatically updated to point to GitHub
Installation
From WordPress Repository
- Go to Plugins > Add New in your WordPress admin
- Search for "Upload to GitHub"
- Click Install Now and then Activate
Manual Installation
- Upload the plugin files to
/wp-content/plugins/upload-to-github - Activate the plugin through the Plugins screen
- Go to Upload to GitHub in the admin menu and configure your settings
- Enter your GitHub username, repository name, and Personal Access Token
- Click Save Settings and Test Connection
Frequently Asked Questions
How do I get a GitHub Personal Access Token?
- Log in to GitHub
- Go to Settings > Developer settings > Personal access tokens
- Click Generate new token
- Select the
reposcope - Copy the token and paste it into the plugin settings
Can I use this with a private repository?
Yes! Select "Private (GitHub Pages)" as the repository visibility. The plugin will automatically create a GitHub Pages repository.
What happens to my media URLs?
All media URLs are automatically updated to point to GitHub.
Can I change the upload path?
Yes! Set a custom path in the plugin settings. Example: "test/test2" will upload to /test/test2/uploads/year/month/.
Changelog
1.0.0
- Initial release
- Direct upload to GitHub repository
- Support for all WordPress image sizes
- Private repository support with GitHub Pages
- Media migration from WordPress uploads folder
- Custom upload path support
- Full translation support (Persian, Arabic, German, Spanish, French, Russian, Turkish)
Requirements
- WordPress 5.0 or higher
- PHP 7.4 or higher
- GitHub account with Personal Access Token (repo scope)
Support
For support, feature requests, or bug reports:
https://github.com/inject3r/upload-to-github/issues
WordPress Plugin Repository
This plugin is also available on the official WordPress Plugin Directory:
https://wordpress.org/plugins/upload-to-github/
License
GPLv2 or later
Releases
2 releases.
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.