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.
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:
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.
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.
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.
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.
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.
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:
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.
Sometimes you may install a theme for testing purposes, in which case, it can be safely deleted if you decide not to use it.
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.
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:
You should not remove a previously installed theme if you wish to use it again, such as when testing other ones.
You should not remove a theme if it is the parent of the one currently active on your website.
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.
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:
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.
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.
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.
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.
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:
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.
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:
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.
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:
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.
When you delete a WordPress theme, some theme-related content that needs attention may remain, such as:
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.
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.
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.
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.
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.
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.
I’m a former construction industry professional who came out of the writer’s closet and am now totally comfortable with my creative side. My pronouns are smart, creative, witty, and dependable. I have written content in a number of niches including WordPress, plus I’m a blogger and affiliate marketer. If you’d like to know more about how I can help you, please head over to my website.
Speed up your WordPress site today by moving to WP Bolt.