Introduction
If you customize your WordPress website with Divi, protecting your changes during theme updates matters. A Divi child theme gives you a separate place for custom CSS, PHP functions, and modified template files. It helps preserve those customizations when you update the original theme. This tutorial explains when you need one, how to create it manually, and how to troubleshoot common problems.
What Is a Divi Child Theme?
A child theme is a separate WordPress theme that inherits its functionality and styling from another theme. The original theme is called the parent theme, while your customized version is the child theme. In this setup, Divi provides the foundation, and your child theme stores additional customizations. The main advantage is update protection. When you update the parent theme, WordPress replaces its original files without replacing your separate child theme files. Your custom functions, stylesheet rules, and overridden templates can therefore remain intact. Think of the child theme as a dedicated workspace for changes that shouldn’t live inside the original theme. You can modify selected parts without directly editing Divi’s installation files. This arrangement also makes your customizations easier to organize and maintain.
Why Should You Use a Child Theme With Divi?
A child theme is useful when your website needs custom code beyond ordinary visual settings. It gives developers and website owners a safer way to maintain theme-level changes. Here are the main reasons to consider creating one.
- Protect customizations: Parent theme updates won’t normally overwrite files stored in your child theme.
- Add custom PHP: Store additional functions, filters, and WordPress hooks separately.
- Override templates: Customize files such as footer.php without editing the original.
- Organize custom CSS: Keep theme-specific styling in a dedicated stylesheet.
- Simplify maintenance: Separate your custom work from the original theme files.
For example, imagine adding a custom footer layout directly to Divi’s footer.php file. A parent theme update could replace that file and remove your changes. A child theme provides a separate copy that WordPress can use instead.
When You Don’t Need a Child Theme
Not every Divi website needs a child theme. If you’re only changing colors, fonts, spacing, or basic design settings, existing Divi tools are often sufficient. Creating another theme adds maintenance without providing much benefit for simple visual adjustments. Consider these alternatives before creating additional theme files:
| Customization | Recommended location |
|---|---|
| Custom CSS | Divi → Theme Options → Custom CSS |
| Page-specific styling | Divi Builder settings |
| Global design settings | Divi Theme Options |
| Additional CSS rules | WordPress Customizer, if supported by your setup |
| PHP functions | Child theme or a suitable code snippets plugin |
| Template modifications | Child theme |
A child theme becomes more useful when you need persistent PHP customizations or template overrides. You should also consider one when managing a site with several theme-level modifications. For CSS alone, Divi’s built-in Custom CSS field is often enough. If you also work on how search engines read your pages, our plain-English guide on what an entity is covers a related concept.
How to Create a Divi Child Theme Manually
Creating a child theme manually requires basic file management and a text editor. You don’t need advanced programming experience to create the initial structure. Follow these seven steps carefully.

