Skip to content
WordPress Guide

How to Update a WordPress Theme Without Losing Changes

Most theme changes live in the database and survive an update. The ones written into theme files do not. Here is how to tell which you have and protect them.

A hand on a white keyboard beside a monitor
8 sections · 9 min read
In this article · 8 sections

The dashboard has been showing a theme update for weeks, and you keep putting it off. Somebody once told you that updating a theme wipes the changes, and you have no idea which changes were made, by whom, or where they were saved. So the update sits there while the theme gets older.

Most of what people call “theme changes” are not stored in the theme at all, and an update never touches them. To update a WordPress theme without losing changes, you need to know where your site’s edits actually live, which ones are at risk, and what to do about the risky ones before you click Update.

Why some changes vanish and others do not

A theme update does something simple. WordPress downloads the new version of the theme and replaces the old theme folder with it. Every file in that folder is swapped for the new copy. Anything that was written into those files by hand is gone.

Everything that is stored in the database stays exactly where it was, because the update does not touch the database. That one difference decides whether your update is a non-event or a bad afternoon.

Stored in the database (safe during an update)

  • Customizer settings in classic themes: logo, colours, layout choices and anything else saved under Appearance → Customize.
  • Additional CSS added in the Customizer, and custom CSS added through the Site Editor’s Styles panel.
  • Site Editor changes in block themes: templates, template parts such as the header and footer, and global styles you edited and saved under Appearance → Editor.
  • Theme options panels that many commercial themes add to the dashboard. These are almost always saved in the database too.
  • Your content: pages, posts, menus, widgets, media and anything built with a page builder.

Stored in theme files (lost when the theme updates)

  • Edits made in the Theme File Editor (under Appearance in classic themes and under Tools in block themes).
  • Changes a developer made to the theme’s style.css, functions.php or template files over FTP or the hosting file manager.
  • Extra files someone uploaded into the theme folder, such as a custom page template or a script.

If every change on your site falls into the first list, you can update with an ordinary backup and move on. The second list is where the work is.

Find out what kind of site you have

Run through these checks before you update anything. None of them needs you to read code.

  1. Look at the active theme’s name. Go to Appearance → Themes. If the active theme has “Child” in its name, or its Theme Details screen says it is a child of another theme, your custom code probably lives there, and updating the parent theme leaves it alone.
  2. Ask whoever built the site. A direct question works: “Did you edit any theme files, or is everything in a child theme or the Customizer?”
  3. Check the file dates. In your hosting file manager, open wp-content/themes/ and the active theme’s folder. Files the theme author shipped tend to share the same date. A functions.php or style.css with a much later date than the rest is a strong hint that somebody edited it.
  4. Compare with a clean copy. Download the same version of the theme from wordpress.org or from the seller’s account area. A free diff tool on your computer can show any differences between the two folders. Some security scanners can also compare theme files with the official copies, so check whether yours has that option.
  5. Check for missing updates on purpose. If a theme has not been updated for a long time while others on the site have, ask why. Someone may have held it back because they knew the files were edited.

If the theme came from a marketplace and was “customised” by a freelancer, assume files were edited until you have proof otherwise. It is the most common way sites end up in this position.

How to update a WordPress theme without losing changes when files were edited

Suppose the checks turned up edited files. The fix is to move each edit out of the theme folder into a place that survives updates, and only then update. Do this on a copy of the site first if you can; our guide to setting up a staging copy of WordPress explains the options most hosts offer.

  1. Take a full backup of files and database, and download it. Our walkthrough on backing up a WordPress website covers what a complete backup includes.
  2. List every edited file from the comparison above, and note what each change does in plain words: “adds the WhatsApp button”, “removes the footer credit”, “changes the blog layout”.
  3. Move CSS changes into the Additional CSS box, the Site Editor’s custom CSS, or a child theme’s stylesheet. Our post on where to put custom CSS in WordPress shows each place.
  4. Move PHP changes from functions.php into a child theme’s functions.php or a snippets plugin such as Code Snippets. This step is where mistakes break sites, so if PHP is new to you, let a developer do it.
  5. Move edited template files into a child theme, keeping the same file name and folder path, so WordPress uses your copy instead of the parent’s.
  6. Check the site on the copy. Every change on your list should still be visible.
  7. Now update the theme and check the site again, page by page, on desktop and on a phone.

