WordPress: “The theme is missing the style.css stylesheet”
Getting “Unable to install this package. The theme is missing the style.css stylesheet” when uploading a theme? Here are the 4 causes and the 2-minute fix.
What you are looking at
You upload a theme zip under Appearance → Themes → Add New → Upload Theme and WordPress stops with:
Unable to install this package. The theme is missing the style.css stylesheet. Theme installation failed.
The theme is not broken. WordPress simply could not find a style.css file where it expects it: inside the first folder of the zip. Here is why that happens and how to fix it in two minutes.
Why WordPress throws this error
WordPress only accepts a zip whose structure looks like this:
my-theme.zip
└── my-theme/
├── style.css ← must be here, with a "Theme Name:" header
├── index.php
└── ...Anything else — an extra wrapper folder, the theme buried in a subfolder, or no style.css at all — triggers the error.
The 4 common causes
1. You downloaded the source code from GitHub, not the theme
“Code → Download ZIP” on GitHub gives you the repository, not a ready-to-install theme. The zip is named repo-name-main.zip or repo-name-0.0.1.zip and often contains README files, build configs, or the theme inside a subfolder.
Fix: check the repository’s Releases page first. Maintainers usually attach a packaged theme zip there. Use that one.
2. The theme lives in a subfolder
Many repos keep the actual theme in theme/, dist/, build/ or src/. WordPress only looks one level deep.
Fix: unzip the download, find the folder that contains style.css, and zip that folder only. Upload the new zip.
3. The theme needs a build step
If the repo has a package.json, webpack.config.js or vite.config.js, the theme files may not exist until you build them.
Fix:
npm install
npm run buildThen zip the output folder (usually dist/ or build/) that contains style.css.
4. It is a plugin, not a theme
Plugins do not have style.css — they have a main PHP file with a “Plugin Name:” header. If the zip you are uploading is actually a plugin, install it under Plugins → Add New → Upload Plugin instead.
Still failing? Check the style.css header
WordPress also needs a valid header at the top of style.css:
/*
Theme Name: My Theme
Theme URI: https://example.com
Author: Your Name
Version: 1.0.0
*/Without at least Theme Name, WordPress treats the file as missing.
Alternative: install via FTP
If zipping keeps going wrong, skip the uploader:
- Unzip the theme locally.
- Upload the folder containing style.css to /wp-content/themes/ via FTP or your host’s file manager.
- Go to Appearance → Themes and activate it.
Quick checklist
- Zip opens to one folder with style.css directly inside it
- style.css has a Theme Name: header
- You used the Releases zip, not “Download ZIP”
- Ran npm run build if the repo has a package.json
- It is really a theme, not a plugin
