Delete Themes in WordPress

4 Easy Ways to Delete Themes in WordPress

Finding the right theme for your website is challenging, and you can easily go through a dozen themes before you find the one that’s right for you. However, you need to delete all those WordPress themes afterward.

Luckily, removing themes in WordPress is pretty easy to do and there are a lot of ways to go about it. Not to mention, there are plenty of good reasons why you should.

Today, I will explain why you need to delete old WordPress themes and four ways you can get rid of them.

Why You Should Delete WordPress Themes Not In Use

You have three options with WordPress themes after installing them. You can leave it as your active theme, deactivate it, or delete the theme entirely.

The best course of action if you are not using the theme is to delete it for the following reasons:

Unused Themes Are A Target For Hackers

Let’s say you have a dozen themes installed on your website. How well do you know each theme to identify any extra files within them? Odds are you probably couldn’t recognize that on the theme you are using let alone extra themes.

Hackers know this and specifically target deactivated themes and plugins on your website. They will insert files that create a backdoor to your site inside of them. And since you don’t interact with them regularly, you will have no idea that these files are there.

Even worse, you might not even update these unused themes. Well, that makes the problem even worse because they then become the weakest part of your website’s security. You see, these updates fix security vulnerabilities.

Thus, not getting them is literally creating a place hackers can exploit to get a foot in your website, to begin with.

Unused Themes Take Up Space

You are going to need a web host to host your website on their servers. Each account has different plans to accommodate websites of all sizes, and one of the key differences between plans is the amount of server space you have available.

That’s right, unused themes take up valuable space on your server. Now, themes are not exactly large, but if you have a bunch of them installed, it can add up quickly. And that can put a strain on the webserver.

Not to mention how each file can take up an inode for your account.

You might even make sacrifices in other parts of your website to try and stay within your plan’s storage limit. Deleting unused elements like themes and plugins should be the first thing you do when space becomes a concern.

Deactivated Themes Can Slow Down Your Database

It’s also worth pointing out that even deactivated themes could slow down your website by clogging up your database. Even if a theme is not in use, it is still stored in your database.

This isn’t just a waste of space, it actually impacts your website’s performance. This, in turn, actually impacts your SEO. How so? Well, the easiest way to think about it is to imagine a filing cabinet.

Even if everything is organized correctly, the more items you add to it, the longer it takes to find what you are looking for. And a database is no different. The extra files it has to load impact your website’s speed.

When Not To Delete Themes in WordPress

While there are a lot of good reasons to delete the themes you are not using, there are also times when you should not delete certain themes. And you should make sure none of these conditions apply to your site before continuing.

Don’t Delete A Parent If You Use A Child Theme

One exception you need to be aware of is to not delete a parent theme. If you do, the child theme you are using will no longer work and can cause an error. It’s a situation best avoided.

For those unaware, a child theme is a sub-theme of the parent. This allows you to store all of your theme customizations in the child theme and allow you to update the parent, without impacting those custom additions.

Why is this a good thing to do?

Well, normally, you will customize your WordPress themes with custom CSS to change the designs of various elements in them. You could also include custom PHP or HTML code for various actions on the site.

However, when you update a theme, all of that disappears. And you would have to go back in and write the code again.

Obviously, this creates a cycle of work that needs to be repeated, not to mention it impacts your live site every time a theme gets an update, which is pretty often.

A child theme avoids this as only the child theme contains the custom code while the parent receives the update. Thus, don’t delete the parent theme if you use a child.

Don’t Delete Themes That Are In Use in A Multisite Network

If your website is connected to a multisite network, you may actually have a lot of themes installed. This is because even if the website you are on now is not using that theme, another website on the network might be.

If you delete that theme, you could take down the website that is using that particular layout. This can be really tricky as your network grows. In some cases, you may have a dozen or two sites connected.

You need to verify what themes are in use and what sites they are on before deleting any theme.

How to Remove A WordPress Theme

There are multiple ways to delete themes in WordPress, and none of them are hard. Most website owners will only use the first method and do it directly from the WordPress dashboard.

However, there are cases when that is not available.

