Thinking of changing your theme, but afraid that it might be unsafe to your site?
The answer is both yes and no.
In this article, I will show you how to uninstall and delete a WordPress theme safely. We will also delete an inactive WordPress theme.
Before that, let’s understand the difference between deleting and uninstalling the WordPress theme.
Uninstalling vs Deleting WordPress Theme
Uninstalling the WordPress theme does not mean it is deleted from your WordPress site. It only means that the theme is in the background now, and has given the stage to the active theme.
Unlike plugins (multiple plugins can be installed on one WordPress), you can only have one theme activated. If you activate a theme, the previously activated one will get deactive.
Also, plugins have to be deactivated manually, but with the theme, activating one deactivate other.
In such a case, the deactivated theme does not get deleted, but stay in the system. The data, setting, configuration, widgets, customisation etc. are saved in a database in case you reactivate the theme in future.
As convenient as it looks, but having lots of deactivated WordPress theme is like collecting dead bodies. It will hurt the site eventually.
Better to delete deactivated themes.
Importance of Deleting WordPress Theme
The resistance to deleting the WordPress theme could be strong, as you could make lots of excuses to keep it. A dead theme does not hurt anybody, and you might need to install it again.
Learn: How to Install a WordPress Theme? (2 Methods)
But WordPress experts advice to delete any code that is not functioning presently on your site. Be its themes, plugins or any custom code.
- Hacking: WordPress themes are one of the major reason that site gets hacked. More themes on your site, more gates there are to unlock.
- Updating: Users tends to forget to update the themes that are deactivated. The outdated theme is an exploitable opportunity and must be deleted.
- Space: The WordPress hosting host each line of code. Having unused themes is wasting resources.
Delete a WordPress Theme if,
You should delete a WordPress theme if:
- You installed a new theme and did not plan to go back to the older one.
- Was checking out the theme, and now want to go back to the old one. Delete the new one then.
Do not Delete a WordPress theme if,
You should not delete a WordPress theme if:
- The theme is actually a parent theme, and you are using the child theme of it.
- You are running a Multisite Network, and the theme is active on other sites.
- You are still testing the theme, and need it in future to run more tests.
Preparation before Deleting WordPress Theme
Even after you know whether you should delete the WordPress theme or not, you should not do it directly. Your website have to be prepared for it, so to prevent the irreversible damage.
Taking Backup
The first recommendation is taking a complete backup of the site.
A quick way to take the WordPress backup is:
- Login to the WordPress admin dashboard
- Find the Tools >> Export in the sidebar.
- Export all the content to the Local storage
Keep a Default WordPress Theme
Keeping a default WordPress theme installed is a wise move. WordPress releases its official theme every year. It is safe to keep the latest one on the site.
If something goes wrong with your active theme, WordPress will fall on to the next theme available, and that is the default WordPress theme.
How to Delete WordPress Theme?
Well, you deactivated the theme and decided to delete the WordPress theme. Now, you are prepared to delete it.
I am sharing two beginner-friendly ways to delete WordPress theme.
- Deleting a WordPress Theme via the WordPress Dashboard
- Delete a WordPress theme using File Manager
Deleting a WordPress Theme via the WordPress Dashboard
Steps to delete WordPress theme via WordPress Dashboard:
- Go to Appearance >> Theme
- Click on the theme you want to delete.
- Find the delete button on the theme detail box.
- Click on the delete button to delete the theme.
- Confirm the deletion by clicking ‘Ok’ button.
This is the quickest, and simplest method to delete the WordPress theme.
Delete a WordPress theme using File Manager
Each web hosting provides you with a hosting panel. If not hosting panel, they will give you cPanel (a third-party hosting management software).
Well, to use this method, you need access to the File Manager.
In this tutorial, I am going to use cPanel, as it is a popular hosting management service, and many hosting providers gives cPanel.
Steps to delete WordPress theme using File Manager:
#1 login to your cPanel/Web Hosting Panel
#2 Find the File Manager under Files section
#3 Locate the Theme folder following the /public_html/wp-content/themes/ directory.
#4 Delete the theme you want to delete (right-click).
That’s it.
You successfully deleted the WordPress theme.
After Deleting the Theme
You deleted the Theme files from the WordPress, but there is still some work to do to ensure the site is working properly.
- Delete the cache, and browse the site via incognito browser.
- Go to the Widget area of the site (Appearance >> Widgets), and clear the inactive Widgets. It will remove all the outdated Widget of the deleted theme.
- Assign the proper location to the Menu. Maybe the new theme you installed has more Menu locations or less.
- Use the regenerate plugin to regenerate the thumbnails for the new theme size.
If anything goes wrong, use the backup to restore the site to safe ground.
Take Away
Deleting the deactivated theme is better for WordPress performance and security. But you should not delete the theme next moment you deactivate it.
In this quick and simple tutorial, I showed you how to uninstall and delete the WordPress theme. We also learned the when you should delete the WordPress theme and when you should not.
If you have any doubts and questions, please leave them in the comment box.