How to Delete a WordPress Theme – Very Simple Method!
Themes are an essential part of the WordPress experience. Over time, however, you will find that the theme you’re using doesn’t look right. In that situation, almost every webmaster decides to switch to a new theme.
In that scenario, it’s best to delete the older WordPress theme. A best practice in general, if you’re not using a theme or plugin, it’s best to delete it to ensure the security and performance of your WordPress site.
In this post, we’ll be outlining three different ways in which you can delete a WordPress theme. Depending on your technical level, you can choose between one or the other.
Before we begin, we’ll be laying down some groundwork regarding WordPress themes. If you feel like jumping right into the deletion process, you can use the Table of Contents to scroll down to the crux of this article.
When Is the Right Time to Delete a WordPress Theme?
There are three situations where you might find yourself switching to a different WordPress theme:
- Your old theme is just not cutting it anymore, and you want to get rid of it.
- You tested a new theme on your site, but it just wasn’t right for you.
- You want to remove a default theme (Twenty Twenty, or Twenty Twenty-One, depending on when you’re reading this) and switch to a new theme.
Whatever scenario you fall under, deleting the theme remains the same.
Why Deleting Unused WordPress Themes Is Best Practice?
Let’s suppose you delete a WordPress, and just to be on the safe side, you decided to keep your old WordPress theme. In that situation, you’re cautious, so it’s alright.
However, some webmasters forget to delete their old themes even when the new theme is working fine. This poses a major WordPress security and performance threat that can cause severe roadblocks for your WordPress operations.
If everything is alright with your new theme, it’s best to delete your old WordPress theme. There are plenty of reasons why you might want to do that. Let’s look at each one of them in detail:
WordPress themes are regularly updated with security fixes. If you have too many themes installed, then it becomes difficult to keep an eye on updating each of them. As a result, your themes can get affected by bugs and vulnerabilities, and you might even know it.
If you delete an older, unused, and obsolete theme, you don’t have to worry about updating them. The fewer themes you have, the better your WordPress management processes become.
The more themes (and plugins) you have, the heavier your site becomes. Too many WordPress Themes occupy a significant chunk of disk space, and each theme can impact your website’s performance. With just a couple of themes, you keep your site lightweight and, as a result, high-performing.
Disk Space and Storage Concerns:
To repeat what we discussed in the previous section, the more themes you have, the more disk space you occupy. The area occupied might look insignificant from the outset, but it eventually builds up. This not only takes up irrelevant disk-space but also impacts the performance of your WordPress website.
Like storage concerns, the more themes you have installed on your site, the more space they will occupy within the database. When you delete the theme, that database entry will be deleted.
Difference Between Uninstalling and Deleting a WordPress Theme
You might be thinking they’re the same thing. Linguistically speaking, yes they are. Technically, they’re not.
Often, merely uninstalling a WordPress doesn’t mean that it’s deleted permanently from the database. There will be some files left remaining. We’ll touch on this concept when we tell you how you can delete a WordPress theme.
To keep your WordPress installation free from residue, you need to learn the difference between uninstalling and deleting a theme.
Theme deactivation happens automatically unlike that of plugins, where you have to manually deactivate plugins you don’t wish to have on your site. The reason behind this is due to the singular nature of WordPress. You can only have one WordPress theme at a time.
When you activate a new theme, the previous one gets uninstalled. Since it’s uninstalled, there will be a database entry of the theme present if you want to re-activate it. If you’ve installed any widgets, they will also be deactivated and present within the Inactive Widgets section of your WordPress file.
If you don’t have any particular use for a theme, you need to delete it forever and not uninstall it.
The Importance of Backing Up Your WordPress Site
If you are sure that your old WordPress theme won’t be in use for the foreseeable future and is not a parent theme, it’s time you go about deleting it.
But wait up!
Before you hit the delete button, there is one important consideration you need to take into account.
We can’t stress the importance of having a WordPress backup when you’re performing maintenance work.
Now, some hosting services provide backups while others don’t. If your host falls under the latter, you can perform either a manual backup or use a WordPress plugin.
Whatever option you choose, you shouldn’t skip out of this step.
How to Delete a WordPress Theme
Finally, we’re at the main phase of this article. In the succeeding sections, we’ll be discussing three ways in which you can delete a WordPress theme.
If you’re sure that you want to delete a WordPress theme, you have the following options:
- Directly through the WordPress admin dashboard.
- Through a File Transfer Protocol software like FileZilla.
- Using the WP-CLI
Let’s look at the first method you can use to delete a WordPress theme.
1. How to Delete a WordPress Theme via the WordPress Dashboard
This section is the most appealing for regular WordPress users because it doesn’t involve code or using an FTP. You can delete your WordPress theme directly from the dashboard quickly.
Access your wp-admin dashboard. From there, navigate to Appearance > Themes.
You will then be directed to the theme repository. This is where all your installed themes, active and inactive, are stored.
To delete a particular theme, click on it. The display will show you its details. At the bottom right-hand corner, you will see a Delete button. Just click on it to continue.
WordPress will then ask whether or not you want to delete the theme. Since we’re sure that we want to delete the theme, well, click on OK.
2. Deleting a WordPress Theme via FTP/SFTP
There are a few reasons why you would want to select this option:
- You don’t have access to your WordPress dashboard, and you want to delete a theme.
- You’re a developer looking to delete a faulty theme from the root folder.
- You’re just looking to explore the many ways you can delete a WordPress theme.
Even though this process is a bit technical, it’s entertaining to learn the backend workings of your WordPress website.
To delete your WordPress theme through the FTP, you need to first gain access to your FTP. You can use a software like FileZilla for that purpose.
When you’ve connected FileZilla to your website, you need to look at a folder titled wp-content.
When you enter the folder, you will see several folders like themes and plugins. You want to enter a folder titled themes. To be specific, you need to select a folder called wp-content/themes.
The folder will contain all sub-folders of all your installed themes. The tricky part here is selecting which theme you want to delete because you don’t know which theme is active. If you just have two themes installed, then it’s no biggie, but if you have several themes, it will be a problem.
That said, if you can’t log-in to your WordPress admin dashboard, this is your only option.
To delete a theme folder, select it, right-click, and select delete from the drop-down options.
When you click Delete, your FTP will ask you whether or not you want to delete the theme. Click on OK if you’re sure your selected theme is the one you want to delete.
3. Deleting a Theme via WP-CLI
This one’s the most technical of the three and for the right reasons. In performing this, you might type in the wrong command and delete the wrong files. However, if you know how the WordPress command-line interface (CLI) works, this would be pretty easy.
Access your WordPress site through the WordPress CLI.
To see the list of themes installed on your WordPress site, type in the following command:
$ wp theme list
You will then see a CLI display of all the themes installed on your WordPress site. To see which theme is active on your site, you can type in the following:
$ wp theme list –status=inactive
Knowing which themes are active and which are inactive helps you decide which theme you should ideally delete.
To delete, type in the following command:
$ wp theme delete twentyseventeen
The last parameter in the entire command titled “twentyseventeen” is the root name of the theme you want to delete.
If the command was successfully implemented, you would see the following screen:
Deleted ‘twentytwelve’ theme.
Success: Deleted 1 of 1 themes.
Again, if you know the basics of starting up the WordPress CLI, this process becomes effortless. It’s all a matter of writing the right commands.
Testing Your Site After Deleting a Theme
Once you’ve successfully deleted your WordPress theme, you can’t sit back and relax. An essential aspect of the post-deletion process is testing your website for performance. Ideally, everything should work correctly. But there are moments when the statement doesn’t hold up.
For example, if you deleted a parent theme of an active theme, you might have deleted important CSS or PHP elements that can make the website run poorly. This can impact the overall user experience and performance of the website.
If you deleted the wrong theme by mistake, then it’s best to reinstall it from the repository you downloaded it from.
When you’ve finally deleted the WordPress file, all you have to do is fix your menus, widgets, and other elements you integrated through your WordPress theme.
And you’re done!
As you can see, deleting a WordPress theme isn’t as easy as clicking on Delete and getting it over with. There are specific considerations you need to take into account before going about the deletion process.
In addition to this, you should also make sure that you delete your WordPress theme safely and securely. Follow these steps accurately, and then you will be able to delete the theme properly.
We hope you enjoyed reading this article!
Need more technical stuff done on WordPress? Reach out for custom WordPress development services.