Table of Contents
What is the delete_themes permission in WordPress? #
The delete_themes permission allows users to remove themes from a WordPress site.
However, this permission can not be used unless you also have the edit_theme_options and switch_themes permissions.
If you have the delete_themes, edit_theme_options and switch_themes permissions, you will see these links in the WordPress admin area:
- Go to “Appearance”, then “Themes”.
- On this screen, you can choose choose any theme that is not currently in use. In the image below, I can choose “Twenty Nineteen” or “Twenty Seventeen”.
- After clicking on a theme that is not in use, you will see this red “Delete” link. If you click this link and then the “OK” button, you will completely remove this theme from your site.
Who has the delete_themes permission? #
The delete_themes permission is available on single WordPress sites and on multisite networks.
By default, the delete_themes permission is only given to Super Admins and Administrators.
Users not in these roles are not allowed to delete the site's theme files.
How to control who has the delete_themes permission #
You can control who has the delete_themes permission by installing the PublishPress Capabilities plugin.
- After installing PublishPress Capabilities, go to “Capabilities” in your WordPress admin menu.
- Using the dropdown in the top-left corner, choose the role you want to edit.
- Go to the “Themes” tab.
- Check the box “delete themes”.
- Click “Save Changes”.