How to Delete Themes in WordPress

Published on September 25, 2023 by Simon Wright

If you’re a seasoned WordPress user, chances are you’ve tried various themes on your website in an effort to find the best one. In the process, you probably accumulated several that are still sitting on your site’s dashboard. If that sounds like you, please read on, as this article will discuss why you should remove WordPress themes that you no longer need and show you three easy methods to do it safely and thoroughly.

Why Should You Remove Unused WordPress Themes?

Before we delve into the steps of removing themes from WordPress, let’s first understand why it’s important to do so.

There are several reasons why deleting unused themes is considered a best practice:

1. Latent Themes Can Be a Security Risk

Having more than one theme installed on your WordPress site creates several potential entry points for hackers to exploit. When you remove unused WordPress themes, you also close those entry points in the process, helping minimize security risks and protect your site.

2. Updates Can Be Forgotten

Not only does having old themes sitting on your site create entry points for hackers, but the fact that they are rarely (if ever) updated means important security patches don’t get implemented. As a result, you site will be much more exposed to the latest tricks scammers happen to be using.

Removing themes that you no longer need allows you to focus on keeping the active ones updated, thereby reducing the chances of security vulnerabilities.

3. Inactive Themes Reduce Site Performance

Inactive themes can harm the performance of your WordPress site, particularly in the admin dashboard. This is because WordPress queries every installed theme, whether they are active or inactive, when checking for updates, which slows down the backend of your site significantly.

Therefore, when you remove unused themes, you will be helping to optimize the performance of your WordPress site.

4. Disk Space Gets Eaten

Every file of your WordPress installation takes up valuable server space. Unused themes can accumulate over time and consume unnecessary storage. Therefore, it figures that when you remove a WordPress theme, you will free up disk space in the process, thereby potentially reducing hosting costs and improving overall site performance.

5. Database Performance Suffers

Inactive themes may leave behind residual data in your WordPress database. This data adds up and can impact database performance. Therefore, deleting unused ones can optimize your database and ensure efficient data storage.

Now you are aware of the importance of removing unused themes from your WordPress installation, let’s consider the different scenarios in which you might want to do this.

Scenarios When You Might Want to Remove WordPress Themes

Now you are aware of the importance of removing unused themes from your WordPress installation, let’s consider the different scenarios in which you might want to do this:

  • When Installing a New Theme

If you have decided to switch to a new WordPress theme, you will likely want to remove the old one to avoid clutter and potential security risks.

  • When Testing Different Themes

Sometimes you may install a theme for testing purposes, in which case, it can be safely deleted if you decide not to use it.

  • When Removing the Default Theme

The pre-installed WordPress default themes, such as the Twenty Twenty-Three theme, may not fit your site’s design or functionality requirements. In this case, you can remove the default theme from your WordPress installation.

Scenarios When You Shouldn’t Remove WordPress Themes

While there are plenty of reasons why removing unused WordPress themes is a good idea, there are a few occasions where you should leave them untouched, namely:

  • When Testing a Different Theme

You should not remove a previously installed theme if you wish to use it again, such as when testing other ones.

  • When in Use as a Parent Theme

You should not remove a theme if it is the parent of the one currently active on your website.

  • When Used in a WordPress Multisite Network.

If your website is part of a WordPress Multisite network, and another site in that network uses the theme you are considering removing, it should be left alone.

Regardless of the scenario, the process of deleting a WordPress theme remains the same. So, let’s now look at the steps you must follow to safely and thoroughly do this.

Preparations To Do Before You Remove WordPress Themes

Before deleting a WordPress theme, taking a couple of precautionary steps is vital to ensure a smooth transition. Here are two essential tasks to complete:

1. Test Removing the Theme on a Staging Site

If you have access to a staging site, we recommend testing the theme removal process before implementing it on your live site. Doing so allows you to pinpoint any potential issues or conflicts arising from its removal in a safe environment, thereby minimizing the risk of disrupting your live site.

2. Backup the Site

Before making any changes to your WordPress site, including deleting a theme, it is crucial to create a backup.

Backing up your site ensures that you have a restore point should anything go wrong during the deletion process. Many hosting providers offer one-click backup options, or you can use a plugin to do it for you.

For more details on WordPress backups, please read the WP Bolt article “How to Backup a WordPress Site.

Once you have completed these tasks, you are ready to delete the WordPress theme. Let’s now check out three methods for doing this.

Method 1: Remove Themes Via the WordPress Dashboard

The simplest method to delete a WordPress theme is through the WordPress dashboard. Here’s how to do it:

Login to your WordPress admin dashboard and choose Appearance > Themes from the lefthand menu.

  1. A complete list of installed themes will appear, with the active one displayed first. Locate the one you want to delete and click on it to view its details.
  2. Click the “Delete” link located in the lower right-hand corner. WordPress will prompt you to confirm the deletion, so click “OK” to proceed with the theme deletion.

