How to quickly delete WordPress themes (the right way)

Did you recently switch themes, or does your wordpress host auto-install multiple themes on each new WordPress site?

If so, you’re probably wondering how to uninstall (or delete) unused themes in WordPress.

Fortunately, it’s pretty pretty easy. Skip to the solution→

When to uninstall a WordPress theme?

There are several common scenarios where you’ll want to delete a theme:

  • Your WordPress site came pre-installed themes
  • You recently switch themes and don’t need the old one
  • You installed a theme for testing purposes (and no longer need it)
Why should you delete unused themes?
  • Security — This is the most compelling reason to remove old themes. Every WordPress theme contains php code which could potentially contain vulnerabilities (even if the theme isn’t active).
  • Storage Limits — Most WordPress hosts (especially on shared plans) limit the GB (or inodes) of files you can have on your server. Extra plugins or themes are just unnecessary bloat. This is doubly true if you get billed per-GB for offsite backups.
  • Performance — While not a major concern, inactive themes do take up rows in the database and slow down the WordPress backend during updates.

When NOT to delete a theme

In some instances, deleting a theme is a bad idea:

  • It’s a parent theme (most common reason) — WordPress prevents you from deleting the active theme. But Parent Themes, though essential, aren’t technically active and can be deleted by mistake.
  • Multisite Installs — If you’re logged in as a super-admin, make sure you don’t delete the active theme for another site on the network.

Checklist: Do this before deleting

Before making major changes to your site, these are some best-practices that will help you avoid major SNAFUs.

  1. Backup your site
  2. Test on staging (if you have it)

1. Backup your site before making changes

Backups are beautiful. They let you quickly undo changes or even catastrophic errors with the click of a button. Most high-quality WordPress hosts have an auto-backup feature. Use it.

2. Test on a staging server.

If you don’t have a staging server, you don’t know what you’re missing. Cowboy coding is dangerous, and if your site has decent traffic you should develop a more professional workflow using Git and/or staging.

Remove the unwanted themes on your staging server, test your site to make sure everything is working properly. Then you can push the changes to the live site. If your host doesn’t offer staging, consider upgrading to Cloudways which is a super-fast managed VPS host with build-in staging. And it’s only $10/month!

How to delete a WordPress Theme

There are several ways you can remove a theme. The most common are:

  1. Uninstall from the WordPress dashboard (best method)
  2. Delete via FTP

Technically you can also delete themes via the WordPress command line (CLI) but if you knew how to do use that you wouldn’t be reading this article.

1. Removing themes via the admin dashboard

  1. Go to the Theme settings: border: Appearance > Themes
Go to Appearance > Themes
  1. Click on the theme you want to delete
  2. Click ‘Delete’ in the bottom-right corner
  3. Click ‘OK’ to confirm deletion
Deleting a Theme in WordPress Admin
Click ‘Delete’ in the bottom-right corner

2. Removing themes via FTP/SFTP

Since a theme is basically just a folder on your web server, it’s logical that you should simply be able to Delete it via the File Manager or FTP.

And it most cases this will work fine, assuming the developer follows best-practices. However (some) theme’s may leave residual clutter in the WordPress database after you delete the file structure.

The other issue is that it circumvents the WordPress alerts that prevent you from removing an active theme. So make sure you double-check which one.

For these reasons, I recommend uninstalling via the Admin Panel if possible.

Maintenance after you delete a theme

Most of the time, you can simply remove a theme and be done with it. This is especially true if you used the admin interface to delete it, and didn’t import any external content.

Sometimes though, themes leave stuff beyond after you remove them. Here’s what to watch for:

1. Imported Content (dummy sites)

These days, many premium themes allow you to import complete starter sites to jumpstart your development process. This is true of both Astra and Generatepress pro (both themes I recommend).

But this data (including images, pages and posts) will remain in your database even after you’ve uninstalled the parent theme. Frankly themes would bundle a complete ‘uninstall’ feature.

How to fix: You can manually go through and try to delete all the media files, posts and pages. You might miss some theme remnants, however and companies like Astra actually recommend you start a new WordPress install from scratch if you want to be sure dummy content is removed.

2. Menus

If the previous theme added pages to your menu (a dummy/starter site for example) those entries (and broken links) will still be in your menu after the Theme is gone.

How to fix: Go to Appearance > Menus and delete the removed pages manually. Alternatively you can delete the entire menu and start from scratch.

3. Images

Unused Images: You’ll want to go through your Media Library and delete any starter-site images or theme-specific graphics like badges or logos that you won’t need for your new theme.

Default Sizes: WordPress lets themes specify custom image sizes for Thumbnail, Medium and Large size images. You’ll want to reset these for your new theme and run a tool like Regenerate Thumbnails to rebuild and re-crop all the images in your database.

4. Shortcodes

A number of popular themes come with build-in Shortcodes for adding buttons, boxes and other design elements throughout your site. Themeforest themes are notorious for this.

But if the shortcodes are hard-coded into the theme and you delete it, you’ll be left with broken shortcodes littered throughout your content.

Here’s an example:

[my_gallery id=”153″ style=”filmstrip-pro” hover-effects=”overlay caption lightbox-magic” autoplay=”true”]

How to fix: Use a tool like Shortcode Cleaner lite to automate the removal of broken shortcodes. Alternatively, you can do a custom google search like this:

How to find broken shortcodes with Google
Google Search: site:yourdomain.com “[/”

Summary & Wrap-up

In most cases, removing unused themes is a simple affair, especially if they were never your active theme to begin with.

Key Takeaways:

  1. Using the WordPress Admin panel is usually the best method
  2. It’s best to take a site backup first and/or test on staging
  3. Make sure to clean leftovers like imported content, media & broken shortcodes.

Leave a Comment