If you’ve been using WordPress for a while, you may have noticed that you’ve installed several themes over time. But what happens to those themes when you no longer use them? Keeping unused themes in WordPress can create problems you may not even realize.
One of the biggest reasons to delete unused themes is the website’s security. Themes that aren’t regularly updated can become vulnerable to hackers because they often look for old, inactive themes to break into websites. Also, these themes take up space on your server, which could slow down your website’s performance.
In this tutorial, we’ll show you how to delete a theme in WordPress safely. We’ll walk you through 4 easy methods, whether you prefer using the WordPress dashboard, cPanel’s File Manager, File Transfer Protocol (FTP), or WP-CLI. By the end of this tutorial, you’ll know exactly how to keep your site clean and secure by removing unwanted themes.
Table of Contents
Things to Consider Before You Delete a Theme in WordPress
Before you delete a theme from your WordPress site, take a few precautions. This ensures you don’t accidentally break your site or lose important data. Let’s go through each step to help you prepare.
Backup Your Website
Before doing anything big on your WordPress site—like deleting a theme—it’s always smart to backup your site. So, if there is a problem, you can restore everything to normal.
You can use a plugin like UpdraftPlus to make a backup in just a few clicks, or you can use your hosting service’s backup tool if they offer one. However, if you’re hosting WordPress with Hosted.com, you can use our built-in tools to create full and partial website backups.
Verify Theme is not Active
You should never delete a theme in WordPress that’s currently active on your site. Ensure you use a different theme before removing the one you don’t need. You can check this by navigating to Appearance → Themes in your WordPress dashboard. If the theme you want to delete is active, switch to another theme, like a default WordPress theme (e.g., Twenty Twenty-Three), before proceeding.
Check for Customizations or Child Themes
If you’ve made any custom changes to the theme, ensure those changes are either no longer required or have been moved to your current theme. Sometimes, custom code is added directly to a theme, or you might use a child theme that depends on the parent theme.
If the theme you want to delete has a child theme, be careful—if you delete this, it could break this theme and cause parts of your site to stop working.
Test on a Staging Site
It’s a good idea to test delete the theme first on a staging site. A staging site is a copy of your website that you can safely use to test changes without affecting your live site. Many hosting providers offer staging environments you can use to ensure deleting the theme won’t cause any issues on your live website.
Before you proceed, ensure your site has one WordPress theme installed. After going through the above, you’ll be ready to safely delete any unused themes without worrying about unexpected issues!
How to Delete a Theme in WordPress
There are 4 common ways that you can explore to find out how to delete themes in WordPress:
- Delete a Theme in WordPress Using the Dashboard
- Delete a Theme in WordPress Using cPanel File Manager
- Delete a Theme in WordPress Using FTP
- Delete a Theme in WordPress Using WP-CLI (Command Line)
We discuss each below to see how the WordPress remove theme process works.
Use WordPress Dashboard to Delete a Theme in WordPress
Deleting a theme directly from the WordPress dashboard is the easiest and quickest way. However, you need administrative privileges to access the WordPress admin area. Once you’re in, use the following steps to remove a theme you’re no longer using:
From the left-hand menu, go to Appearance → Themes. This will take you to a page with all your installed themes displayed.
You’ll see a list of all the themes currently installed on your site. Ensure the theme you want to delete is not active. If it’s active, you won’t be able to delete it. In that case, you need to switch to another theme first.
Once you’ve chosen the theme you want to delete, hover over it and click Theme Details to open the theme details window.
Then, click Delete.
A confirmation notification will pop up asking you to confirm. Click OK, and the theme will be permanently deleted from your WordPress site.
Use Hosted’s cPanel to Delete a Theme in WordPress
Deleting a theme through cPanel is a direct way to manage your WordPress site, especially if you can’t access your dashboard. This method allows you to remove theme files manually, ensuring they’re completely deleted from your server. Here’s how to remove a theme using the Hosted cPanel:
Start by logging into your Hosted Control Panel (cPanel) account. This can usually be accessed by going to yourwebsite.com/cpanel. Ensure you replace yourwebsite.com with your domain name. Then, provide your username and password and click Login to access Hosted cPanel.
Once logged in, scroll down to the Files section and click File Manager.
In File Manager, you’ll see a folder structure on the left. Navigate to the following folder:
public_html/wp-content/themes/
This folder contains all the themes installed on your WordPress site.
Inside the themes directory, you’ll see folders for each theme. Select the folder for the theme you want to remove and click Delete at the top of the screen.
Alternatively, right-click on your theme folder and choose Delete.
Regardless of how you delete the theme, a confirmation will pop up. Here, you need to click Confirm to confirm the deletion in the pop-up; this will permanently remove the theme folder. Optionally, you can also skip the trash and permanently delete the files.
Important:
Double-check the folder name to avoid accidentally deleting the wrong theme, especially if themes have similar names.
Simplify your WordPress management by discovering effective ways to delete a theme.
Choose Hosted.com for reliable WordPress Hosting and expert support to ensure optimal site performance.
Use FTP Client to Delete a Theme in WordPress
Using File Transfer Protocol (FTP) to delete a WordPress theme is handy, especially if you cannot access your WordPress dashboard or the theme you want to delete is causing issues. In this case, FTP lets you directly manage and manipulate your website’s files. Here’s how to do it:
First, you need an FTP client to connect to your website’s files via FTP. One of the most popular options is FileZilla. If you don’t have it installed, you can download it from the official FileZilla website:
Then, install the FileZilla software by following the on-screen instructions.
Now you need to get your FTP login credentials; your hosting provider usually provides these. If you’re a Hosted client, you can find this information by navigating to cPanel → Files → FTP Account → Configure FTP Client.
Once you have your FTP client and login credentials ready, open FileZilla (or another FTP client that you’re using). In the top menu, you’ll see fields for the following: Host, Username, Password, and Port. Enter the required details and click Quickconnect.
Now that you’re connected to your website’s files, you need to find the folder that contains all the WordPress themes. To do that, go to the following directory in the right panel (the Remote site section):
public_html/wp-content/themes
Remember, you’ll see public_html as your root directory if Hosted.com is your website host. However, it can sometimes be www, depending on your hosting setup.
Inside the themes folder, you’ll see a list of folders, each named after the themes installed on your WordPress site.
Now, take your time to carefully find the folder of the theme you want to delete. Ensure it’s not the active theme, or you might break your site’s design. If you’re unsure which theme is active, log into your WordPress dashboard and go to Appearance → Themes to check.
Once you’ve identified the theme folder you want to remove, right-click on the folder of the theme you wish to delete and select Delete from the menu.
Here, FileZilla will ask you to confirm the deletion. Once confirmed, the theme folder will be permanently removed from your server.
Once you delete the theme folder via FTP, it’s a good idea to check your WordPress site to ensure everything works properly. If your website is still functioning well, the theme has been successfully deleted without issues.
Use WP-CLI to Delete a Theme in WordPress
WP-CLI stands for WordPress Command Line Interface. It is a tool that lets you interact with your WordPress site using terminal commands, bypassing the need for WordPress’s graphical interface.
With WP-CLI, you can perform tasks like updating plugins, installing themes, and even deleting themes quickly—without navigating the WordPress dashboard. WP-CLI is highly efficient, especially for developers or site administrators who make multiple changes across large websites.
Choose this approach over the others if you’re looking for the following:
- Faster Execution: If you’re comfortable using the command line, WP-CLI is faster than navigating the WordPress dashboard or cPanel File Manager. A simple command can execute tasks like deleting themes almost instantly.
- Unreachable Dashboard: When your WordPress dashboard is broken or inaccessible due to an issue, WP-CLI provides direct access to manage your site.
- Managing Large Sites: If you have larger websites or multisite installations, WP-CLI can simplify managing multiple themes or plugins simultaneously.
- Automating Tasks: If you’re running a script to automate tasks (like regular cleanup), WP-CLI is a perfect choice as it allows you to integrate commands into the script.
To use WP-CLI, you must first connect to your server using SSH (Secure Shell). You can do this using a terminal or command prompt on your computer. Windows users can use a terminal program like PuTTY or the built-in command prompt with SSH enabled. However, Mac/Linux users can open their terminal application.
For this tutorial, we use Windows Command Prompt. To follow along, you must open the command prompt on your machine. Once opened, run the following command to connect to your server (replace username, your-server-ip, and your-port-number with your credentials):
ssh username@your-server-ip -p your-port-number
If you’re trying to connect to your server for the first time, you’ll be prompted to add your server to the list of known hosts. You can type yes to add it. Then, provide your password. Remember, the password you type will not be visible, even in the form of asterisks.
Once connected, navigate to your WordPress installation directory, which is public_html for Hosted.com users:
cd /path/to/your/wordpress/directory
Then, before deleting a theme, it’s helpful to list all the themes currently installed on your site. This way, you can ensure you’re deleting the correct one. Execute the following command to list all installed themes:
wp theme list
The output will show a table of themes, including their name, status (active or inactive), and version. Ensure the theme you want to delete is inactive.
Now that you’ve identified the theme you want to remove, use the following command to delete it:
wp theme delete theme-name
Replace theme-name with the actual folder name of the theme you want to delete. For example, we want to delete generatepress, as shown in the screenshot below. You should see a success message if the theme is deleted successfully. Furthermore, you can execute the wp theme list command again to see if your desired theme has been deleted.
Important:
As with any other method, always create a full backup of your site before deleting themes, even if you’re using WP-CLI. You can also use WP-CLI to back up your database and files. Remember, WP-CLI won’t let you delete an active theme, but always double-check by running the wp theme list command to confirm which theme is active.
Why You Should Delete Unused WordPress Themes
When you have multiple unused themes on your WordPress site, it’s important to consider the benefits of removing them. Here’s why deleting old themes is a good idea:
Security Benefits of Removing Old Themes
Keeping inactive themes installed on your WordPress site can create security risks. Old themes no longer updated can contain vulnerabilities that hackers can exploit. Even if the theme is inactive, it still exists in your site’s files and can be targeted by malicious attacks. By deleting these themes, you minimize the potential entry points for hackers, making your site more secure.
Performance Improvement & Storage Optimization
Inactive themes take up valuable space on your server, and although they may seem harmless, they can affect your site’s performance over time. Deleting these themes can free up storage and reduce the size of backups, allowing your website to run smoother and faster. This can also improve your server’s efficiency and response time, leading to faster load times and a better user experience.
Easier Website Maintenance with Fewer Installed Themes
Having too many themes installed can make your WordPress dashboard look cluttered. It can also lead to more website maintenance tasks, as each installed theme (even if unused) may still require updates.
Deleting unused themes means managing your website is simpler, allowing you to focus only on the active theme and avoid unnecessary updates. This leads to a cleaner, more streamlined WordPress environment.
Tips to Safely Delete a WordPress Theme
Before you delete a WordPress theme, it’s necessary to follow a few useful safety tips to ensure you don’t cause any unintended issues on your site. These steps will help you avoid conflicts and ensure everything runs smoothly after the deletion.
Double-Check if Theme is in Use on Other Sites:
If you’re using WordPress Multisite or have a staging environment, ensure the theme you’re about to delete isn’t active on any of those sites. Sometimes, the theme you want to remove may not be active on your main site but could still be used elsewhere.
Review Database for Leftover Theme Options:
Some themes store settings or options in your WordPress database, even once you delete them. These leftover entries can take up space and clutter your database, so it’s a good idea to remove them. Use plugins like WP-Optimize to scan your database for theme-specific settings or leftover data.
Remove Theme-Specific Shortcodes if Necessary:
Some themes add shortcodes that display specific content or features on your site. If the theme you’re deleting has added any shortcodes, those may still be present in your content after you remove the theme, but they won’t work without the theme’s code.
If this happens, check your posts and pages for broken shortcodes that may no longer work after the theme is deleted.
What to do After Deleting a WordPress Theme
After deleting a theme, take these extra steps to ensure your site runs smoothly and you processed the deletion correctly.
If your website uses a caching plugin (such as WP Super Cache, W3 Total Cache, or LiteSpeed Cache), your changes might not be revealed immediately after deleting a theme. This is because cached files might still include data from the deleted theme.
In this case, you need to clear your website cache through the caching plugin you’re using. Also, if your hosting provider has server-side caching, you may need to clear that too. By clearing the cache, you ensure your users see the latest version of your site, and that any changes made by deleting the theme are reflected properly.
Also, check your website for any broken links or display errors. You can use a plugin like Broken Link Checker to scan your site for any broken links that need fixing.
These steps will ensure your website works perfectly and that no elements are affected by removing the theme.
KEY TAKEAWAYS
- Deleting unused themes in WordPress helps improve site security by removing potential vulnerabilities.
- This can boost your site’s performance by freeing up server space.
- Always back up your website before you delete a theme in WordPress to ensure you can restore your website if necessary.
- You can delete themes using the WordPress dashboard, cPanel File Manager, FTP, or WP-CLI.
- Double check the theme isn’t active before deleting it; you can’t delete an active theme.
- Use caching plugins to clear your site’s cache after deleting a theme to ensure the changes are visible to visitors.
- After deleting a theme, check your site for errors or broken links to ensure everything works properly.
- If you’re managing multiple WordPress sites or have technical issues with the dashboard, WP-CLI is a fast alternative to delete themes.
FAQs
Will deleting a theme affect my website’s content?
No, deleting a theme won’t remove your posts, pages, or media. However, if you use theme-specific shortcodes or custom widgets they might stop working once the theme is deleted. After you have deleted a theme, always review your site for broken shortcodes or missing features.
Can I restore a deleted theme?
Once you delete a theme, it’s permanently removed from your server. If you want to restore it, you’ll need to reinstall it. You can download the theme from the official WordPress repository or upload it from a backup if you have one.
Is it safe to delete default WordPress themes?
You can delete default themes like Twenty Twenty-One or Twenty Twenty-Three. However, it’s recommended you keep one default theme installed. This can serve as a backup in case your active theme fails. WordPress will automatically change to the default theme if something goes wrong with your current one.
What happens if I accidentally delete a theme in WordPress?
If you accidentally delete an important theme, don’t worry. You can reinstall it from the WordPress repository or restore it from a backup. This is why it’s always a good idea to back up your site before making any major changes.
How many themes should I keep installed?
You only need to keep one active theme and one default WordPress theme (like Twenty Twenty-Three) installed. Any unused themes should be deleted to free
Other Related Tutorials & Blogs:
– How To Edit Header In WordPress With Site Editor & Customizer
– How to Enhance Website Performance with WordPress CDN Plugins
– How to Fix the WordPress 500 Internal Server Error
– How to Fix 502 Bad Gateway Error in WordPress
– How to Install WordPress Themes: A Beginner’s Guide
- About the Author
- Latest Posts
Rhett isn’t just a writer at Hosted.com – he’s our resident WordPress content guru. With over 6 years of experience as a content writer, with a background in copywriting, journalism, research, and SEO, and a passion for websites.
Rhett authors informative blogs, articles, and Knowledgebase guides that simplify the complexities of WordPress, website builders, domains, and cPanel hosting. Rhett’s clear explanations and practical tips provide valuable resources for anyone wanting to own and build a website. Just don’t ask him about coding before he’s had coffee.