Site icon WPMarmite

How to delete a WordPress theme

Supprimer un thème WordPress

Too ugly. Too old. Too few options. Too infrequently updated. In short, too tired of it. Too many different reasons can make you want to delete a WordPress theme.

This theme that had seemed attractive to you for a while. This theme that you can’t look in the eye anymore, as you look at it on your screen.

You get it, we don’t want you anymore.

Do you want to do yourself some good and get rid of him? There’s nothing wrong with that, as long as you know how to do it the right way.

By the end of this article, you’ll know the detailed, step-by-step process for three methods. In the process, you’ll get a whole bunch of tips on how to do it like a pro. Because there’s no such thing as too much advice. 😉

Your best WordPress projects need the best host!

WPMarmite recommends Bluehost: great performance, great support. All you need for a great start.

Why delete a WordPress theme?

While deleting a WordPress theme is not a decision to be taken lightly, there are several reasons why you might want to take the step:

As a reminder, a WordPress theme theme is a set of template files and style sheets used to define the look and feel of a site’s content. Basically, a theme controls the design of your pages.
Using WordPress without a theme is impossible, since it’s the templates that allow data to be displayed on a visitor’s screen. That’s why a native theme is always enabled by default when you install the CMS (Content Management System) on your hosting server.

What’s the difference between removing and deactivating a WordPress theme?

Before moving on, it’s important to understand the difference between deactivating and deleting a WordPress theme.

By default, you must enable a theme on your WordPress site. This means that you can have multiple themes installed without all of them being activated.

In this case, they are deactivated but still installed on your site. You will continue to receive their updates:

On the above screenshot, we can see that three themes are installed on my site:

Finally, when you delete a theme — which is the same as uninstalling it — you delete all its files and the associated configuration.

However, don’t panic: the content of your site (posts, pages, and media) will be preserved when you delete the theme! On the other hand, some plugins and blocks (i.e. widgets) installed with the theme may disappear.

What are the benefits of removing a WordPress theme?

Strengthen security

Keeping an inactive theme on your site is usually safe, unless it’s no longer updated.

In this case, hackers can take advantage of certain vulnerabilities to inject malicious scripts and infect your site.

It’s important to know that when a theme is no longer updated, its developer no longer corrects the security flaws that may be detected. Hence, there is a higher risk of encountering problems. At this point, removing a WordPress theme becomes essential.

Furthermore, the more themes you have installed on your site, the more likely you are to encounter security problems.

Finally, by deleting themes you no longer use, you will no longer have to worry about updating them. Indeed, even if a theme is inactive, it continues to receive updates that you must perform as soon as possible if you don’t want to compromise the security of your WordPress installation.

Removing a WordPress theme can help improve performance

The second major benefit of removing a WordPress theme has to do with the performance of your site. Getting rid of themes you don’t use will help you:

Recommendations before removing a WordPress theme

Okay, just a little more patience before we get down to business. To do things professionally and avoid errors and other crashes, make sure you follow the recommendations below before deleting a WordPress theme.

Make sure you’re not using a child theme

To begin with, make sure you are not using a child theme. A child theme is a theme that is attached to your main theme, called the parent theme.

It inherits all the features, design, and layouts of the parent theme and can be customized without touching the parent theme. Basically it’s a way to modify a WordPress theme without altering it and to be able to make updates without worrying.

To know if a child theme is active on your site, go to Appearance > Themes and click on your active theme. If the note “This is a child theme of…” isn’t displayed, you’re good.

If, as in the above capture, you are using a child theme, then don’t delete its parent theme! If you do, your child theme will no longer work and you may encounter errors on the screen.

Save your site

In a second step, I recommend you to create a backup of your site (files + database). For this, you have several options:

With your backup in your pocket, you can easily restore your site if your theme deletion goes wrong.

WP Umbrella : Manage all your WordPress websites under one dashboard

Update your themes and plugins, monitor and backup your WordPress sites effortlessly. 

Run some tests

To cover yourself even more, a good tip is to first remove a WordPress theme on a test environment.

If something goes wrong, you don’t take any risks because the changes don’t take place in production (online).

In order to set up a test site, you can either:

