WPThumbs
Themes Plugins By purpose By industry Best-of lists Fix it guides
Themes Beginner 2 min read

How to Properly Remove a WordPress Theme

Unused themes are a real security liability — they still receive requests even when inactive. Removing them properly takes a little more than clicking delete.

Updated 29 August 2026

Every installed theme is code sitting on your server. An inactive theme still has PHP files that can be reached directly, and an outdated inactive theme is a genuine attack surface — several well-known WordPress compromises came through themes nobody was using. Deleting what you do not need is good practice, not housekeeping.

Check what depends on it first

Before deleting anything, confirm the theme is not quietly holding the site together:

  • Is it the parent of an active child theme? Deleting a parent while its child is active breaks the site completely. The child theme's Template line names the parent.
  • Do your posts use its shortcodes? Search a few posts for square-bracket codes. Deleting the theme turns those into visible plain text across the site.
  • Did you edit its functions.php? Anything you added there goes with it.
  • Does it register custom post types or fields? The content stays in the database but becomes unreachable in the admin.

Delete it from the dashboard

  1. Go to Appearance → Themes.
  2. Click the theme you want to remove — you cannot delete the active one.
  3. Click Delete at the bottom right of the details panel.
  4. Confirm.

WordPress removes the folder and its files. It does not remove the theme's settings.

Delete it over SFTP if the dashboard will not load

Go to wp-content/themes/ and delete the folder. If the theme is active and broken, WordPress falls back to a default theme — provided one is installed. Keep one default theme permanently for exactly this reason.

Clean up the settings it left behind

The leftovers are small but they accumulate, especially on a site that has tried a dozen themes. In wp_options, look for rows named:

  • theme_mods_themename — Customiser settings
  • Options prefixed with the theme's name or slug
  • Widget data for sidebars the theme registered

Back up the database, then delete those rows via phpMyAdmin or WP-CLI:

wp option delete theme_mods_oldtheme

Be conservative. If you are not sure a row belongs to the theme, leave it — a few kilobytes of orphaned options cost nothing, whereas deleting the wrong row costs a working site.

Then check the site

  • Load the home page, a post, an archive and a page.
  • Look for raw shortcodes appearing as text.
  • Check that widgets and menus are still where you expect.
  • Purge all caches so you are not looking at a stale copy.

How many themes should you keep?

Two: the one you are using, and one current default theme as a fallback. Every other one is unmaintained code waiting to become a vulnerability. If you want to try themes, do it on staging.

The same reasoning applies to plugins, and more urgently — deactivated plugins are also still on disk, and are a more common entry point than themes.

Common questions

Is it safe to delete the default Twenty-something themes?

Keep one. WordPress falls back to a default theme when the active one breaks, and without one installed you get a hard error instead of an ugly-but-working site.

Will deleting a theme delete my pages?

No. Content lives in the database. What can break is content that depended on the theme, such as its shortcodes or its custom post types.