What is the delete_themes permission in WordPress?
The delete_themes permission allows users to remove themes from a WordPress site.
- 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.
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.
- Check the box “delete themes”.
- Click “Save Changes”.