A WordPress plugin that enables automatic updates and installations of themes and plugins directly from GitHub repositories, including private repositories.
- 🔄 Automatic Updates: Keep your GitHub-hosted themes and plugins up-to-date automatically
- đź”’ Private Repository Support: Works with private GitHub repositories using personal access tokens
- 📦 Direct Installation: Install themes and plugins directly from GitHub without manual downloads
- 🛡️ Secure Authentication: Uses GitHub personal access tokens for secure API access
- 🎯 Easy Configuration: Simple admin interface for managing repositories
- 📊 Connection Testing: Built-in tools to verify GitHub API connectivity
- 🔍 Repository Search: Search and preview GitHub repositories before installation
- WordPress 5.2 or higher
- PHP 7.2 or higher
- GitHub personal access token (for private repositories)
wp_remote_get()function enabled (WordPress HTTP API)
- Download the plugin files
- Upload the
dd-wp-github-updatesfolder to your/wp-content/plugins/directory - Activate the plugin through the 'Plugins' menu in WordPress
- Navigate to GitHub Updates in your admin menu to configure
cd /path/to/wordpress/wp-content/plugins/
git clone https://github.com/gabydevdev/dd-wp-github-updates.gitTo use this plugin, you'll need a GitHub personal access token:
- Go to GitHub Settings > Developer settings > Personal access tokens
- Click "Generate new token (classic)"
- Give it a descriptive name (e.g., "WordPress GitHub Updates")
- Select the following scopes:
repo- Full control of private repositories (required)read:packages- Read packages (optional, only if using GitHub packages)
- Click "Generate token"
- Copy the token immediately (you won't be able to see it again)
- In WordPress admin, go to GitHub Updates
- Paste your GitHub token in the "Personal Access Token" field
- Click "Test Connection" to verify the token works
- Save the settings
- Go to GitHub Updates in your admin menu
- Scroll down to "Add Repository"
- Fill in the repository details:
- Type: Theme or Plugin
- Owner: GitHub username or organization
- Repository Name: The repository name
- Theme Slug: (for themes) The directory name of your theme
- Plugin File: (for plugins) The main plugin file path (e.g.,
my-plugin/my-plugin.php)
- Go to GitHub Updates > Install from GitHub
- Enter the repository owner and name
- Click "Search Repository" to preview the repository
- Choose installation type (Theme or Plugin)
- Configure installation options:
- Custom slug/directory name
- Activate after installation
- Add to updater list for future updates
- Click "Install Now"
The plugin works best with GitHub releases:
- Create a new release in your GitHub repository
- Use semantic versioning (e.g.,
v1.0.0,v1.2.3) - The plugin will automatically detect new releases
- WordPress will show update notifications when new versions are available
The plugin checks for updates by:
- Comparing the version in your theme's
style.cssor plugin's main PHP file - Against the latest GitHub release tag
- Triggering WordPress update notifications when newer versions are found
dd_github_updates_before_install- Fired before installation beginsdd_github_updates_after_install- Fired after successful installation
dd_github_updates_download_timeout- Modify download timeout (default: 60 seconds)dd_github_updates_api_timeout- Modify API request timeout (default: 10 seconds)
// Get the API instance
$api = new DD_GitHub_API();
// Test connection
$response = $api->test_connection();
// Get latest release
$release = $api->get_latest_release('owner', 'repo-name');
// Install a package programmatically
$installer = new DD_GitHub_Installer();
$result = $installer->install_github_package(
'plugin', // type
'owner', // GitHub username
'repo-name', // repository name
'', // download URL (optional)
'custom-slug', // custom slug (optional)
true // activate after install
);- Verify your GitHub token is correct
- Ensure the token has
reposcope for private repositories - Check if your server can make outbound HTTPS requests
- Verify the repository owner and name are correct
- Ensure your token has access to the repository (for private repos)
- Check if the repository exists and is accessible
- Ensure your repository has releases or can be downloaded as ZIP
- Check if the repository contains valid theme/plugin files
- Verify the repository structure matches WordPress requirements
- Check WordPress file permissions
- Ensure the destination directory is writable
- Verify the repository contains valid WordPress theme/plugin structure
Enable WordPress debug logging to see detailed error messages:
// Add to wp-config.php
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);Check /wp-content/debug.log for detailed error messages.
Ensure your server supports:
wp_remote_get()function- Outbound HTTPS connections to
api.github.com - ZIP file extraction (
unzip_file()function) - Adequate memory limit for large repositories
- Token Security: Store GitHub tokens securely and never commit them to version control
- Repository Access: Only add repositories you trust to the updater
- File Permissions: Ensure proper WordPress file permissions are maintained
- SSL Verification: The plugin enforces SSL certificate verification for all GitHub API requests
# Clone the repository
git clone https://github.com/gabydevdev/dd-wp-github-updates.git
cd dd-wp-github-updates
# Set up development environment
# Follow WordPress plugin development best practices- Initial release
- GitHub API integration
- Automatic updates for themes and plugins
- Private repository support
- Direct installation from GitHub
- Admin interface for repository management
This plugin is licensed under the GPL v2 or later.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
- Documentation: Check this README and inline code comments
- Issues: Report bugs on the GitHub repository
- Install the plugin and activate it
- Get a GitHub token with
reposcope - Configure the token in WordPress admin
- Add repositories you want to manage
- Install new themes/plugins directly from GitHub
- Enjoy automatic updates from your GitHub repositories!
For detailed instructions, see the sections above.