WordPress / WordPress/HelpHub

Clarify theme ZIP file structure for updates

Open
#358 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
116
Forks
54
PR merge metrics
No merged PRs in 30d

Description

The current documentation implicitly assumes that a theme's ZIP file will contain a single root folder and that all theme files will reside within that folder. This is a common and well-known best practice among experienced developers. However, it is not explicitly stated as a hard requirement (or I'm unable to find this requirement in the docs).

This lack of explicit documentation can lead to a specific bug, as demonstrated in the Trac ticket https://core.trac.wordpress.org/ticket/63737. When a user attempts to update a theme via ZIP upload, if the theme's files are at the root of the ZIP archive (instead of being inside a containing folder), a previous failed update attempt (e.g., trying to upload the theme ZIP through the plugin installer) can cause subsequent, correct update attempts to fail. WordPress, in this scenario, creates a new directory (e.g., my-theme-1) instead of overwriting the existing theme folder, breaking the update process.

Proposed Change:
Add a new, clear, and prominent section to the relevant documentation that explicitly states the correct ZIP file structure for themes. This should be added to both developer-facing and user-facing documentation.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the relevant developer-facing and user-facing theme update documentation, then review Trac ticket 63737 for the reported ZIP behavior. Done means both documentation areas clearly state that a theme ZIP must contain its files inside a single root folder.

Written by the indexing model from the issue text.

Assessment

Tech stack
wordpress
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.