For example, what happens if a theme is causing a critical error and you’re unable to log into WordPress? Well, accessing the dashboard is not an option, thus, you need to have other options on the table.

Luckily, none of these are that complicated.

Thus, I have put together all of the ways you can uninstall a theme in WordPress. Just keep in mind that there are other ways to do it as well.

Method 1: Uninstall A Theme From the WordPress Dashboard

By far, the most common way to get rid of an unused theme in WordPress is to uninstall it from the WordPress dashboard. Unfortunately, WordPress does a good job of actually hiding the delete option in the themes area.

It’s actually only visible if you click on the theme, which is why many beginners may have trouble locating it the first time. That said, it’s pretty easy to do so let’s begin.

On the left-hand admin panel, click on Appearance and select the Themes option.

Te

You’ll now see all of the themes you currently have installed on your website.

Unfortunately, the delete option is not visible on this screen. Instead, you will just see the options to customize, activate, or see a live preview of the theme, depending on if it is already active or not.

You may also see an update option if an update is available.

What you need to do is click on the theme you want to delete.

Click on the Theme

A pop-up will appear that tells you all about the theme you just clicked. In the bottom right corner of this popup, you will see the delete option. Click on it.

Delete themes in WordPress

A small dialogue box will appear at the top of your screen asking if you are sure. Click on the “Ok” button and the theme will be deleted from your WordPress install.

Click OK button to delete WordPress themes

And that’s it. It’s pretty quick and easy to do, but it is a bit hidden if you are new to the platform.

Method 2: Delete the Theme Files in cPanel

If for some reason you have lost access to your website and need to delete a theme, the best and fastest way to do it is to delete the files directly from your website.

While this might sound complicated, it’s actually pretty straightforward and only takes a few minutes.

That said, since you are directly altering the files, I highly recommend creating a backup of your website. In the unlikely event you delete the wrong file, you can use the backup to restore your website to the way it was before.

It’s always better to be safer than sorry.

Step 1: Access the File Manager

First, begin by logging into your web hosting account. Once you are logged in, select the cPanel of the domain name that you wish to begin removing themes from.

Once inside the cPanel, locate the Files section and select the File Manager option.

File Manager

Step 2: Locate the Themes Folder

The File Manager contains all of the files related to your website in an easy-to-navigate format. All of the WordPress themes you have installed on your website are located in the Themes folder, thus we need to get there.

Begin by accessing the public_html directory, then locate the wp-content folder within.

wp-content folder

Once inside, locate the “themes” folder and enter it.

Themes folder

Step 3: Delete the WordPress Themes

Once inside the themes folder, you will see a folder for every theme you have installed. All you need to do is right-click on the theme folder you want to delete and select the Delete option.

Deleting WordPress themes

You can also click the theme folder once and then use the “Delete” option in File Manager.

And that’s it. You can repeat this for every theme you want to delete. It’s a bit more cumbersome than the previous method, but it’s quite useful if you can not access your website.

Method 3: Use the Command Line To Delete the Theme

Another approach you can take from the cPanel is to delete themes using the command line. The command line is far more complex than the previous two methods, and I do not recommend using it if you are not knowledgeable about it.

Entering incorrect commands can seriously mess up your website. That said, you can delete themes through a fairly simple command.

Step 1: Access the Terminal

Log into your web hosting account and access the cPanel. Locate the Advanced section and select the Terminal option.

Terminal

Note: The command line is only available to web hosting accounts that have SSH enabled. If you do not see the Terminal option, you will need to contact your web host to have it allowed.

Step 2: Agree to the Warning

I mentioned earlier that using the command line is dangerous. There is actually a warming message you need to agree to that informs you that entering commands incorrectly can have negative consequences like corrupted or deleted data.

Again, it is not recommended to use this method unless you have the proper knowledge.

If you are sure about continuing with this method, click on the “I Understand and Want to Proceed” button.

I understand

Step 3: Deleting Themes in WordPress Via Commands

There are multiple ways to delete themes using the command line for WordPress. I’ll demonstrate a single way that’s straightforward.

First, you need to enter the directory. To do so, use the command line:

cd public_html
cd wp-content
cd themes

