Announcing Duplicator WP-CLI Commands (And How They Speed Up Backups)
Announcing Duplicator WP-CLI Commands (And How They Speed Up Backups)
WordPress has thousands of themes, so it’s natural to want to try a few out. After you find the right one, how do you delete all of the other installed themes?
Before deleting a WordPress theme, you won’t know how this change will affect your website. You may be worried about losing content, breaking your site, or not being able to recover important data if something goes wrong.
In this tutorial, I’ll show you a few safe ways to delete a theme in WordPress!
Over time, your WordPress site can become increasingly cluttered with unused themes.
Having too many themes installed can slow down your WordPress website. Each theme comes with its own set of files and resources, which can add unnecessary bloat and impact your website’s performance.
But that’s not the only problem.
If a theme is outdated or has known vulnerabilities, hackers could exploit these weaknesses to gain access to your site. You certainly don’t want to put your site and your users’ data at risk.
Here are some other problems that unused themes can cause:
Deactivating themes won’t solve these problems. By uninstalling or deleting old themes, you can improve your site’s security, performance, and overall functionality. Plus, a clutter-free admin dashboard will make managing your site a breeze.
When you delete a theme, all of its files and settings are removed from your WordPress installation. This means that any customizations specific to that theme will be lost.
If you delete your active theme, your site will automatically revert to the default WordPress theme. It’s usually the latest version of the “Twenty Twenty” theme.
Deleting a theme does not remove any of the content you’ve created on your WordPress site. Your posts, pages, and media files are stored separately from your themes, so they will remain intact even after a theme is deleted.
However, you might’ve used theme-specific shortcodes or custom post types. In this case, deleting the theme may affect how that content is displayed.
For example, if you’ve used a theme’s custom portfolio post type to showcase your work, deleting the theme will not erase those portfolio entries. But without the theme’s styling and templates, they may not appear as intended on your site.
A few of the methods in this tutorial involve editing your site’s files. If you don’t take some precautions, you could lose more than one inactive theme.
Before deleting a theme, create a complete backup of your WordPress site. This backup will allow you to restore your site to its previous state if anything goes wrong.
We recommend using Duplicator for this task. Duplicator is a powerful and user-friendly plugin that simplifies the backup process, ensuring you can quickly and easily restore your site if needed.
Using Duplicator, create a new backup. Make sure to select the Full Site preset.
Just in case your entire site goes down, consider sending the backup to the cloud. Duplicator supports all of these third-party services:
If you decide to save your backup on your local server, be sure to set up disaster recovery. This way, you can get your site back up and running even after a devastating error.
With your backup in place, you’re ready to delete a WordPress theme!
Now that you’ve backed up your site, it’s time to learn how to delete WordPress themes.
I found four different methods, each for a specific use case or experience level. Let’s explore each method in detail!
The most straightforward way to delete a theme is through your WordPress dashboard. This is the most beginner-friendly option.
Log in to your WordPress admin area and navigate to Appearance » Themes.
Locate the theme you want to delete and click on it.
In the theme details, click on the Delete button.
A pop-up will ask if you really want to delete the theme. Hit OK to finish the process.
If you’re comfortable working with an FTP (File Transfer Protocol) client, you can delete a theme by connecting to your WordPress site’s server and removing the theme’s folder.
First, download an FTP client like FileZilla. Use your WordPress hosting account’s FTP credentials to connect your site.
You’ll see your site’s files in the Remote site box. Here, go to public_html and then wp-content. Open your themes directory.
Find the folder with the theme name you want to delete. Right-click on it and delete it.
Many web hosting providers offer a built-in file manager that you can use to delete themes. This is usually cPanel, but it could be a custom file manager as well.
This process is very similar to the FTP method. Open your file manager and navigate to the /wp-content/themes/ directory
Select the theme you want to delete, right-click on it, and hit Delete.
Use the pop-up to confirm the deletion.
At some point, you might need to move your entire website to a new host, server, or domain name. If you haven’t cleaned up your data in a while, this can be the perfect time.
Duplicator is a migration plugin that backs up your site’s data and moves it to a new location. During this process, you can use it to remove unused themes!
The first part of a migration involves backing up your original site. When you create a backup with Duplicator, select the Custom preset.
Check the box next to Themes and Only Active Themes. Duplicator will remove any inactive themes from the backup
To continue cleaning up your site, feel free to remove inactive WordPress plugins too.
Once you set up your site on the new server, you’ll notice that it doesn’t have any inactive themes! It’s an easy way to delete themes without doing it yourself.
There are a few important steps you should take after deleting a theme to ensure that your site is clean and functioning properly.
If the deleted theme had custom images or other media files, they might still be in your WordPress media library. Go through your media library and delete any files that are no longer needed.
If you had any widgets activated for the deleted theme, they might still be present in your Appearance » Widgets area. Remove any inactive or unnecessary widgets to keep your site clean.
Some themes store information in your database. We’d recommend cleaning up your database with a plugin like WP-Optimize.
After cleaning up any leftover data, you might want to test your current theme’s functionality to ensure that everything is working as expected.
As you edited your WordPress themes, you might’ve accidentally deleted the wrong one. This is when your backup will come in handy.
If you set up disaster recovery, Duplicator gave you a recovery link. Paste this link into a new browser window to kickstart the recovery wizard.
You can follow these steps to roll back your site.
Duplicator also has Restore buttons next to each of your backups. Visit the Backups page, find a backup with the deleted theme, and hit Restore.
This is why creating regular backups is so important. It protects your site from simple mistakes, as well as hacking attempts and server failures.
To remove a theme name from WordPress, you can use a plugin like Hide My WP Ghost. This tool can change your theme’s name, URL, and style.css name. Some manual options include changing the theme folder name or editing the style.css file.
You won’t be able to delete a currently active theme in your WordPress dashboard. You’ll need to activate another theme before deleting the one you want to remove.
In some cases, incorrect file permissions can prevent you from deleting a theme. Check your theme files’ permissions and adjust them if needed.
Yes, you can delete the default WordPress themes. However, it’s generally recommended to keep at least one default theme installed as a fallback in case something goes wrong with your active theme.
Yes, it’s a good practice to remove unused WordPress themes from your site. Unused themes can pose security risks, especially if they are outdated or have known vulnerabilities. Having too many unused themes can also slow down your site.
However, you shouldn’t delete the parent theme of your active child theme. If you delete it, the child theme will break.
You should also keep at least one default theme as a backup. If you ever delete your theme, WordPress will automatically activate this default theme.
If you have a WordPress multisite network, don’t delete themes that are active on other sub-sites.
You’ve just deleted a WordPress theme!
While you’re here, I think you’ll like these extra WordPress tutorials:
You might consider deleting a WordPress theme because of catastrophic errors. To instantly roll back your site (and keep your theme) download Duplicator Pro today!
Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. We only recommend products that we believe will add value to our readers.