If you don’t want to use a test environment, I recommend that you temporarily activate a maintenance page on your site. Several plugins allow you to create one easily, as explained in this comparison.

Keep your pieces of code

Finally, think about recovering any pieces of code added in the functions.php file of the theme you want to delete.

If you want to use them on a new theme, paste them in its functions.php file.

And if you have manually integrated a tracking code to follow the traffic of your site (e.g. via Google Analytics), integrate it to your new theme.

Do you manage a multisite network? Consider removing your WordPress theme from all the sites in the network if you are a super-admin. If you are only an administrator, you will not be able to delete the theme.

After all these precautions, it’s time to jump in. Let’s take a look at several ways to delete your WordPress theme.

3 ways to remove a WordPress theme

Method 1: From the WordPress administration interface

The easiest and fastest way to remove a WordPress theme is through your dashboard (admin interface).

Go to Appearance > Themes to see the list of themes installed on your site:

Above, you can see that the active theme is Twenty Twenty-Three. Remember: an active theme cannot be deleted. If you want to remove Twenty Twenty-Three, you will have to activate another theme first.

To delete a theme, hover your mouse over the one you want to delete and click on it (the message “Theme details” will be highlighted):

In the highlighted window that just opened, click on the “Delete” button, at the bottom right:

WordPress will ask you if you want to delete the theme. Click “OK” to complete the process.

Method 2: Deleting a WordPress Theme with an FTP Client

In some cases, you won’t be able to delete a WordPress theme from your dashboard because you don’t have access to it for a while, for example.

This can be the case if you have lost your login credentials, if you have just suffered a hack, or if there’s a bug after an update.

An alternative solution is to use an FTP (File Transfer Protocol) client. This is software that allows you to communicate with your server and send or delete files and folders online.

Among the most famous and efficient are:

Here is the procedure in 3 steps.

Step 1: Connect to FTP

To connect to FTP, you need the following information:

These three pieces of information can be found in the welcome email sent by your hosting company.

Enter them in the menu below:

Step 2: Locate the directory containing your themes

Once connected, double-click on the root of your site. Depending on the host, this directory has a different name. For example, it is called www at OVH.

Now, follow this path to access the list of your themes installed on your site: wp-content/themes.

Inside this folder, you have one directory per theme:

Step 3: Delete the WordPress theme of your choice

To finish, delete the theme of your choice by clicking on its directory to select it. Then right-click and choose “Delete.”

By default, the FTP client doesn’t tell you which theme is active. You must therefore make sure beforehand which theme (notably its precise name) you wish to delete.

Filezilla will ask you to confirm your choice. Click OK and you’re done.

Join the WPMarmite subscribers

Get the last WPMarmite posts (and also exclusive resources).

Method 3: Deleting a theme with cPanel

What if your administration interface is still inaccessible but you’re not comfortable with an FTP client?

There is a third way to remove your WordPress theme. It consists in going through the administration interface of your host. One of the most famous of these is called cPanel, which is why I’ll explain how to use it below.

Log in to your cPanel using the credentials contained in the welcome email sent by your host.

In the “Files” section, click on “File Manager”:

Then follow the same path as indicated in the FTP method. Go to the root of your site (e.g. public_html) then go to wp-content/themes/.

Click on the theme you want to delete and right click. Then click on “Delete” and confirm the operation:

Congratulations, you have just deleted a WordPress theme.

It is also possible to delete a WordPress theme using the the WP-CLI command line interface. This method is technical and is primarily intended for developers and experienced users.

What to check after deleting a WordPress theme

Once your theme has been removed, you still have a little work to do to ensure that everything has been done properly.

To begin with, delete the elements related to the theme you just deleted. These can be:

Also remember to perform the following checks

Then, apply the following advice:

Want to go one step further and remove an entire WordPress site (not just its theme)? Check out our article on the subject to find out how to do it.

Summary: deleted, delivered

In these lines, you have learned how to delete a WordPress theme using three methods:

Getting rid of an unused theme is a good practice to improve your site’s security and loading speed (which is always a good thing to improve the user experience).

If you’re planning to do this at home, please share your feedback and tips with us. Maybe you even have another method to share with WPMarmite readers.

Tell us about it by posting a comment!

Exit mobile version