How to Delete a Theme in WordPress (2024)
Do you want to know how to delete a theme in WordPress? If yes, you’ve landed on the right page.
If you’ve installed multiple themes on your site, they might take up space. Therefore, deleting an unused WordPress theme is always a good idea to free up server space.
In this article, we’ve gathered four simple methods to help you delete a theme in WordPress to help you keep your site optimized and clutter-free.
Deleting a WordPress Theme (TOC):
When to Delete a WordPress Theme?
WordPress only requires one active theme at a time. Remember, unused themes simply take up space. So, you should keep only the current and backup themes (such as a default WordPress theme like Twenty Twenty-Three).
There are several reasons why you might want to consider deleting a theme. Let’s find them out:
- When You’re Not Using the Theme: Suppose you’ve switched to a new theme; the old one will no longer be necessary for your site. So, keeping only the current and backup themes will be better.
- After Trying Out a New Theme: If you tested multiple themes to find the right fit, delete those you won’t use to keep your site uncluttered.
- When the Theme is Outdated or Incompatible: Outdated WordPress themes can become security risks. Because they don’t receive updates to ensure compatibility with the latest WordPress versions, it’s always a good idea to remove them.
- To Improve Security: Any inactive theme can pose a security risk. Removing unnecessary themes minimizes the chance of vulnerabilities.
- For Site Performance and Speed: Themes take up server space, slowing down your site’s speed. Deleting unused themes can free up space and help improve site performance.
When NOT to Delete a WordPress Theme?
There are some situations when you should avoid deleting a WordPress theme. Here’s when it’s best to keep those themes:
- Keeping a Default WordPress Theme: It is better to have at least one default theme, i.e., Twenty Twenty-Five, Twenty Twenty-Four, or Twenty Twenty-Three. Because WordPress uses it as a fallback in case your active theme faces any issues.
- When It’s Required by Plugins or a Child Theme: If you use a child theme, do not delete its parent theme. The child theme completely relies on the parent theme, and removing it will cause the site to break.
- If It Contains Useful Custom Code: Suppose you’ve added custom code, i.e., CSS or PHP snippets, within a theme that isn’t active; don’t delete it without extracting the code. Because you may want to use that code in the future, it can be difficult to recreate from memory.
- If the Theme is Active on a Multisite Network: You should avoid deleting a WordPress theme that is activated on one site of a multisite network because you’ll need the same theme for all sites.
What to Do Before Deleting a WordPress Theme?
Before deleting a WordPress theme, it’s better to take a few proactive steps to ensure you don’t lose any valuable customizations, data, or styling.
Here’s a quick checklist that will ensure a smooth and safe theme deletion process without the loss of any desired functionality:
- Back up Your Site: Before making any changes, create a complete site backup, including files and the database, with the help of a WordPress backup plugin. If something goes wrong, you can easily restore the site to its previous working state.
- Test on a Staging Site: If you have a staging site, it would be better to delete the theme there to see if any problems occur.
- Export Theme Customizations: If your theme has customizations within the Customizer, such as colors, fonts, etc., it is better to make note of these settings before deleting them so that you can reuse them with a new theme.
- Check for Custom Code: Some themes may have custom code added directly to theme files, e.g., CSS in the theme’s style.css file or PHP functions in functions.php. It is better to copy any custom code you’d like to keep.
- Verify Compatibility with Child Themes: Suppose you have a child theme for your site. If you delete the parent theme, the child theme will also be broken. So, it is better to delete a parent theme only if you no longer require both themes (parent and child).
It is a good idea to review your site after deactivating the theme and before deletion to confirm it’s working fine. For example, pages, posts, and layouts appear correctly with the new active theme.
How to Delete a Theme in WordPress (4 Easy Methods)
Method 1: Deleting a WordPress Theme via the Admin Area
You can quickly delete a WordPress theme via the admin area.
You can access the themes options by going to the left sidebar of the WordPress admin dashboard, navigating to Appearance, and selecting the Themes option.
On the next screen, you can see all the installed themes. Simply select the one you want to delete.
Now, click the Delete button.
You’ve successfully deleted the theme from your site.
Method 2: Deleting a WordPress Theme via FTP
Suppose you’ve lost access to the admin area for some reason. Then, you’ll be required to log in to the FTP client first and open your site’s root folder, which is the public_html.
Next, open the /wp-content/themes/ folder.
Next, navigate to the theme folder that you want to delete, right-click on it, and choose the Delete option.
All done! You’ve deleted your selected theme.
Method 3: Delete the theme via cPanel
If you don’t have access to your admin dashboard and don’t want to delete the theme via FTP, you can use the cPanel method.
To do this, you must log in to your hosting account and gain access to the File Manager.
Next, find the wp-content folder within the site’s root directory (e.g., public_html) and choose the themes folder.
Now, navigate and right-click on the theme you want to delete.
Your selected theme has been deleted now!
Method 4: Delete the WordPress Theme via WP_CLI
You can also delete a WordPress theme with the help of the WordPress Command Line Interface (WP-CLI).
This interface helps you update plugins, themes, etc., without using a web browser. So, you can interact with your site by using commands in a text-based interface.
To delete a theme via WP_CLI, you’re required to install WP-CLI first.
Next, access your site via the command line. Now, you can add the following command to see all installed themes:
$ wp theme list
You can also see the inactive themes simply by typing:
$ wp theme list –status=inactive
Now, find the theme you want to delete from your site and add the following command:
wp theme delete themename
Note: Replace the actual name of the theme you want to delete with “themename” in the command line. Plus, use the theme folder’s name, not the theme name, the way it appears within your WordPress admin dashboard, i.e., “twentytwenty” instead of “Twenty Twenty”.
Next, you can see the message telling you that your theme has been deleted.
What To Do After Deleting a WordPress Theme?
We hope you have successfully deleted your WordPress theme. It’s a good idea to take a few follow-up steps to ensure everything is working fine.
Here’s what to do:
- Check Links: See if your site’s internal and external links work.
- Check for Styling Issues: It is best to check your site’s pages, posts, menus, and widgets to ensure that everything displays correctly.
- Try Forms: Check if the contact and subscription forms are working smoothly by filling them out.
- Run a Security Scan: Run a quick security scan with any WordPress security plugin to ensure no vulnerabilities remain.
- Reconfigure Widgets and Menus (if needed): Remember, a WordPress theme offers unique widget areas or menu locations. After deleting a theme, ensure your site’s widgets or menus are visible.
- Test Shopping Functionality (If applicable): If you run an online store, ensure your checkout or shopping functionality works properly.
What To Do If You Accidentally Delete a WordPress Theme?
Accidentally deleting a theme can be stressful. But there are a few ways to recover it. Here’s what you can do:
- Restore from Backup: If you’ve recently backed up your WordPress site, you can restore the theme files from that backup.
- Check Your Web Host’s Backup Options: Many hosting providers automatically back up sites. If you don’t have a manual backup for your site, check with your host to see if they can restore it to a previous version.
- Reinstall the Theme: You can reinstall the theme from the WordPress repository.
- Use Revision History for Customizer Settings: WordPress may save some customizer settings as theme modifications. If you reinstall the theme, your customizer settings may reappear.
Bonus: Customize the Login Page with LoginPress
You might also want to use LoginPress to customize the overall look and feel of the default WordPress Login, Register, and Forget form.
This is the best WordPress login page customizer plugin. Use it to customize each element on the default WordPress login page, where you don’t need to code.
Secure Your WordPress Login
Stand out from the competition with the best WordPress login plugin that lets you strengthen your login page – no coding required!
Wait, there’s a lot more packed with LoginPress Pro, including:
Upgrade to LoginPress Pro and strengthen the default WordPress login security.
Delete WordPress Theme (FAQs)
Why should I delete unused themes in WordPress?
Unused themes can take up your site’s server space, slow down your site, and cause security risks. So, deleting unused themes is better, improving site performance and reducing maintenance.
How can I check which WordPress theme is active before deleting it?
You can quickly check if the WordPress theme is activated before deleting it. To do so, go to the left sidebar of the WordPress admin dashboard, navigate to Appearance, and click the Themes option. You can see the Customize button next to the activated theme on the next screen.
How do I delete a theme from the WordPress dashboard?
To delete a theme from the WordPress dashboard, navigate to Appearance and click the Themes option. Next, hover over the theme you want to delete and click Theme Details. In the bottom-right corner, click Delete and confirm the action.
Can I reinstall a deleted theme later?
Yes, you can reinstall any deleted theme by going to the left sidebar of the WordPress admin dashboard, navigating to Appearance, and clicking the Themes option. On the next screen, click the Add New option. Now, search for the theme and click the Install Now button.
Is deleting the default WordPress theme (like Twenty Twenty) safe?
It’s generally safe to delete the default WordPress theme. However, keeping at least one default WordPress theme as a fallback is good practice. If your primary theme has issues, WordPress will revert to this fallback theme to keep your site accessible.
Final Thoughts
To sum up, we’ve shown you four easy ways to help you delete a theme in WordPress. Follow them to delete unused themes to free your server load.
To enjoy a more secure and well-maintained WordPress site, it is recommended that you back up your site, keep checking for compatibility, etc.
That’s all for this article!
Here are the key takeaways:
- Method 1: Deleting a WordPress Theme via the Admin Area
- Method 2: Deleting a WordPress Theme via FTP
- Method 3: Delete the theme via cPanel
- Method 4: Delete the WordPress Theme via WP_CLI
You may also like to read our other valuable how-to guides, including: