How to delete a WordPress theme

Selecting a theme for your WordPress website is always fun. You download a number of themes and activate one after another to see how your site looks — just like trying on clothes in a fitting room. However, once you have made a decision on which theme you like the best, it is time to discard the other ones.

In this blog post, we are going to cover the difference between deactivating a theme and deleting it, as well as how to remove a WordPress theme.

Deleting vs. Deactivating a WordPress Theme

Before we plunge into the details, it is crucial to distinguish the difference between deleting and deactivating a theme. To deactivate a theme means to change your active theme to another theme. The deactivated theme is not currently used, however, its files can still be found on your server. You will see this theme on the Themes page in your wp-admin area and it will have an “Activate” button on it.

To delete a theme means to remove its files completely from the server. After it has been done, you can no longer see it among other themes in the wp-admin area.

Reasons to Delete a WordPress Theme

It is a valid question to ask, “Why delete a theme from my WordPress site if I am not using it?”

The most important reason one would delete themes is for security. Keeping a lot of unneeded files opens ways for hackers to attack your site and infect it with malicious software. The more files you store, the higher the chance that a hackers’ attack will be successful. In order to mitigate this threat and make your website secure, it is highly recommended to get rid of any unused files.

Even though deactivated themes are not used, they will still be pending updates. If you do not have any solution implemented for automating this process, this will create an opportunity for a hacker to target your site. Also, update notifications can be annoying too.

Uninstalling a theme will also free up space on your server. This is especially important if you are running low on your disk space, or if your hosting provider charges you based on usage.

A small bonus for deleting themes from WordPress is improved wp-admin loading speed. Each time you log in to wp-admin, the system generates a list of all the themes that can be found within your WordPress installation. The fewer themes there are to load, the faster the information will be served to you. While it will not affect the speed for your site visitors, it will make posting a bit easier.

Reasons Not to Delete a WordPress Theme

While removing themes from WordPress is considered the best practice in the industry, there are a couple of situations where themes should be kept intact.

The first one is the utilization of WordPress Multisite. In such setups, one theme can be used for all the sites across the network. Therefore, deleting the theme will break these sites. It is possible to use different themes for each site in Multisite, but be sure to check if deleting a theme will not affect other sites in the network.

Another reason not to delete WordPress themes is if you are using parent and child themes. Child themes use files from parent themes so lack of certain files will stop the child theme from functioning properly.

What to Do Before Deleting the Theme

As deleting files may cause unexpected consequences, it is always good to have some safeguards in place to prevent any potential downtime.

  • Backups — The simplest way to restore your site to its original state if something goes wrong is through a backup. Be it a local backup made using SFTP or a backup originated from a plugin, any will do if you are able to use it in case something actually goes south.
  • Staging Environment — This is a great option to choose if your WordPress hosting plan offers this feature. A WordPress staging site allows you to copy your production site to an isolated environment and test out any changes before applying them to the production. In our case, you can copy the live site and try deleting the themes one by one to see if it does not break anything. After you verify it is safe to remove the theme files, go ahead and do the same on the real site.

Since you cannot be too safe with your data, combining these two methods can be the best solution.

Different Ways to Delete a WordPress Theme

There are a few easy ways to delete themes from WordPress. Keep on reading to learn how to remove a theme from your WordPress installation.

How to Remove Themes From WordPress Using the wp-admin Dashboard

1. First, you need to access your wp-admin area. By default, it can be done by adding “/wp-admin” to your site’s URL.

wp-admin login

2. After you have logged in, navigate to Appearance -> Themes on the left-side menu.

3. There you will see the list of all the themes installed in your WordPress.

Themes installed on your WordPress website

Your active theme always takes the first position, so here we are after those that come next.

4. Click on the theme you would like to uninstall. This will open the theme's details.

Open the WordPress theme's details to delete it

5. In the bottom left corner of the theme’s details, you will see a button “Delete”. As soon as you click on it, the system will ask for your confirmation.

Press delete to delete your WordPress theme

After you have deleted the theme, it will no longer be seen on the list and all the associated files will be removed as well.

How to Delete a WordPress Theme Using SFTP

SFTP stands for Secure File Transfer Protocol, and it is used for interacting with files and directories between two remote machines. This method can come in handy if you are locked out of your wp-admin area for some reason.

1. First, install SFTP client, if you have not yet. Most of them have very similar interfaces so if you have any experience with file browsing software like Total Commander you should be fine. The most widely used and trusted SFTP software is FileZilla, WinSCP, and CyberDuck.

