When using a child theme in WordPress, you may receive a “broken theme” error message. In particular, if you get a message such as “Parent theme not found”, it is because the child theme does not recognize the parent theme correctly. This article details the cause of this problem and how to resolve it.
Problem Overview
The following error message may appear when using a child theme in WordPress
Broken theme
The following themes are already installed, but there are missing parts.
Name Description
Astra-child Parent theme not found. Please install the "Astra" parent theme.
Cause
This error occurs when the directory name of the parent theme specified in Template
in the child theme’s style.css file is incorrect. Particular attention should be paid to the difference between upper and lower case letters. Some server settings are case sensitive for directory names, so an incorrect description may cause the parent theme to be missing.
Solution
Check and correct the Template
field in the style.css file of the child theme by following the steps below.
Step 1: Check style.css
Open the style.css file in the child theme folder. This file usually contains basic information about the child theme.
Step 2: Check Template contents
The following information is found at the top of style.css.
/* Theme Name: Astra Child
Theme Name: Astra Child
Template: Astra
*/* Theme Name: Astra
The important part here is the Template
section. This section must contain the exact directory name of the parent theme.
Step 3: Check and correct the directory name
If the parent theme’s directory name is “astra,” correct the part that says Template: Astra
to Template: astra.
Pay special attention to the difference between upper and lower case letters.
Step 4: Confirmation after modification
After saving the modification, check that the child theme recognizes the parent theme in the WordPress theme management screen.
Summary
If the parent theme cannot be found, there is a good chance that the Template
description in the child theme is incorrect. In particular, it is important to be accurate to the server’s specifications, as the difference between upper and lower case letters can cause problems. This will ensure that the child theme functions properly.