Skip to content

Delete a WordPress theme

  1. Choose the intended servers and sites. Start with one installation.
  2. Open Choose action → Bulk tools → Themes → Delete theme by slug.
  3. Enter Installed theme slug. Activate a replacement first if the target theme is in use.

Delete theme by slug form with Installed theme slug and target sections

Check the installed theme slug and selected targets before reviewing deletion. Select the image to view it full size; use your browser’s Back command to return.
  1. Review the action and targets, then confirm. Read every site’s final result, including skips. Finished can include failed sites; see Read the outcome.

Check every site’s result and retain custom-theme files outside the site before removal.

As root on the server hosting the sites, review /var/log/cpfenceav/wp-sites-list.txt first. CLI deletion uses the listed installations, not the rows checked in the WebUI. Activate a replacement where needed and preserve custom-theme files before deleting anything.

For an interactive deletion, run:

Terminal window
cpfence --bulk-delete-wp-theme twentytwenty

Replace twentytwenty with the exact installed slug, check the inventory prompt and confirm only the intended deletion. Read each site’s final output rather than assuming every theme was removed.

For a reviewed automation job, the original non-interactive method remains available:

Terminal window
cpfence --bulk-delete-wp-theme-auto twentytwenty

This skips confirmation and deletes the theme’s files on eligible listed sites. Check the slug, list and recovery copy beforehand. If the wrong theme was removed, recover it from the saved copy; reactivation alone cannot recreate its deleted custom files.