If you think your site needs a fresh look or seems outdated, it will seem necessary that you should replace your existing theme with a newer one. Knowing how to delete a wordpress theme is crucial in your site´s management.
Deleting outdated or unused themes should be an important step in optimizing your site´s management. Unused themes can take up a lot of space in the backend of your site which could affect your site in a negative way.
But don´t be fooled, there are some themes that you shouldn´t delete. Why? we´ll have a look later on
Reasons to uninstall a wordpress theme
As you´ve read earlier, having a unused theme can affect negatively in a lot of your site´s aspects like:
Outdated themes can affect the loading speed of the admin dashboard. Also when wordpress checks for updates, it also looks at the outdated themes which wastes even more time.
In addition, the extra space that the outdated theme uses influences the loading speeds of your users, which affects negatively to your SEO rankings
WordPress themes are a common vulnerability in the community. Hackers take advantage of faulty code in some of the themes to introduce malware, backdoors or any type of malicious software into your site.
This security issue is multiplied if you have unused and outdated themes. Theme updates usually have security patches which reduce the probability of an attack. But if you´re not using the themes instead of wasting storage space with updates just go ahead and delete the themes altogether.
Obviously, unused themes keep using up space in your site´s database. Which as we´ve seen earlier can cause a lot of performance issues.
Also having this non-useful space means that you´ll have more files to handle when creating backups, moving between hosts or scanning your site for security or SEO reasons
Do I have to keep unused WordPress themes?
The majority of unused themes are useless and should be removed but there are some you must keep deactivated. Here are a list:
- If you use a child theme (a theme that inherits certain look and function from another, parent theme). In this case it is recommended that you maintain the parent theme deactivated but installed on your site.
- If you want to maintain a theme as backup. Having only a few themes on your site is harmless and won´t cause any issues
- If you´re testing multiple themes
How to delete a wordpress theme
Now that you know when you should delete wordpress themes, here´s a couple of ways of deleting them
1) Through the dashboard
- Login to your wordpress site as admin
- In the dashboard, select Appearance > Themes. It will show all the themes you have installed on your site.
- Click Theme details on the theme you want to delete. Have in mind that you can’t delete your current active theme. If you want to delete your current theme, you will have to previously select another on.
- On the window that appears after selecting the theme details, press delete on the bottom right corner
This action will automatically delete the theme from your site and server. If you accidentally deleted the wrong theme, just reinstall it from the themes directory or re-upload your backup.
2) Via FTP
In case you don´t have admin access, you can directly delete the theme on the server through File Transfer Protocol FTP. Here´s how to do it:
- Connect to FTP
- Open the wp-content folder, then the themes folder
- Find the theme you want to delete on the themes folder
- Right click the theme you want to delete, and press delete
3) Via WP command line
If you prefer managing your site through the command line, you can also delete the themes through different commands:
First go to the command line and open the theme list:
$ wp theme list
If you only want to see inactive themes, use this command:
$ wp theme list --status=inactive
Finally, use this command to delete the theme. Note that you have to enter the name of the folder not the theme name:
$ wp theme delete uselesstheme
Have in mind that you must be very careful when writing commands in the command line. A small mistake could mean that you delete the wrong file or misplace them to another folder, so keep that in mind.
We hope this article was useful, if you want to read more about hosting or tech related articles, be sure to check out the rest of the Obambu Guide.