Are you happy with your current WordPress theme?
If your answer is yes, that’s great!
But, if you feel like changing your WordPress theme, what do you plan to do with your previous theme?
Some of you might want to keep it in your database. However, we recommend deleting it if you are sure you won’t re-use it.
Deleting unused WordPress themes is good practice. It makes your site faster and more secure. In this guide, we will talk about how to delete a WordPress theme safely.
Table of Contents
- Why Do You Need to Delete a WordPress Theme
- Benefits of Deleting a WordPress Theme
- Deactivating Vs. Uninstalling Vs. Deleting a WordPress Theme
- When You Should Not Delete a WordPress Theme
- Things You Should Do Before Deleting a WordPress Theme
- 1. Deleting a WordPress Theme using the Admin Dashboard
- 2. Deleting a WordPress Theme with FTP
- 3. Deleting a WordPress Theme using File Manager
- 4. Deleting a WordPress Theme Through WP-CLI
- Testing Your Site After Deleting a WordPress Theme
- What to Do if You Accidentally Delete a WordPress Theme?
- Frequently Asked Questions
Why Do You Need to Delete a WordPress Theme
Before deleting your WordPress theme, you must consider different criteria. Below are certain cases where deleting your WordPress theme is a better choice.
- You installed a new theme and want to get rid of your old one.
- You installed a theme to test, and you don’t use it anymore.
- You don’t use your default theme and want to remove it from your WordPress.
Benefits of Deleting a WordPress Theme
Storing your old theme in your database might be tempting, but we recommend against it. It is always best that you remove any unused code in your WordPress, including theme or plugins. Some of the benefits of deleting old WordPress theme are:
More themes on your database mean more opportunities for hackers to infect your site. After all, WordPress themes are written in PHP. Unused themes may serve as a base for rogue developers. They might hide malware and ill codes on your site through such themes. Check out these guide 15 tricks to secure your WordPress website to find out more ways to secure your website.
Notifications can be annoying. Even when you don’t use the theme, you will keep receiving update notifications for it. Deleting the theme removes the update notifications.
Keeping multiple unused themes in your WordPress affects your dashboard. When WordPress runs the update process, it checks for all the themes installed on your WordPress, increasing the update time. Thus, your backend’s performance decreases considerably.
Deleting those themes saves the updating time and increases the performance as well.
Every theme file you have on your WordPress is taking up space on your valuable hosting plan. They increase your backup size and decrease your site’s performance. You may also end up paying for an expensive plan to keep your files which you don’t even use. Thus, deleting those themes will save you valuable space.
Deactivating Vs. Uninstalling Vs. Deleting a WordPress Theme
Deactivating, uninstalling, and deleting a WordPress theme sounds similar. In theory, they are closely related. But, in reality, these three terms are a lot different than you think.
Below we aim to describe what these three terms actually mean.
Deactivating a WordPress Theme
When you deactivate a WordPress theme, it means its files and all the settings are still stored in the database.
WordPress keeps only one theme active on your site at a time. It automatically deactivates the rest of the themes, even if you just installed it.
Deactivating does not remove your files, settings, or configuration on that theme. Moreover, they remain intact in the database, including the widgets and menus.
Uninstalling and Deleting a WordPress Theme
Both uninstalling and deleting removes the theme files from your server. There aren’t any data of that theme left in your WordPress. However, uninstalling the theme might not take out all the related content. Thus, deleting a WordPress theme is a sure-shot method to free your WordPress from a particular theme.
When You Should Not Delete a WordPress Theme
Sometimes, even though there are multiple themes on your WordPress, you should not delete them. Here are some instances when you should not delete a WordPress theme:
- When your current theme is the parent theme,
- When you have a multisite network and your theme is active on another website of the network,
- When you need to test another theme but don’t plan on using it after trying it.
Things You Should Do Before Deleting a WordPress Theme
Once you are sure you won’t need the theme later, you can proceed with the deleting steps. Before that, here are some important steps to follow:
1. Staging Site
A staging site is the replica of your live site that stays on the same server. If you have a staging site of the theme you want to delete, we recommend deleting it on the staging site first. It gives 100% assurance that there won’t be any problem later. Here is how you can set up a WordPress staging site.
2. Backing Up Your Site
Creating a backup of your site is always a smart move, even when updating any theme element. Most of the hosting providers offer a one-click backup option. But if your theme does not have that option, here is our guide on how to backup your WordPress website.
DO NOT skip the backing up step.
1. Deleting a WordPress Theme using the Admin Dashboard
This is the easiest and quickest method of deleting your WordPress theme. Here are the steps:
- Open your admin dashboard.
- Go to Appearance and click on Themes.
- Click on the name of the theme that you want to delete. If you want to delete the active theme, first activate the default WordPress theme.
- Then click on the Delete button at the bottom right corner of your screen.
- WordPress asks for your confirmation to delete the theme. Click on the OK button to confirm.
You have successfully deleted the WordPress theme using your admin dashboard.
2. Deleting a WordPress Theme with FTP
This method is tricky as compared to the first method. However, it comes in handy in case you don’t have access to the admin dashboard.
- Connect to your WordPress using your FTP manager.
- Go to /wp-content/themes folder.
- Right-click on the theme folder you want to delete.
- Select Delete.
Your FTP manager will now delete the selected theme folder. However, you don’t get to know which theme is active using this method. It might be risky if you are not sure about it beforehand. Backing up your WordPress seems a smart move here.
3. Deleting a WordPress Theme using File Manager
If you are not comfortable using FTP manager to delete your WordPress theme, you can use the File Manager app in your hosting panel. Depending on your hosting provider, the cPanel may look different.
Here are the steps of deleting a theme using File Manager in Bluehost:
- Log in to your hosting account dashboard.
- Click on the ‘Advanced’ tab on the left side panel.
- Click on the ‘File Manager’ icon.
- Now navigate to /public_html/wp-content/themes/ folder.
- Select the theme you want to delete.
- Right click on it and select the ‘Delete’ option from the list.
You have successfully deleted the WordPress theme using File Manager.
4. Deleting a WordPress Theme Through WP-CLI
If you are not familiar with the WP-CLI, we don’t recommend this method. You might delete the wrong files, which might bring your website down. However, if you’re good with using command lines, this should be one of the easiest and quickest ways to delete your WordPress theme.
Here’s how you delete a theme using this method:
- Access your site through the command line using WP-CLI.
- Type $ wp theme list to see the list of all your installed themes.
- Type $ wp theme delete folder name to delete the theme. The final parameter, folder name, is the name of the theme’s folder that you want to delete.
You will then receive a message declaring you have successfully deleted a theme.
Testing Your Site After Deleting a WordPress Theme
After you delete a WordPress theme, it is important to check if everything is working fine on your site. Sometimes, you might accidentally delete the parent theme. In that case, you will find some of or all of the CSS missing. When you accidentally delete the active theme, WordPress will automatically replace it with some other installed theme.
What to Do if You Accidentally Delete a WordPress Theme?
If you accidentally delete a WordPress theme, you can restore it using several ways. Many WordPress backup plugins allow you to restore your website to its previous stage. If you don’t have a backup, you can always download and reinstall the same theme. In the case of re-installation, you will lose all your previous customizations.
Frequently Asked Questions
Q. Should you delete unused WordPress themes?
Yes, you should do so. As mentioned above, piling up themes takes up your valuable space on the hosting plan. It degrades the performance of your site. Moreover, it poses a risk to your website’s security. We have mentioned four easy methods to delete a WordPress theme. Follow any one you find suitable.
Q. How can you change your WordPress theme without losing content?
Changing themes does not affect most of your website’s elements. Except for your style, all your posts and pages remain the same. Basically, nothing goes wrong when you switch themes.
To learn more, check out how to change WordPress themes.
Deleting a WordPress theme is very easy and takes just a few minutes. Also, it is beneficial, as mentioned above.
But it is crucial to keep a backup of your site before deleting your theme. You never know what might go wrong. A backup always keeps you on the safe side.
We hope you found this guide helpful. If you did, leave us a thumbs up in the comment section below. You can also reach us for any query regarding WordPress.