Opened 7 weeks ago
Last modified 4 weeks ago
#66186 new enhancement
After uploading a plugin zip, link to the Plugin settings instead of the "Plugin Installer"
| Reported by: | BusinessBloomer | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | General | Version: | |
| Severity: | normal | Keywords: | has-patch has-unit-tests |
| Cc: | Focuses: | ui, administration |
Description
After a plugin is installed by uploading a zip (Plugins > Add New Plugin > Upload Plugin), the result screen shows "Activate Plugin", and once that's done a "Go to Plugin Installer" link pointing to plugin-install.php.
Nobody who just uploaded a plugin needs the Plugin Installer next :)
They uploaded a zip, so they weren't browsing the directory. The useful place to go is the Plugin's settings page (?).
"Go to Plugin Installer" is the only way off the screen, and it goes to the wrong place.
History
Before [37221] (#35429, 4.6), uploads fell through to the default "Return to Plugins page" link. That changeset moved the upload form from its own page onto the Add Plugins screen and added a dedicated 'upload' === $this->type && 'plugins' === $from branch pointing back to the installer. That branch seems to exist only to send users back to where the form now lives. Now that the upload form is a toggle on the installer screen, going back there has no purpose.
Proposed fix
Remove that branch from Plugin_Installer_Skin::after() so uploads use the existing else branch, "Go to Plugins page" (plugins.php).
Installs from the directory ('web') keep "Go to Plugin Installer", since people often install several plugins in a row there. The importer flow is unchanged. There are no new strings, and sites can still change the link through the install_plugin_complete_actions filter.
Patch attached.
Testing instructions
- Go to Plugins > Add New Plugin > Upload Plugin and upload any valid plugin zip.
- On the result screen, confirm the secondary link reads "Go to Plugins page" and opens
plugins.php. - Install a plugin from the directory with JS disabled (
update.php?action=install-plugin) and confirm it still shows "Go to Plugin Installer".
Related
- #35429: moved the upload form onto the Add Plugins screen and introduced the installer link for uploads.
- #60578: added the installer link to the upload error screen, a different case where the link makes sense.
- #66184: same result screen, Activate button with unmet plugin dependencies.
- #40651: finding plugin settings after activation, which would be the natural next step beyond this fix.
Attachments (5)
Change History (11)
#1
@
7 weeks ago
Clarifying the main case, since the screenshots above show a fresh upload where "Activate Plugin" is still there.
When you update an active plugin by zip (upload the new version, click "Replace current with uploaded"), the result screen says "Plugin updated successfully." and the only link on it is "Go to Plugin Installer" (see trac-upload-replace-before.png). The plugin is already installed and active, so the installer is the one place the user has no reason to go.
On settings: linking straight to the plugin's settings screen would be ideal, but it isn't possible from this screen. On a fresh upload the plugin isn't active yet, so its Settings action link and admin menu pages aren't registered, and there's no plugin header that declares a settings URL. That's what #40651 is about. The attached patch does the part that is possible now: it sends uploads to the Plugins page, where the Settings link does show up once the plugin is active. I've updated the summary to match.
Additional testing step: activate a plugin, upload a newer zip of it, click "Replace current with uploaded", and confirm the only link is now "Go to Plugins page".
This ticket was mentioned in PR #13790 on WordPress/wordpress-develop by @therssoftware.
7 weeks ago
#2
- Keywords has-patch has-unit-tests added
Trac ticket: https://core.trac.wordpress.org/ticket/66186
Description
Following a plugin installation via uploaded ZIP (Plugins > Add New Plugin > Upload Plugin), the action screen displays "Go to Plugin Installer" pointing to plugin-install.php.
Users who upload a plugin ZIP were not browsing the plugin directory; the relevant destination is the Plugins screen (plugins.php). This also matches Theme_Installer_Skin, where uploaded theme installations link to "Go to Themes page" (themes.php).
Changes
- Removed the dedicated
elseif ( 'upload' === $this->type && 'plugins' === $from )branch inPlugin_Installer_Skin::after(). Upload installs now fall through to the default branch linking toplugins.php("Go to Plugins page") withtarget="_parent". - Added unit tests for
Plugin_Installer_Skinintests/phpunit/tests/admin/pluginInstallerSkin.phpcovering upload installs, web directory installs, import flows, andhide_process_failed().
Testing Instructions
- Navigate to Plugins > Add New Plugin > Upload Plugin.
- Upload and install any plugin ZIP.
- Verify the final screen displays "Go to Plugins page" linking to
plugins.phpinstead of "Go to Plugin Installer". - Run PHPUnit:
npm run test:php -- tests/phpunit/tests/admin/pluginInstallerSkin.php
---
AI Disclosure
Assisted by generative AI tools to write unit test cases and run automated verification checks (PHPUnit and PHPCS).
This ticket was mentioned in PR #14236 on WordPress/wordpress-develop by @wprashed.
5 weeks ago
#4
---
Description
When a plugin is installed by uploading a zip file (Plugins > Add New Plugin > Upload Plugin), the installation result screen shows an "Activate Plugin" button and a secondary "Go to Plugin Installer" link pointing to plugin-install.php.
In [37221] (#35429), the upload form was moved into the Add Plugins screen and an 'upload' === $this->type && 'plugins' === $from branch was added to send users back to where the form now lives. However, users who just uploaded a plugin zip file do not need to browse the plugin directory next; they need to manage their installed plugins on the Plugins page (plugins.php), matching how theme uploads work in Theme_Installer_Skin.
Solution
Remove the 'upload' === $this->type && 'plugins' === $from branch from Plugin_Installer_Skin::after(). Uploads now fall through to the default "Go to Plugins page" (plugins.php) link. Installs from the WordPress.org directory ('web' === $this->type) continue to show "Go to Plugin Installer".
How to test
- Go to Plugins > Add New Plugin > Upload Plugin and upload a valid plugin zip file.
- On the installation result screen, verify that the secondary link now reads "Go to Plugins page" and points to
plugins.php. - Install a plugin directly from the WordPress directory (with JS disabled or via
update.php?action=install-plugin) and verify that it still shows "Go to Plugin Installer".
#5
@
4 weeks ago
Reproduction Report
This report validates that the issue can be reproduced.
Environment
- WordPress: [e.g. 7.0 / trunk] (WordPress Playground)
- Browser: [e.g. Chrome 1xx on Windows 11]
- Theme: [Twenty Twenty-Five]
- Plugins: None (other than the uploaded test plugin)
- PHP: [e.g. 8.x]
Steps taken
- Opened a fresh site in WordPress Playground and logged in to wp-admin.
- Went to Plugins > Add New Plugin > Upload Plugin.
- Uploaded a valid plugin zip ([plugin name / test-upload-plugin.zip]) and clicked "Install Now".
- Observed the links on the result screen.
- Clicked "Activate Plugin", then observed the links again.
Expected result
After uploading a zip, the result screen should offer a useful next step, such as the Plugins page or the plugin's settings. It should not send the user back to the directory browser they were not using.
Actual result
✅ Issue reproduced. The result screen shows "Activate Plugin", and after activation the only secondary link is "Go to Plugin Installer", which points to plugin-install.php. There is no link to the Plugins page or to the plugin's settings.
Before