Using WordPress ‘delete_theme()’ PHP function Written by Adrian Gordon WordPress The `delete_theme()` function in WordPress removes a theme by its stylesheet name, with an option for redirection