What You’ll Need
Prepare these items before starting:
- An active WordPress website with Divi installed.
- Access to your hosting account or FTP client.
- A text editor such as Visual Studio Code or Notepad++.
- Basic knowledge of creating folders and saving files.
- A complete website backup.
Step 1: Create a Child Theme Folder
First, access your WordPress installation through FTP or your hosting file manager. Navigate to the following directory: wp-content/themes/ Inside this directory, create a new folder named: Divi-child You can choose another folder name, but keep it simple and consistent. This folder will contain your child theme’s stylesheet, PHP functions, and optional template files. Your directory structure should eventually look like this: wp-content/ └── themes/ ├── Divi/ └── Divi-child/ ├── style.css └── functions.php Make sure the original Divi parent theme remains installed. WordPress needs both themes available for the child theme to work.
Step 2: Create the style.css File
Open your text editor and create a new file named style.css. Save it directly inside the Divi-child folder. This file contains the information WordPress uses to identify your child theme. Add the following header: / Theme Name: Divi Child Theme URI: https://example.com/ Description: Custom child theme for Divi. Author: Your Name Author URI: https://example.com/ Template: Divi Version: 1.0.0 / The most important line is Template: Divi. It must match the parent theme’s actual directory name, including capitalization. If the parent folder is named Divi, writing template: divi can cause WordPress to report an invalid theme. You can add your custom CSS beneath the header. For example, you might use this rule to customize button appearance: .et_pb_button { border-radius: 8px; } You can add more styling rules as your project develops. Keep the stylesheet organized so future changes remain easy to identify.
Step 3: Create the functions.php File
Next, create another file named functions.php inside the same folder. This file allows you to add PHP functions and register additional WordPress functionality. It also provides a place to enqueue the parent theme’s stylesheet. The following minimal example follows the WordPress Developer Theme Handbook approach: <?php
add_action( 'wp_enqueue_scripts', 'divi_child_enqueue_styles' );
function divi_child_enqueue_styles() { wp_enqueue_style( 'divi-parent-style', get_parent_theme_file_uri( 'style.css' ) ); } This function registers an action using the wp_enqueue_scripts hook. It then loads the parent theme’s stylesheet through get_parent_theme_file_uri(). Divi also handles its active theme stylesheet, so check the generated page source before adding another child stylesheet enqueue. The parent stylesheet should load correctly before your custom styling takes effect. Avoid using the older CSS @import approach for loading the parent stylesheet. WordPress recommends using its stylesheet enqueue system instead.
Step 4: Add Custom Functions Safely
Once your basic files exist, you can add custom PHP functionality. The child theme’s functions.php file is a suitable location for additional hooks, filters, and custom functions. WordPress loads both parent and child functions files rather than treating the child file as a replacement. For example, you could register a simple shortcode: <?php
function divi_child_custom_message() { return 'Welcome to our website!'; }
add_shortcode( 'custom_message', 'divi_child_custom_message' ); Add this function to your existing functions.php file, below the stylesheet code. If your file already starts with <?php, don’t add another opening PHP tag. Avoid copying the parent’s functions directly because duplicate function names can trigger fatal errors. Always check your PHP syntax before saving changes. A missing semicolon, unmatched bracket, or incorrect function name can prevent WordPress from loading properly.
Step 5: Override Divi Template Files
A child theme can also replace selected template files from its parent theme. WordPress checks for matching files in the child theme and uses those overrides where supported. This allows you to customize specific theme components without changing the original installation. For example, suppose you want to modify the footer’s PHP template. Copy the original footer.php file from the parent theme into your child theme folder. Keep the same filename and directory structure, then make your modifications to the copied file. The structure would look like this: Divi-child/ ├── style.css ├── functions.php └── footer.php WordPress can now use the child theme’s matching template instead of the parent’s version. Remember that template overrides don’t automatically receive changes made to the parent template. Review your copied files after major theme updates.
Step 6: Zip Your Child Theme Folder
After creating the necessary files, prepare the folder for installation. Right-click the Divi-child folder on your computer and select the option to compress or create a ZIP archive. Make sure the ZIP contains the actual folder, rather than loose files without their parent directory. Your archive should have this structure: Divi-child.zip └── Divi-child/ ├── style.css ├── functions.php └── footer.php The footer.php file is optional. You only need it when overriding the original footer template.
Step 7: Upload and Activate Your Child Theme
Now log in to your WordPress dashboard. Navigate to Appearance → Themes and follow these instructions:
- Click Add New Theme.
- Select Upload Theme.
- Click Choose File.
- Select your Divi-child.zip archive.
- Click Install Now.
- Wait for WordPress to finish installing the theme.
- Click Activate.
After activation, visit your website and check its appearance. Confirm that your pages, navigation, footer, and custom styling display correctly. If everything works, your new child theme is ready for further customization.
Does Divi 5 Change Anything About Child Themes?
Divi 5 introduces significant changes to its builder framework and content migration process. However, the basic WordPress child theme structure remains the same. You still use a child theme folder, a stylesheet header, and a functions.php file for additional functionality. There is no verified requirement to use a completely different child theme installation process for Divi 5. The standard WordPress parent-and-child theme relationship still applies. Existing customizations should nevertheless be reviewed and tested before upgrading. Divi 5 introduces a migration system for converting compatible Divi 4 content. Unsupported legacy modules can continue running through backward compatibility, although affected pages may retain the older framework. This migration process concerns content and module compatibility, not a replacement for the WordPress child theme system. If your child theme contains custom PHP, older modules, or modified templates, check their compatibility separately. Run the migration on a staging website before updating your live installation. Read the official Divi 5 migration documentation for the current migration process.
Alternative: Use a Child Theme Generator Plugin
If manual file creation feels difficult, you can use a child theme generator plugin. These tools create the required theme folder and initial files automatically. They can also provide options for stylesheet handling and basic theme information. A commonly documented option is Child Theme Configurator. Its general workflow involves selecting Divi as the parent theme, analyzing its files, and generating the child theme. You can then activate the generated theme through your WordPress dashboard. Other generator tools and online services offer similar functionality. Review their maintenance status, compatibility, and permissions before installing anything. Regardless of the method, inspect the generated files before activating the theme.
Best Practices for Maintaining Your Child Theme
Creating the files is only the beginning of proper theme maintenance. Good development habits reduce the chance of losing customizations or breaking your website. Follow these recommendations whenever you make changes.
- Back up your website: Save your database and website files before editing theme code.
- Use a staging environment: Test new functions and template changes away from your live website.
- Never edit parent files: Keep all theme-level customizations inside the child theme.
- Organize your code: Add comments and descriptive function names to simplify maintenance.
- Test after updates: Check the frontend, builder, forms, navigation, and custom templates.
- Keep a copy of your files: Store your child theme archive somewhere secure.
- Review compatibility: Check third-party extensions before major builder updates.
These practices are particularly useful for websites with custom templates and additional PHP functionality. They also make it easier to identify problems after software updates. A little preparation can prevent unnecessary downtime.
Common Divi Child Theme Problems and How to Fix Them
Even a correctly created child theme can experience problems. Most issues involve incorrect folder names, PHP errors, or stylesheet loading. Here are common situations and practical solutions.
1. WordPress Reports a Missing Parent Theme
This usually happens when the stylesheet header contains an incorrect Template value. Open style.css and compare the value against the original parent’s folder name. Correct the capitalization and spelling, then try activating the theme again.
2. Your Website Shows a White Screen
A white screen can indicate a PHP fatal error. Check your most recent changes to functions.php, especially missing semicolons, brackets, or incorrectly declared functions. If you cannot access WordPress, use FTP or your hosting file manager to rename the problematic file temporarily or restore a working backup.
3. Child Theme Styles Are Not Loading
Start by checking whether your child stylesheet is being loaded. Inspect the page source or browser developer tools for its CSS file. If it is missing, review your enqueue configuration and confirm that the file exists in the correct directory. Clear your browser cache and any active caching plugin after making corrections. Also check whether Divi’s performance settings are serving an older generated CSS file. These checks can help identify stylesheet loading problems.
4. Your Footer Changes Are Not Appearing
Check that the copied footer.php file has the correct name and location. Confirm that the child theme is active and that the parent template supports the expected override. If the site uses a Divi Theme Builder footer, its assigned template may control the displayed footer instead.
5. The Website Breaks After a Divi Update
Start by checking your PHP error log and reviewing the latest theme changes. Compare overridden template files with their updated parent versions. Test custom functions and third-party modules before applying additional changes to the live website.
Frequently Asked Questions
What is a Divi child theme used for?
A Divi child theme stores customizations separately from the original theme. It helps protect custom PHP functions, CSS, and template overrides during parent theme updates. It also gives developers a dedicated place to maintain website-specific code.
Do I need a child theme for custom CSS?
No, a child theme isn’t necessary for every CSS customization. You can use Divi Theme Options, the WordPress Customizer, or Divi Builder settings instead. A child stylesheet becomes useful when you want to manage more extensive styling in separate files.
Can I use a Divi child theme with Divi 5?
Yes, the standard WordPress child theme structure still applies to Divi 5. However, custom functions, template overrides, and third-party extensions should be tested for compatibility. Existing Divi 4 content may also require migration through the official Divi 5 Migrator.
Will updating Divi delete my child theme customizations?
Normally, updating the parent theme does not delete files stored separately in the child theme. Your custom CSS, functions, and overridden templates remain in their own directory. Still, an update can change how the parent theme works, so compatibility testing remains necessary.
Can I edit functions.php without creating a child theme?
Yes, a code snippets plugin can provide an alternative location for custom PHP functions. This approach is useful when you want to add functionality without modifying theme files. For theme-specific template overrides, a child theme remains the appropriate approach.
Can I switch back to the original Divi theme?
Yes, you can deactivate the child theme and reactivate its parent theme. WordPress will use the original theme files instead of your child theme overrides. Remember that custom functionality stored exclusively in the child theme may stop running after switching.
Final Thoughts
A child theme provides a practical way to manage advanced WordPress customizations. It protects separate theme files from ordinary parent theme updates and makes long-term maintenance easier. You don’t need one for every design adjustment, but it becomes valuable when adding custom PHP or overriding templates. If you’re building a customized website, start with a backup and create your child theme on a staging installation. Test every change before moving it to your live website. With a clean setup and regular testing, you can maintain your Divi website with greater confidence. You can find more practical guides on Hearvise. Next Step: Review your current customizations and decide whether Divi’s built-in tools are sufficient. If you need custom PHP or template overrides, create and test a child theme before making changes to your live website. —









