Is it time to change your WordPress theme? When the time comes, the best thing to do is remove the theme you no longer use in WordPress. Learn how to uninstall themes on wordpress quickly and efficiently with this helpful guide.
It is a good practice to delete themes that you are not going to use:
– It frees up space on the hosting and improves performance.
– It makes it harder for hackers to break into your website by not having unused themes installed.
– It avoids not updating an inactive theme, which could be an open door for hackers.
Table of Contents
Deactivating or deleting a theme in WordPress, what’s the difference?
WordPress allows you to deactivate a theme to activate a new one; by doing so, nothing is deleted, and the settings are kept in the database.
Widgets added to different areas are not deleted but are no longer active; the same goes for menus.
Deactivating a theme is a good option before deleting it permanently; this way, we make sure that the new theme works correctly, and if it doesn’t, we can reactivate the previous theme.
Before deleting a WordPress theme, it is best to make a website backup. In this article, you can learn more about how to make backups.
Godaddy Website Builder vs WordPress: Which is better?
How to uninstall themes on wordpress
Deleting a WordPress theme from the dashboard
In the WordPress dashboard, go to Appearance > Themes.
In the list of installed themes, the one that appears first will always be active.
In the list, look for the theme to remove; this theme cannot be active. Once located, click “Theme Details” and then “Delete”. WordPress will show you a message to check that you want to delete the theme. To delete it definitively, click on the “Accept” button.
It’s that simple! In just two steps, you have already deleted a WordPress theme. Simple.
Shopify vs WooCommerce: which is better for your online shop?
Deleting a WordPress theme via FTP/SFTP
If you do not have access to the control panel but have access to FTP/SFTP, you can delete the folder containing the theme.
Through your FTP client, locate the theme folder in the path wp-content/themes, locate the theme to delete in the list, right-click on it, and in the popup menu, click on Delete. A message will appear to check if you want to delete the theme. To delete it definitively, click on the “Yes” button.
As you can see, it is a very simple method; you need to install one of the many free FTP clients, such as FileZilla Client.
Removing a WordPress theme using WP-CLI
Using the WP-CLI command line, you can delete a WordPress theme using this tool.
WordPress Secure – A Complete type of Security Vulnerabilities
First, log in to the WordPress site and type the following command to see the list of inactive themes:
$ wp theme list –status=inactive
To delete the topic, type the following command with the name of the topic folder at the end.
$ wp theme delete twentynineteen
A message will indicate that the topic has been successfully deleted:
Deleted ‘twentynineteen’ theme.
Success: Deleted 1 of 1 themes.
This is a quick way if you are familiar with WP-CLI; if you want to know more about this tool, check out this post, where we review everything you need to know about WP-CLI.
When not to remove a WordPress theme
Before deleting any theme, there are a couple of cases when a non-active site should not be deleted.
Parent theme of a currently active child theme
When using a child theme, the parent theme will be inactive in WordPress, but deleting it will stop it from working.
Clicking on “Theme details” in a child theme shows which theme is the parent theme.
The Best WordPress Plugins for Travel Blogger Websites
WordPress Multisite
You can only delete or install themes in a multisite network if you are the network administrator.
When working on a multisite network, you have to be especially careful when deleting a theme that you do not have active, as there may be another user who does have it active.
You can install the Multisite Enhancements plugin to find out which themes are being used on the network. This plugin enhances the network area for super admins with very useful functions; one of them is to show the active theme of each site and if this theme is a child theme.
Conclusion
Although improving the performance and security of WordPress goes much further than deleting a theme, it is a very important point to take into account to improve those two aspects.