The exact error: "The package could not be installed. The theme is missing the style.css stylesheet."
This message appears in Appearance → Themes → Add New → Upload Theme immediately after you select a zip file. WordPress unzips the archive into a temporary folder, looks for a file named exactly style.css in the root of that archive, and if it does not find one, it aborts the install and shows this message before touching your file system permanently.
The most common cause is that your zip file contains a single subfolder (for example my-theme/style.css) instead of putting style.css directly at the top level of the archive. When you compress a folder on macOS or Windows by right-clicking it, the resulting zip wraps everything inside that folder name, which WordPress does not expand recursively when searching for style.css.
- Unzip the archive on your computer and check the top level of the extracted folder.
- Confirm style.css sits directly inside that top folder, not one level deeper.
- If it is nested, move all theme files up one directory so style.css, index.php, and functions.php are siblings.
- Re-zip by selecting the files themselves (not the containing folder) and compressing them, or use a zip utility that lets you control the root.
- Re-upload through Appearance → Themes → Add New → Upload Theme.
Checking the zip structure from the command line
If you are unsure whether your zip is nested, run "unzip -l yourtheme.zip" in a terminal and read the file paths in the output. If every path starts with a folder name like my-theme/, WordPress will read that as the theme's slug folder, which is actually fine as long as style.css appears as my-theme/style.css and not my-theme/my-theme/style.css.
The real failure case is a double-nested archive, which happens when a zip utility compresses a folder that itself contains only one folder. Extract, flatten, and re-compress if you see this pattern. Tools like Themify package the output correctly by default, so this class of error mainly affects themes zipped manually after editing.
Fixing upload size limits: "The uploaded file exceeds the upload_max_filesize directive"
If your zip is small (under 2MB) and still fails with a size-related message, or the upload just times out with no clear error, the server's PHP configuration is rejecting it before WordPress even reads the contents. Two settings control this: upload_max_filesize, which caps the size of any single uploaded file, and post_max_size, which must be equal to or larger than upload_max_filesize because the upload is sent as part of a POST request.
Many hosts default upload_max_filesize to 2M or 8M, which is too small for theme zips that bundle large screenshot images, demo content, or fonts. Ask your host to raise it, or if you have access, edit php.ini or add directives to a .htaccess file in your WordPress root.
- upload_max_filesize = 64M
- post_max_size = 64M
- memory_limit = 256M
- max_execution_time = 300
PHP memory limit errors during install
A separate failure looks like a blank white screen or "Fatal error: Allowed memory size of X bytes exhausted" right after upload. This is WordPress running out of memory while extracting the zip or activating the theme, not a problem with the zip itself. Raise memory_limit in wp-config.php by adding define('WP_MEMORY_LIMIT', '256M'); above the line that says "That's all, stop editing!"
If you do not have server access to change php.ini, most managed WordPress hosts expose a memory limit setting in their control panel, or you can request it from support. Shared hosting plans with a hard 64M ceiling are the most frequent source of this error.
When the upload succeeds but activation fails
Occasionally the zip uploads cleanly but clicking Activate produces a critical error. That is a different problem covered in our theme activation troubleshooting guide, usually a PHP fatal error inside functions.php rather than anything related to the zip structure or size.
Avoiding the problem entirely when building or converting a theme
If you are converting a live website into a WordPress theme by hand, it is easy to introduce a nested folder or leave out style.css's required header while zipping. Tools built specifically for this job, like the Themify browser extension, package the output as a valid WordPress theme structure automatically, with style.css at the root and the correct header fields already filled in, which removes this entire category of error.
If you prefer to build manually, keep a checklist: style.css at the root with a proper header, index.php present, and a flat top-level structure before you ever run the zip command.
Frequently asked questions
- Why does WordPress say style.css is missing when it clearly exists in my zip?
- It almost always means the file is nested one folder too deep. WordPress only checks the top level of the extracted archive for style.css, so any subfolder wrapping breaks the check.
- What is the maximum theme zip size WordPress accepts?
- There is no WordPress-specific limit; it depends entirely on your server's upload_max_filesize and post_max_size settings in php.ini, which you or your host can raise.
- Can I upload a theme via FTP instead of the zip uploader to avoid these errors?
- Yes. Uploading the unzipped theme folder directly into wp-content/themes/ via FTP or SFTP bypasses the zip upload limits and the nested-folder check entirely.
- Does increasing memory_limit fix a corrupted zip file?
- No. Memory limit errors and corrupted zip files produce different symptoms; if the file is genuinely corrupted, re-download or re-create the zip rather than adjusting PHP settings.
