Upload any working theme into wp-content/themes/ and the site will come back. Your posts, pages, images and page layouts are not gone, because deleting a theme removes files and leaves the database untouched. The quickest route back in is usually reinstalling the same theme you deleted.

Before you do anything else, one question narrows this down in about a minute, and almost nobody asks it.

WordPress does not normally let you do this

The dashboard hides the Delete option on whichever theme is active, and the API refuses outright with a message saying the theme must not be active and that a parent theme cannot be deleted while a child theme is using it.

So if your site broke after a deletion, something got around that safeguard. There are only three ways, and knowing which one applies tells you the fix.

You deleted it over FTP or File Manager. No safeguard exists at the file level. The folder disappeared and WordPress is now looking for a theme that is not there.

You deleted the parent of an active child theme. This is the most common version by a wide margin, because the parent theme genuinely looks spare when a child is the one activated. It is not. See the child theme section below.

You deleted the last default theme. WordPress falls back to a default theme when the active one is missing, but only if one is still installed. People remove the Twenty Twenty-Five style themes to tidy up, and with none left there is nothing to fall back to.

If you are not sure which applies, the fix in the next section works for all three.

Your content is almost certainly fine

Worth saying before you do anything drastic, because people in this situation start restoring backups they do not need.

A theme controls presentation. Deleting it removes template files and styling, and it does not touch your database. Your posts, pages, media library, users, menus, widget content and customizer settings are all sitting exactly where they were.

Page builder content survives too. If the site was built in Elementor, Divi, WPBakery or similar, that layout data lives in post meta and shortcodes rather than in the theme folder. Put the theme back and the pages return looking the same, which is one of the quieter advantages of building in a page builder.

Two things genuinely are lost, and pretending otherwise would be unhelpful. Any edits made directly to theme files, rather than through a child theme, are gone with the files. So is anything stored in the theme’s own options panel rather than the WordPress customizer, since some premium themes keep their settings in their own tables.

The fastest fix: put a theme back

Two routes, both about ten minutes.

Reinstall the same theme. Download it again from wherever it came from, WordPress.org for a free theme or the vendor’s account area for a premium one. Upload the folder into wp-content/themes/ over FTP or your host’s File Manager. WordPress finds it, the database is still pointing at it, and the site returns with every setting intact.

Or install any default theme to get back in. When you cannot lay hands on the original quickly, upload one of the default themes WordPress ships with. The site will look wrong and it will work, which means you get your dashboard back and can sort out the real theme without the clock running. Ugly and online beats broken and offline.

One detail that catches people: match the folder name exactly. Themes sometimes unzip as enfold-4.0 rather than enfold, and WordPress treats a mismatched name as a missing theme. Rename the folder to what it was before uploading.

If the site throws a fatal error rather than a blank page, check the admin email. WordPress may have sent a recovery mode link that logs you in with the broken theme paused.

If you deleted a parent theme

This produces a clear error rather than a blank screen, which makes it the easiest version to diagnose. You will see something close to: “Broken Theme: The parent theme is missing. Please install the [theme name] parent theme.”

A child theme contains only your changes. Every template, function and stylesheet it does not override comes from the parent. Delete the parent and you are left with a folder of overrides and nothing underneath to override.

The fix is to reinstall the parent, with the exact folder name the child expects. That name is written inside the child theme, in style.css, on the line beginning Template:. Open the file, read the value, and make the parent folder match it character for character, including case. The WordPress child theme documentation covers how that relationship works if you want the full picture.

Do not delete the child theme to “start fresh”. It holds your customisations, and the parent is the missing half.

If the site still fails after the files are back

Then the database is pointing at a folder that does not exist, and two rows in wp_options control it.

template holds the parent theme’s folder name. stylesheet holds the active theme’s folder name, which is the child theme when one is in use. With no child theme, both hold the same value.

Open wp_options in phpMyAdmin or your host’s database tool, find those two rows, and set them to a theme folder that actually exists in wp-content/themes/. Case matters. So does the exact spelling. Clear any caching plugin afterwards, because a stale cached page will keep showing you the broken version and make a correct fix look like it failed.

Back up the database before editing it. This is a small change, and it is still the table that holds your site’s settings.

Why restoring a backup is the wrong first move here

It is the option people reach for, and on this particular problem it costs more than it solves.

A restore returns the whole site to the backup point, which erases every order, form entry, comment and post recorded since. On a store backed up nightly, restoring at 4pm can delete a day of orders. Meanwhile the actual fault is a missing folder that takes ten minutes to replace.

Try the theme reinstall first. Keep the backup as the fallback it is meant to be. And if you do end up restoring and it fails, our guide to a failed backup restore explains why every restore point can fail the same way.

How to avoid this next time

Two habits, briefly, and then get back to your site.

Keep one default theme installed permanently. It costs nothing, it never activates on its own, and it is the difference between a fallback and a fatal error.

And test changes on a copy rather than the live site. Our WordPress backup guide covers keeping restore points current, which matters for everything else that goes wrong too.

Key takeaways

A deleted WordPress theme breaks the display, not the data. Posts, pages, media and page builder layouts are all in the database and untouched, so resist the urge to restore a backup before trying the simple fix.

Upload the original theme back into wp-content/themes/ with its exact original folder name, or upload any default theme to get the dashboard back while you find the original.

If you see a missing parent theme error, you deleted the parent of an active child theme. Reinstall the parent with the folder name written on the Template: line inside the child’s style.css. And if the files are back and the site still fails, correct the template and stylesheet rows in wp_options.

Frequently asked questions

Does deleting a WordPress theme delete my content?

No. Themes control how a site looks, not what it contains. Posts, pages, media, users, menus and customizer settings all live in the database and survive a theme deletion. Page builder layouts survive too, since that data sits in post meta rather than in the theme folder.

How do I restore a deleted WordPress theme?

Download the theme again from WordPress.org or the vendor’s account area, then upload the folder into wp-content/themes/ using FTP or your host’s File Manager. Keep the folder name identical to the original, because a renamed folder produces the same error as a missing one.

Why does “the parent theme is missing” appear?

Because you deleted a parent theme while its child theme was still active. A child theme only contains your overrides and relies on the parent for everything else. Reinstall the parent using the exact folder name written on the Template: line inside the child theme’s style.css.

Can I change the WordPress theme from the database?

Yes. The template and stylesheet rows in the wp_options table control which theme loads. Set both to a folder that exists in wp-content/themes/, matching the spelling and capitalisation exactly. Back up the database first and clear your caches afterwards.

Site still down after all that?

If the theme is back and the site still will not load, something else broke at the same time, and that takes longer to isolate than a site can afford to be offline. Survyc is an AI-first digital agency that recovers broken WordPress sites for businesses and agencies. Send the URL and tell us what you deleted, and we will tell you what it will take before anyone talks about money. Our guide to what a WordPress repair costs covers how we price it, and our emergency downtime triage guide covers the other ways a site goes dark. Get in touch or email info@survyc.com.