Deleting themes via the WordPress dashboard is a very user-friendly approach. However, if you can’t access the WordPress dashboard, you can try one of the following methods instead. However, these require a little more technical skill, so if you are a relatively inexperienced WordPress user, we advise using Method 1 if possible.

Method 2: Remove WordPress Themes via FTP/SFTP

If you can access your site’s files through FTP or SFTP, you can delete a WordPress theme directly from the server. Here’s how you can do it:

  1. Connect to your site’s server using an FTP/SFTP client.
  2. Navigate to the “wp-content/themes” directory. Here, you will find all the installed themes on your WordPress site.
  3. Identify the folder corresponding to the theme you want to delete.
  4. Right-click on the folder and pick “Delete” from the popup menu.
  5. Confirm the deletion when prompted to remove the theme folder from your server permanently.

This method allows you to delete a theme even if you don’t have access to the WordPress dashboard. However, be careful when using this method, as you won’t have the same level of information and confirmation as in the WordPress dashboard.

Method 3: Remove WordPress Themes via WP-CLI

If you are comfortable using the command line, you can use WP-CLI to delete a WordPress theme quickly. Here’s how to do it:

  1. Access your site via the command line using WP-CLI.
  2. Type the command wp theme list to see a list of all installed themes. To view only inactive ones, use the command wp theme list –status=inactive.
  3. Identify the theme you want to delete and note its folder name.
  4. Use the command wp theme delete theme-folder-name to delete the theme.
  5. WP-CLI will display a confirmation message once the deletion is complete.

While this method is the fastest way to delete a theme, it does require some familiarity with WP-CLI. However, please exercise caution when using it to ensure you delete the correct one.

Testing Your WordPress Site After Theme Removal

After you remove a WordPress theme, testing your site to ensure everything still functions as expected is essential.

Here are some steps you can take to validate that everything is in order:

  1. Clear your browser’s cache to ensure you are viewing the latest version of your site.
  2. Navigate to different pages on your site and verify that the design and layout remain intact.
  3. Check for any missing images or broken elements and fix them if necessary.
  4. Test any custom functionality, such as forms or plugins, to ensure they still work correctly.
  5. Should you encounter issues, you can refer to your backup and restore the deleted theme if necessary.

Thoroughly testing your site allows you to identify and address any potential issues caused by the removal of the theme before they become a real problem.

Deleting Residual Theme-Related Content

When you delete a WordPress theme, some theme-related content that needs attention may remain, such as:

  • Widgets

You can find unused widgets from the deleted theme in the “Inactive Widgets” section of the “Widgets” screen. Once you have located them, they can either be deleted or dragged to widget areas in your new theme.

  • Menus

If your site had custom menus associated with the deleted theme, you will need to reassign them to the appropriate menu locations in the new one. You can do this by navigating to the “Menus” screen and configuring the menu locations.

  • Dummy Content

If you imported or created dummy content for testing purposes, you may want to remove this content after deleting the theme. Navigate to the “Posts” and “Pages” screens to delete any unnecessary content.

Additionally, if the deleted theme registered a custom post type, delete any posts associated with that post type.

  • Images

Image settings vary significantly between themes, such as featured images or custom image sizes.

Therefore, after deleting a theme, you may need to resize images to fit the settings of the new one. Consider using a plugin like Regenerate Thumbnails to regenerate images and remove unused image sizes.

By attending to these theme-related content aspects, you can ensure your site is clean and optimized for your new theme.

Fixing Things When You Remove the Wrong Theme from WordPress

If you mistakenly remove the wrong theme from your WordPress, don’t panic; reinstalling it is simple enough.

To reinstall a theme, go to your WordPress dashboard and select Appearance > Themes. Once there, click on “Add New.” If the deleted theme was initially downloaded from the WordPress theme directory, locate it using the “Search Themes” box.

Alternatively, if you bought it from a third party, you’ll need the theme Zip file you got when you purchased it, which you then install using the “Upload Theme” option.

And, of course, if the worst comes to the worst and you cannot find the theme you deleted, you can always revert to the backup of the site you made earlier.

Summing Up

Removing unused themes from your WordPress site is essential for security and can improve performance and make overall site maintenance easier.

The three methods we have covered in this article will help you safely and thoroughly delete no longer needed themes from your WordPress installation. However, please remember to test your site afterwards and address any residual theme-related content to ensure a smooth transition.

By keeping installed themes to the bare minimum, you can optimize your site’s performance and maintain a secure WordPress environment.

And remember, a website is only as good as the provider hosting it. That is why WP Bolt uses virtual private servers (VPS), which offer excellent reliability, security, and performance at a sensible price.

Want to speed up your web site?

WP Bolt makes it easy and affordable to have a High Performance WordPress VPS server.

View Pricing & Sign Up Now