-
Notifications
You must be signed in to change notification settings - Fork 85
Support WordPress.org plugin/theme directory URLs in install commands #483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Copilot
wants to merge
8
commits into
main
Choose a base branch
from
copilot/fix-plugin-install-zip-error
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix plugin installation error with ZIP format
Support WordPress.org plugin/theme directory URLs in install commands
Jan 5, 2026
swissspidy
reviewed
Jan 5, 2026
swissspidy
reviewed
Jan 5, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
command:plugin-install
Related to 'plugin install' command
command:theme-install
Related to 'theme install' command
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Users attempting to install plugins via WordPress.org directory URLs (e.g.,
https://wordpress.org/plugins/akismet/) encounter PCLZIP errors because the code treats these URLs as direct ZIP downloads, which they are not.Changes
URL Detection in
CommandWithUpgrade::install()~^https?://wordpress\.org/(plugins|themes)/([^/]+)/?~Detected WordPress.org plugins directory URL, using slug: akismetUpdated Command Documentation
Plugin_CommandandTheme_Commandto indicate directory URL supportTest Coverage
Example Usage
The implementation preserves existing behavior for direct ZIP URLs, GitHub URLs, and plain slugs.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
api.wordpress.org/usr/bin/curl curl -s REDACTED grep -l hUpgrade mmand/vendor/behat/behat/src/Behat/Config/Suite.php ep hUpgrade tainerLoader.phprev-list mposer/vendor/biremotes/origin/main..copilot/fix-plugin-install-zip-error grep -l '-d short_open_tag=Off' '-d error_reporting=E_ALL' '-n' '-l' './src/Plugin_Command.php' mmand/src/Theme_Command.php /home/REDACTED/.config/composer/vendor/bin/grep hUpgrade t/LifecycleEvent/home/REDACTED/work/extension-command/extension-command/vendor/bin/run-phpstan-tes--no-abbrev grep grep(dns block)/usr/bin/curl curl -s REDACTED -main/dist/ripgrep/bin/linux-x64origin -l hUpgrade mmand/src/WP_CLI/CommandWithUpgrade.php /usr/bin/grep hUpgrade er/EventDispatch-c tnet/tools/grep grep -l hUpgrade and/extension-command/vendor/behat/behat/src/Behat/Config/Suite.php ndor/bin/grep hUpgrade er.php ep grep(dns block)downloads.wordpress.org/usr/bin/curl curl -sSfL REDACTED grep -l hUpgrade and/extension-command/vendor/beh-l rgo/bin/grep hUpgrade ter.php n/grep grep /wp hUpgrade and/extension-command/src/WP_CLI/ParseThemeNameInput.php mposer/vendor/bin/grep hUpgrade Printer.php rep grep(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
This section details on the original issue you should resolve
<issue_title>Unable to install plugin by plugin directory URL</issue_title>
<issue_description>## Bug Report
Describe the current, buggy behavior
plugin install fails with ZIP error. php 8.3 and php 8.4
A clear and concise description of the behavior that produces a wrong result or error.
PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature
Remember to provide some context to make sure we're all on the same page when reasoning about this.
Describe how other contributors can replicate this bug
Describe what you would expect as the correct outcome
a plugin to be installed and activated. It used to work.
Let us know what environment you are running this on
Provide a possible solution
maybe the issue is with wp org not providing a zip file OR wp-cli can't download the file or it gets broken during transfer ?
full debug