[wp-trac] [WordPress Trac] #63737: Theme update fails, creates duplicate directory after incorrect plugin update attempt
WordPress Trac
noreply at wordpress.org
Tue Jul 22 13:35:52 UTC 2025
#63737: Theme update fails, creates duplicate directory after incorrect plugin
update attempt
-----------------------------+-----------------------------
Reporter: leemon | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Upgrade/Install | Version: 6.8.2
Severity: normal | Keywords:
Focuses: |
-----------------------------+-----------------------------
When attempting to update an existing theme (e.g., my-theme) via ZIP
upload using the WordPress admin installer, an issue arises if a prior,
incorrect update attempt was made through the plugin installer.
Steps to reproduce:
1. Have an existing theme installed (e.g., my-theme).
2. Prepare a ZIP file of an updated version of my-theme.
3. Navigate to Plugins > Add New > Upload Plugin.
4. Attempt to upload the theme ZIP file.
5. WordPress correctly displays the error: "The package could not be
installed. No valid plugins were found. Plugin installation failed."
6. Navigate to Appearance > Themes > Add New > Upload Theme.
7. Attempt to upload the same theme ZIP file that was used in step 4.
8. Expected behavior: WordPress should overwrite the existing wp-
content/themes/my-theme directory with the contents of the uploaded ZIP
file, effectively updating the theme.
9. Actual behavior: Instead of overwriting, WordPress creates a new
directory named wp-content/themes/my-theme-1 and installs the updated
theme there. The original wp-content/themes/my-theme directory remains
untouched.
10. Subsequent attempts to update the theme through the theme installer
will continue to create new directories, making it impossible to update
the theme correctly.
This behavior suggests that the failed plugin installation attempt leaves
a residual state or flag that incorrectly influences subsequent theme
update attempts, preventing the proper overwrite of the existing theme
directory. This can lead to a cluttered themes directory and a broken
update mechanism for the affected theme.
I'm using WP 6.8.2, but this behavior affects previous versions, too.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63737>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list