These lines will put you in the themes folder of your WordPress install. After that, you need to enter the command to delete directories:

rm -rf theme-name

Replace the “name” portion of the command with the proper name of the theme. This must be the exact spelling.

The directory and all of its contents will be deleted from your WordPress install. It’s important to double-check the spelling of any commands as misspelling some commands can end up turning into different commands entirely.

This is also important for file names. The names must be the exact spelling or you will get an error, or worse, you might delete a similarly named directory.

Method 4: Use An FTP Client

The last method you can use is an FTP client. If you are not a fan of using the cPanel for some reason, you can use your favorite FTP client to access your website’s files.

The client you use does not matter, but the steps to using it may differ slightly.

For this reason, I will not go into detail about deleting themes via a specific FTP client. Instead, I’ll just explain the process.

for those unaware, an FTP accounts give website owners the ability to directly access their website’s files from their desktop. The main advantage is quick access to the files.

Normally, you would need to log into the cPanel every time you want to make a change. Instead, an FTP just requires a one-time setup and you are good to go.

So what’s the actual process?

All you actually need to do is connect your web hosting account with the FTP client you wish to use. Then open up the FTP client and locate the wp-content folder. Once inside, locate and enter the themes folder.

Finally, you will see that every theme you have installed in WordPress is similar to the cPanel method above. All you need to do is select the theme folder you want to delete, right-click it, and select the Delete option.

FAQ

While you now know how to delete a theme in WordPress, you may still have some lingering questions. Here are a few of the most asked questions you may still have after deleting your theme:

Should I Have Any Deactivated Themes On My Website?

So, you may still be wondering if it is alright to have a deactivated theme or two on your website. And for the most part, that is fine as long as you still update them regularly.

For instance, many websites keep the default Twenty Twenty-Two theme installed from WordPress.

One reason you may want to keep a theme or two installed is for testing purposes. Sometimes things can break on your website and the theme you have installed can be to blame.

One of the fastest ways to confirm this is to switch themes and see if the error is still occurring.

The default theme is one of the best options to use for this test. If you switch to it and the error is gone, then something in your theme is causing the problem. If not, then the theme is not to blame and you can safely switch back.

However, as we have discussed, you really shouldn’t have any extra themes installed past this.

Will Deleting A Theme Delete All of the Content It Adds?

Not always.

Many themes come bundled with extra plugins and templates that you can utilize. And sometimes these files are not isolated to that theme’s directory. In these cases, you may have to manually delete a plugin, widget, or locate the proper files for templates.

One of the things you absolutely should be on the lookout for is unused images themes leave behind. Many themes include custom icons or stock images for their theme that end up in your media library.

Images can take up a lot of space, so it’s important to delete the images these themes leave behind. Although, to be fair, it is a good policy, in general, to delete all unused images as they can slow down your website and take up space.

The good news is that themes provide documentation that often includes the exact steps you need to take when uninstalling the theme. Always refer to the official documentation and potentially any support channels they offer.

Can My Web Host Help Delete A Theme?

If you are having a lot of trouble deleting a theme, you can contact your web host for additional support.

Depending on the support they offer, they will either provide documentation that can help you delete a theme, or walk you through the process over support channels.

Some may even be able to delete it for you, but this really depends on the hosting policies.

However, I would recommend doing this after you have exhausted the support options for the theme in question. Aside from theme documentation, most themes offer support options, especially premium ones, that you can use to get help.

Also, never forget about Google. The truth is that if you are having trouble doing something, you are probably not the only one. There is probably a forum post somewhere with the details you are looking for.

Don’t Wait, Delete Your Extra WordPress Themes Today

As you can see, there are multiple ways to uninstall a theme in WordPress. None of them are particularly hard, which allows you to reap the benefits without having to do much work.

Regardless of if it is themes, plugins, or anything else, you should only keep what you absolutely need on your website. Leaving tools and elements you don’t use can slow down your site and waste the resources for which you are paying.

The best practice is to always delete anything you are not using. If you need it later, you can simply reinstall it.

How many WordPress themes do you keep installed on your website? Which method did you find the easiest?