If your CSS tweaks or template changes keep vanishing after a theme update, the cause is almost always the same: you edited the parent theme's files directly. WordPress updates replace every file in a theme's folder, including the ones you touched. The fix is a child theme, a small companion theme that holds only your changes and loads on top of the parent. Update the parent freely; your customizations survive because they live somewhere the updater never touches.
This is different from a plugin conflict or a broken update that needs a rollback. Nothing is broken here. The theme did exactly what an update is supposed to do: it replaced its own files with new ones. Your mistake was putting custom code in the file path that gets replaced.
Why direct edits don't survive
A theme's files live in wp-content/themes/theme-name/. When you install an update, WordPress downloads the new version of that theme and overwrites the folder. It has no way to tell "this is the developer's original code" from "this is a line you added on a Tuesday afternoon." Everything in the folder gets replaced, full stop.
The same applies to CSS added through style.css, a modified functions.php, or an edited template file like single.php. All of it lives inside the parent theme's folder, so all of it is at risk on the next update. If you never update the theme, your edits are safe, but that means never getting bug fixes or security patches either. That's a bad trade.
How a child theme fixes it
A child theme is a separate folder that inherits everything from a parent theme (styles, templates, functionality) and lets you override only the pieces you want to change. WordPress loads the parent theme's functions.php and the child theme's functions.php together, and it loads the child's style.css after the parent's, so your rules win on any conflicting selector.
To create one:
- Make a new folder in
wp-content/themes/, named something liketheme-name-child. - Add a
style.cssfile with a header comment that includesTheme Name:andTemplate:(theTemplatevalue must match the parent theme's folder name exactly, case-sensitive). - Add a line to enqueue the parent's stylesheet, and optionally the child's, via
wp_enqueue_scriptsin a childfunctions.php. Most current theme documentation gives you the exact snippet since it varies slightly by theme. - Activate the child theme from Appearance → Themes in wp-admin, the same way you'd activate any theme.
Once it's active, put your CSS overrides in the child's style.css and any custom PHP in the child's functions.php. If you need to change a specific template, copy that one file from the parent into the matching path in the child folder and edit the copy. The parent theme updates normally from here on; your child theme folder is never touched.
Before you build one, it's worth testing on a copy of your site rather than live. See using WordPress staging for that workflow, particularly if the theme has heavy custom styling and you want to confirm nothing visually shifts.
If you already have a broken parent-theme edit
If an update already wiped changes you made directly to the parent theme, you'll need to redo that work in a child theme rather than recover it. There's no way to pull the old edits back out of an updated theme folder. Note what you changed (if you're not sure, compare against the current theme defaults), recreate it in the child theme, and it's permanent from that point on.
When a plugin beats a child theme
A child theme is the right tool for CSS tweaks, small template overrides, and theme-specific functions. It's the wrong tool for functionality that shouldn't disappear if you ever switch themes.
Use a plugin instead when:
- The feature is independent of appearance. Custom post types, shortcodes, form handling, and API integrations belong in a plugin (a simple "site-specific plugin" with a few functions is enough) because they should keep working no matter what theme is active.
- You might switch themes later. A child theme dies with its parent. If you switch from the parent theme to something else, every child theme customization goes with it. Plugin-based functionality survives a theme change.
- You're using a page builder. Elementor, Divi, and similar tools manage their own styling layer and mostly sidestep this problem already, since design changes are stored in the builder's own data, not theme template files.
A reasonable rule: if it's visual and tied to how this specific theme renders things, child theme. If it's a feature you'd want to keep regardless of theme, plugin or must-use plugin.
When to contact support
If a child theme isn't inheriting styles correctly, or the Template header doesn't seem to match despite looking right, open a ticket from Support → New ticket in the portal. It's a fast thing for a real person to check against your actual file structure, and worth doing before you assume the theme itself is broken.