Say you've just changed a WordPress theme, and want to delete the old one. In this article, we'll take a look at how to properly delete a WordPress Theme.
Deleting an unused WordPress theme is incredibly important for 2 main reasons: security and storage.
Themes are the easiest way for hackers to get access to your site. Exploits are publicly announced almost daily for WordPress themes. The good news is that typically developers are told beforehand and implement a security fix
. This comes in the form of an update that fixes the exploit.
However if you don't update a theme, even if it's disabled, the hacker can make use of the exploit because it wasn't patched. Deleting themes altogether minimizes the risk that you'll get hacked.
Themes are also pretty big and can really eat away at your storage space. After media, they're typically the largest collection of files on a WordPress sites.
Deleting the theme removes the files from your host, freeing up storage space.
Deleting a WordPress Theme will not remove content from a website like pages or posts as themes simply offer templates for content to populate. However, if you're using a builder that is installed as a theme, like Divi or Bricks, things might break.
Additionally, overall styling will be removed if you disable a theme.
If you have a child theme, do not delete the parent theme, even if it's disabled.
Finally, we suggest leaving the most recent default theme, like Twenty Twenty Two for testing or fallback purposes. Just make sure it gets updated!
Now that we know why you may want to delete a WordPress theme, let's look at how to actually do it.
You have a few options when it comes to removing a WordPress theme. Each of them fulfills the same purpose, removing team files from your server
This is probably the easiest and most user-friendly method.
In your WP admin dashboard, on the left menu, go to appearance -> themes
.
Then, click on the theme that you want to remove.
It needs to be deactivated.
On the popup, click "delete" in the lower right corner.
Confirm the operation, and the theme will be deleted from your WordPress website.
It's pretty easy to delete a WordPress Theme using FTP. First, connect to your host using a client like CyberDuck or Filezilla.
Then, navigate from root -> wp-content -> uploads -> themes.
Then, simply delete the folder containing your theme:
You can delete a WordPress theme using the WordPress Command Line Interface by using the following command:
If you use the WP-CLI for development, this is probably the quickest and easiest method.
We hope that this article help you in removing and deleting your WordPress theme. This is definitely something that every website owner should know how to do because it helps with both security and storage. If you have any questions or comments, feel free to leave them down below.