How to Delete a WordPress Theme the Right Way

Chưa được phân loại

It’s commonplace to swap out themes in the WordPress dashboard. Sometimes you’re completing an overhaul on your website, and other times developers are testing themes periodically. However, simply installing another theme to replace the current one isn’t the best practice. You should actually completely delete the previous theme. In this article, we’ll talk about how to delete a WordPress theme to improve both speed and security on your website.

That’s right, leaving an old theme in your site files could open up your website to security vulnerabilities. The theme files are also taking up space on the server, causing potential clutter issues.

In this guide, we’ll explore the best options for how to delete a WordPress theme, along with tips for situations when you shouldn’t delete a theme.

Why you should completely delete unused WordPress themes

The reasons for getting rid of a WordPress theme vary, but the most common include the following:

  • You’ve found that the default theme installed with WordPress is not useful, so you’d like to remove it.
  • You tried out a WordPress theme but eventually decided that it’s not what you want.
  • Your brand is looking for an overhaul and would like to get rid of an old theme in favor of a newer one.

Luckily, learning how to delete a WordPress theme is the same process for all of the reasons above!

The benefits of deleting unused WordPress themes

If you’re thinking that a random inactive theme isn’t causing any harm, you may be right. But at the same time, there could be small inconveniences occurring that are easily rectifiable by deleting the theme.

Here are the reasons to let go of that theme:

  • Better database performance – All data from an inactive theme is still stored in your database. It’s probably not going to ruin your database performance, but clunkier themes could have an effect.
  • More server spaceYour hosting account carries the weight of all files stored on the server. So, deleting a theme would clear up space and improve performance.
  • Improved performance – The main performance issue you’ll have with inactive themes is on the dashboard. This is because of theme updates. Automatic update queries are sent to all active and inactive themes, so having 5 to 20 inactive themes could have an effect.
  • Theme updates – You free up time for yourself when learning how to delete a WordPress theme. Why? Because you don’t have to keep up with updates.
  • Overall site security – If an inactive WordPress theme doesn’t get updated, you leave your site open for hackers.

When you shouldn’t delete a WordPress theme

There are some instances when deleting a WordPress theme is not advised.

Some of the times when you shouldn’t delete a theme include when…

Other than these situations, it’s always a better idea to delete the theme.

The difference between deactivating and deleting a WordPress theme

You’d think that deactivating and deleting a theme would mean the same thing, right?

Unfortunately, that’s not the case. And it can cause some confusion and disadvantages considering many people don’t know the difference.

So, what’s the difference between deactivating a WordPress theme and deleting one?

Deactivating a WordPress theme

A theme is deactivated, whenever you decide to activate another theme on your WordPress site. There’s no need to deactivate the previous theme. It’s all done by replacing it with another theme.

How to Delete a WordPress Theme - an inactive theme

The reason for this is because you can only have one theme running on your site at all times.

Therefore, the site files from that deactivated theme still reside on your server. This also includes settings, widgets, and menus created for that theme.

This is done just in case you plan on reactivating that theme at some point. WordPress wants to ensure you don’t lose any of your old theme settings or files.

Deleting a WordPress theme

A full deletion of a WordPress theme means that every file, setting, menu, and widget is removed from your WordPress site.

Therefore, you don’t have to worry about the files causing performance or security issues.

How to delete a WordPress theme properly

Once you decide that a theme is of no use to you, it’s not a parent theme, and it’s not on a multisite network, it’s time to delete it entirely.

Before you delete a WordPress theme…

Walk through these steps to ensure that you don’t cause any damage to your site during the deletion process:

  1. Backup your site – Sometimes problems occur when deleting elements from a website. Do yourself a favor and make a backup just in case.
  2. Test the deletion on a staging site (Optional) – Make a copy of your WordPress site to a staging site. Then, delete the theme from the staging site to see if any problems occur. You don’t have to do this one, but it can give you the confidence that deleting a theme isn’t going to break anything.
  3. One last check – Run a final check to see if the theme is connected to any child themes or multisite networks.

And finally, here’s how to delete a WordPress theme:

1. Find the theme in the dashboard

Navigate to your WordPress dashboard. Go to Appearance > Themes.

Access your themes area

Scroll through all of the themes you have on your WordPress site, both active and inactive.

all themes

2. Select the theme to delete

Locate the theme you would like to delete. Keep in mind that you can always come back and delete some of the other ones.

Click on the theme.

3. Delete the theme

Clicking on the theme reveals all of the theme details, such as a preview of it, description, and options to preview, activate and delete.

How to Delete a WordPress Theme

Find the Delete button on the right side. Click on that to get rid of the theme.

4. Delete content that was attached to that theme

Even though the theme is now gone you still have a few things to take care of.

Some theme-related content is still on your server, and that’s just taking space. This content includes:

  • Images
  • Menus
  • Dummy content like posts from the developer
  • Widgets

These are all most likely inactive, but here’s how you delete them completely:

Images

Go to the Media Library and manually delete all images you only used for that theme.

How to delete WordPress theme image attachments

Menus

All themes have different menu locations. So, you may have to either reassign where menus are located or delete them if not being used.

How to delete unused theme menus

This is done by going to Appearance > Menus.

Dummy content

If the previous theme has dummy content like posts, pages, or even custom posts types, you must go through all of those manually to delete them if you want. You could also leave them to use on the new theme.

Widgets

If a widget was only being used for that theme, it gets placed in the Inactive Widgets section.

How to clear inactive widgets

Go to Appearance > Widgets, then click the Clear Inactive Widgets button.

That’s how to delete a WordPress theme!

Learning how to delete a WordPress theme the right way is essential for clearing space on the server and keeping your site secure.

Of course, there’s a lot more to WordPress performance and security than just deleting your theme.

So once you’ve cleared out your inactive themes, it’s time to upgrade your knowledge on those topics even further. To that end, check out our guides to WordPress security and how to speed up WordPress.

Still have any questions about how to delete a WordPress theme completely? Leave a comment below and we’ll try to help.

Free guide

5 Essential Tips to Speed Up
Your WordPress Site

Reduce your loading time by even 50-80%
just by following simple tips.

Bài viết liên quan

Trả lời

Email của bạn sẽ không được hiển thị công khai.