How to Fix the 'Stylesheet is Missing' Error in Your Twenty Ten Child Theme
Content
Creating a child theme for the Twenty Ten theme is a fundamental and recommended practice for making customizations. However, a common and frustrating roadblock many users hit is the error message: The following themes are installed but incomplete. Themes must have a stylesheet and a template. Stylesheet is missing.
This error prevents you from activating your new child theme, halting your progress. Based on community reports, this issue is almost always caused by a simple mistake in the child theme's setup rather than a bug in the Twenty Ten theme itself.
Why This Error Happens
WordPress requires two essential files to recognize a folder as a valid theme: a style.css file and a index.php file. The "stylesheet is missing" error means WordPress cannot find a properly formatted style.css file in your child theme's directory. The most common reasons are:
- Incorrect File Name: The file must be named exactly
style.css. - Syntax Error in the Header Comment: The metadata comment at the top of the
style.cssfile is malformed, missing a required field, or contains smart quotes. - File Permissions: The web server does not have read permissions for the file.
- Incorrect Directory Location: The child theme folder is not placed in the
/wp-content/themes/directory.
How to Fix It: A Step-by-Step Guide
Follow these steps to resolve the issue and successfully create your Twenty Ten child theme.
Step 1: Verify the Folder and File Structure
Ensure your child theme is set up with the correct structure. It should look like this:
/wp-content/themes/
├── twentyten/ (Parent theme)
│ ├── style.css
│ ├── index.php
│ └── ...
└── twentyten-child/ (Your child theme folder)
├── style.css (Your child theme's stylesheet)
└── functions.php (Optional, but recommended)
Step 2: Create a Correctly Formatted style.css File
The content of your style.css file is critical. It must begin with a specific header comment. Use a plain text editor like Notepad++ or Visual Studio Code to create this file; do not use rich-text editors like Microsoft Word, as they can insert invalid characters.
Copy and paste the following code exactly into your style.css file. Pay close attention to the use of straight quotes (' and ") instead of curly or “smart” quotes.
/*
Theme Name: Twenty Ten Child
Theme URI: http: //example.com/
Description: A child theme of the default Twenty Ten WordPress theme.
Author: Your Name
Author URI: http: //example.com/about/
Template: twentyten
Version: 1.0.0
*/
@import url("../twentyten/style.css");
/* =Theme customization starts here
-------------------------------------------------------------- */
/* Add your custom CSS rules below this line */
Key Points:
- Template: This line is the most important. It must exactly match the directory name of the parent theme, which is
twentyten(all lowercase). - @import Rule: This line loads the parent theme's styles. Ensure the path is correct.
Step 3: Upload and Activate
Once you have created the style.css file with the correct header, upload the entire twentyten-child folder to your server's /wp-content/themes/ directory.
Log in to your WordPress dashboard, navigate to Appearance > Themes. You should now see your "Twenty Ten Child" theme available. Click "Activate".
What to Do If the Error Persists
If you still see the error after following the steps above, try these advanced troubleshooting tips:
- Check File Permissions: Using your hosting control panel or an FTP client, check the permissions of the
style.cssfile. It should typically be set to644. - Create an index.php File: While a child theme should inherit the parent's
index.php, creating a bare-bones one in your child theme folder can sometimes resolve the error. Simply create a new file namedindex.phpand add this single line:<?php // Silence is golden. - Enable Debugging: Add
define('WP_DEBUG', true);to yourwp-config.phpfile. This might reveal a more specific error message that can help pinpoint the problem.
By carefully checking your file name, header comment syntax, and directory structure, you can overcome this common error and start customizing your Twenty Ten theme safely with a child theme.
Related Support Threads Support
-
[Theme: Twenty Ten] Custom multiple headers and sidebarshttps://wordpress.org/support/topic/theme-twenty-ten-custom-multiple-headers-and-sidebars/
-
Some basic help with TWENTY TEN themehttps://wordpress.org/support/topic/some-basic-help-with-twenty-ten-theme/
-
A few questions….https://wordpress.org/support/topic/a-few-questions-20/
-
Widgetizing the header and footerhttps://wordpress.org/support/topic/widgetizing-the-header-and-footer/
-
[twentyten-child] how much code to include in childhttps://wordpress.org/support/topic/twentyten-child-how-much-code-to-include-in-child/
-
[Theme: Twenty Ten] Adsense ad will only shows 1/4 of the ad in header. Please help to show all.https://wordpress.org/support/topic/theme-twenty-ten-adsense-ad-will-only-shows-14-of-the-ad-in-header-please-help-to-show-all/
-
Link Masthead?https://wordpress.org/support/topic/link-masthead/
-
Adding Slider to header front page and static header image inside in Twenty Tenhttps://wordpress.org/support/topic/adding-slider-to-header-front-page-and-static-header-image-inside-in-twenty-ten/
-
[Theme: Twenty Ten] Child theme style sheet is missinghttps://wordpress.org/support/topic/theme-twenty-ten-child-theme-style-sheet-is-missing/
-
Locating my site descriptionhttps://wordpress.org/support/topic/locating-my-site-description/
-
Main style not enqueued properlyhttps://wordpress.org/support/topic/main-style-not-enqueued-properly/
-
A few questions: Headers and bordershttps://wordpress.org/support/topic/a-few-questions-headers-and-borders/
-
Create a gap between the header image and the navigation barhttps://wordpress.org/support/topic/create-a-gap-between-the-header-image-and-the-navigation-bar/
-
Sticky headerhttps://wordpress.org/support/topic/sticky-header-1/
-
How To: Add Social Media Icons In Headerhttps://wordpress.org/support/topic/how-to-add-social-media-icons-in-header-2/
-
Using different images for different pages in bannerhttps://wordpress.org/support/topic/using-different-images-for-different-pages-in-banner/
-
Looking to add social networking linked images to menu barhttps://wordpress.org/support/topic/looking-to-add-social-networking-linked-images-to-menu-bar/
-
[twentyten-child] php file in childhttps://wordpress.org/support/topic/twentyten-child-php-file-in-child/
-
How to fasten different header-banner images to different pageshttps://wordpress.org/support/topic/how-to-fasten-different-header-banner-images-to-different-pages/
-
[Theme: Twenty Ten] How to add chitika code to sidebarhttps://wordpress.org/support/topic/theme-twenty-ten-how-to-add-chitika-code-to-sidebar/
-
apple-x theme modified by mehttps://wordpress.org/support/topic/apple-x-theme-modified-by-me/
-
Cannot make twentyten child themehttps://wordpress.org/support/topic/cannot-make-twentyten-child-theme/
-
Add custom optionshttps://wordpress.org/support/topic/add-custom-options/