Our guide to when a child theme is needed explains how to create one carefully. One warning that catches people out: in many classic themes, Customizer settings belong to the theme that saved them, so a newly activated child theme can start with a blank logo, default colours, unassigned menus and an empty Additional CSS box. Some themes offer an export and import of their settings for exactly this reason. Note your settings before you switch.

Block themes: what the update can and cannot change

Block themes behave a little differently. When you edit a template or template part in the Site Editor and save it, WordPress stores your version in the database and uses it instead of the theme’s file. A theme update will not overwrite it.

The flip side is easy to miss. If the theme author improves that same template in the new version, you will not see the improvement, because your saved copy still wins. Templates you never touched will pick up the new design straight away. So after updating a block theme, look at the pages that use your customised templates and the ones that do not, and you may notice the two drifting apart over time.

If you ever want the theme’s new version of a template, the Site Editor lets you reset a customised template or template part, but that throws away your edits to it. Copy anything you want to keep, such as text or a custom block, before resetting.

Customisations a theme update never touches

Some changes look like theme customisations but come from somewhere else, and a theme update does not touch them. A header built in a page builder’s theme builder, a footer added by a plugin, a font loaded by a fonts plugin, or a colour set inside the page builder’s global settings all belong to that plugin. If something changes after a theme update and it is one of these, the theme was probably not the cause.

For a general picture of which part of a site the theme controls, our overview of what a WordPress theme does sets the boundaries out plainly.

If the update already wiped something

Sometimes the site looks fine, then a week later someone notices the call button in the header is gone. Recovering is mostly a matter of doing things in the right order:

  1. Do not run more updates on top. Each one makes the old version harder to find.
  2. Restore the old theme folder from a backup taken before the update into a separate place, not over the live theme. You need the edited files to read, not to run.
  3. Compare those old files with a clean copy of the old version, as described above, to find exactly what was changed.
  4. Move those edits into a child theme or snippets plugin, then keep the current theme version.

Rolling the whole theme back to the old version is possible, with a plugin such as WP Rollback for themes from wordpress.org or by uploading the old zip file, but treat it as a short pause rather than a fix. Theme updates often include security fixes, and an old edited theme will need updating again sooner or later.

A routine for every future theme update

  • Back up first, and confirm the backup finished.
  • Read the theme’s changelog for words like “template changes” or “requires”.
  • Update on staging when the site matters to your income.
  • Check the home page, a service page, a blog post, the contact form and the menu on a phone.
  • Write down any change you or a developer make, and where it was saved.

That last habit is what saves the next person, who may well be you in two years. Updates for core, plugins and themes each carry different risks, and our comparison of core, plugin and theme updates explains the safest order. For the rest of the jobs an owner handles, keep our beginner’s guide to running WordPress close.

Frequently asked questions

Will updating my theme delete my pages or blog posts?

No. Pages, posts, images, menus and form entries are stored in the database, and a theme update only replaces the theme’s own files. What can change is how that content looks, if the new theme version changes its layout or styles. Your actual content stays where it was.

Is it safe to update the parent theme when I use a child theme?

Usually, yes. That is what a child theme is for. Your custom files stay in the child theme folder while the parent updates. Now and then a parent update changes a template that your child theme overrides, so check the pages that use your copied templates after each update.

How do I update a premium theme that does not show updates in the dashboard?

Most commercial themes need a licence key or account connection entered in the theme’s settings before updates appear. Without it, you download the new version from the seller and upload it from Appearance, Themes, using the Add Theme button. WordPress then offers to replace the current version with the uploaded one.

Can I just never update the theme to protect my edits?

You can, but it is a poor trade. Theme updates fix security problems and keep the theme working with new versions of WordPress and PHP. An old theme gets riskier each year, and the eventual update becomes a bigger job. Moving your edits somewhere safe once costs less than avoiding updates forever.

Edited theme files are best moved before the next update rather than after it. Our WordPress theme customization service can put them into a child theme, working on a backup or staging copy where possible and testing before anything touches the live version.

Next in this series: How to Switch From Elementor to the Block Editor

Is Your Website Working Properly?

Get a free website health check from WebMaintor. We'll review your website's speed, security, forms, and technical health — and tell you exactly what needs attention.

No obligation. No automated reports. A real review by our team.