2. Obtain credentials to log into SFTP server. In most cases, you should be able to find them within your server panel with the hosting company. If not, the support staff should be able to share it with you. The bits of information you would need are Hostname (or Server name), Username, Password, and Port. The default port for SFTP is 22, so you can use it if not specified otherwise.

It should look similar to the image below before you click on “Quickconnect.”

Click on "quickconnect"

3. Once you logged into the SFTP server, you need to find the directory containing themes. Normally they can be found in /public_html/wp-content/themes/. Each theme has its own directory.

Find the directory containing themes

4. At this point, it is recommended to double-check your active theme in the wp-admin area. Unless you have a backup of your active theme, it would be almost impossible to restore it if you accidentally delete it. The famous “Ctrl + Z” will not help in this case.

Also, check if you are using parent and child themes. When cleaning up your inactive themes, you may find your parent theme in this list. Even though it is not active, you should not be deleting it as it will break your site.

After you have verified the themes that need to be removed, right-click on them and select the “Delete” option.

Delete WordPress theme in SFTP server

Repeat step 4 until all the unneeded themes are gone. Even though it is possible to delete them in bulk by selecting several themes, you should exercise extreme caution when deleting data.

After that, you can check if these themes are no longer listed in the wp-admin area. When you have only one theme left, its details will be automatically opened once you navigate to Appearance -> Themes.

How to Delete Themes from WordPress Using cPanel File Manager

The method is very similar to the one above, as the cPanel File Manager has almost the same interface as most SFTP clients.

1. a. Log into your WHM account. Some hosting providers have an auto-login button in the server panels. If there is not one, the support staff can share the credentials for it.

b. If you have access to your cPanel account only, proceed to step 3

Log into your WHM account

2. Once you are in WHM, go to the “List Accounts” section and locate the domain name in question.

This will bring you to the cPanel account of this domain.

3. Navigate to the directory containing your themes. This can be done by opening the File Manager in the Files section and double-clicking on the needed directories. Alternatively, you can use the file explorer menu on the left. The full path should be: /home/cPanelAccount/public_html/wp-content/themes

4. Right-click on the theme you would like to remove and click “Delete.”

Click delete to delete your WordPress theme

As you can see in the image above, this WordPress installation utilizes a child theme. In this case, themes named “Divi” and “Divi-child” should not be deleted. “Divi-old” is used as a backup for the parent theme.

Many control panels, like Plesk or InterWorx, have the File Manager feature implemented, so it is possible to use the instructions above for them as well.

How to Delete Themes from WordPress Using WP-CLI

WP-CLI stands for WordPress Command Line Interface. Many hosting companies offer it to their advanced users to manage their websites. This is not recommended if you have no experience with console commands. Still, if you want to try, these commands are ready to use once you open the WP-CLI console.

1. List all the installed themes by using the following command

wp theme list

wp theme list command

If you need to list inactive themes specifically, you can add a parameter --status=inactive. The full command is the following:

wp theme list --status=inactive

wp theme list --status=inactive command

2. Run the following command to delete a theme:

wp theme delete themename

Delete WordPress theme command

Adding the parameter --all will delete all the inactive themes:

wp theme delete --all

Delete all WordPress themes command

After I ran all these commands, I got this output for the listing command:

output for the listing command

This method is great when you have a stockpile of inactive themes and do not have access to SFTP, wp-admin, or the control panel.

What to Do After Deleting a WordPress Theme

In some cases, themes come with preloaded media and features. To secure your website, it is best to clean up anything that is associated with the deleted themes. Things to look for:

  • Menus — removed via Appearance -> Menus
  • Widgets — removed via Appearance -> Widgets
  • Images — removed via Media -> Library
  • Posts — removed via Posts -> All Posts

After that has been done, clear the browser and WordPress cache and verify your website works as usual.

Consider Hosting With Nexcess

Managing a WordPress site can be tedious at times. Allow our support team to handle it for you with our Fully Managed WordPress plans.

No matter what method you choose to uninstall a WordPress theme, our technicians will always be by your side to assist you or do it for you. Backed with top-notch speed, security, and performance, our Managed WordPress plans are a great solution for any WordPress user.

Try fully managed WordPress hosting from Nexcess.

Andrew Reynolds
Andrew Reynolds

Andrew is a Solutions Consultant for the Liquid Web Family of Brands, helping prospects choose the best solution. He is a technology enthusiast and is always looking for ways to expand his knowledge in different areas. Andrew has a passion for languages — both programming and human.

We use cookies to understand how you interact with our site, to personalize and streamline your experience, and to tailor advertising. By continuing to use our site, you accept our use of cookies and accept our Privacy Policy.