Guide

Inactive WordPress plugins and themes: why deactivated isn't removed

Inactive WordPress plugins and themes look harmless: they're switched off, so they can't do anything. That isn't how WordPress works. Deactivating a plugin stops WordPress from loading it on each page, but its files stay in wp-content/plugins, where a browser can still request them. An installed theme you never activated still has its PHP on the server, and WordPress can load it when it previews that theme. WordPress's own Site Health screen calls inactive plugins "tempting targets for attackers". This guide explains why, which inactive code you should keep, how to delete the rest without losing data, and how to keep the list from growing back.

Deactivated isn't removed

WordPress has two separate steps. Deactivate stops a plugin from running as part of your site. Delete removes its folder from the server. The Plugin Handbook is explicit that a plugin only counts as uninstalled when someone deactivates it and then clicks Delete — until then, its code is still there.

Still there matters because plugin files are ordinary PHP files under your site's address. WordPress asks plugin authors to stop a file from running when it's requested directly, by checking that ABSPATH is defined (best practices), but that guidance covers only files with code outside functions and classes, and not every plugin follows it. A file that answers a direct request runs whether or not the plugin is active. On its own that's not a vulnerability. It becomes one when that file has a flaw — and an inactive plugin is exactly the one nobody updates.

That's the real cost: inactive code drops out of everyone's attention. It doesn't show up on the pages you look at, so its update badge gets ignored, and when its developer stops maintaining it, nobody notices. A known vulnerability in a plugin you switched off two years ago is still a known vulnerability on your server.

An inactive theme can still run

Themes are more direct. When you preview a theme — Appearance → Themes → "Live Preview" — WordPress loads that theme's code so you can see the site with it, without activating it. That's how previews work, and it means an installed theme is PHP that can run on your site even if it's never been switched on.

Click2Shell, fixed in WordPress 7.1.1 on 17 September 2026, used exactly that. A crafted link, opened by a signed-in administrator, made WordPress install a theme from the official directory and open its Customizer preview. The theme stayed inactive and the site looked unchanged, but code in it ran — and a flaw in that code gave the attacker a way to run their own. pwn.ai's write-up notes that an inactive theme is not necessarily dormant, and its proof of concept says a flawed theme already on the site would do as well as one the attack installs.

Updating WordPress closes that particular route. It doesn't change the rule underneath: every theme in wp-content/themes is code WordPress may load, and its flaws are your flaws.

How to tell what's inactive on your site

Plugins: in wp-admin, open Plugins and click "Inactive" in the filter links above the list. Active plugins are shown in bold; everything under Inactive is installed but switched off.

Themes: open Appearance → Themes. The active theme is first, marked "Active"; every other card is an installed, inactive theme. If your active theme is a child theme, its parent is listed as a separate theme and looks inactive — it isn't, because the child theme loads it.

Site Health (Tools → Site Health) reports both. "You should remove inactive plugins" and "You should remove inactive themes" appear as recommended improvements, and the theme test names what to keep: your active theme, its parent if it's a child theme, and one default WordPress theme.

What to keep

The active theme, and its parent if it's a child theme. Deleting the parent breaks the site: the child theme can't load without it.

One default theme — the newest Twenty-something you have, such as Twenty Twenty-Five. If the active theme's files go missing, WordPress falls back to the default theme, and Site Health warns when none is installed ("Have a default theme available"). One is enough; older Twenty themes can go.

A plugin you've switched off for a few days to track down a problem. That's what deactivate is for. Set yourself a date: if it's still off after a week, decide whether you need it.

Everything else — the plugin you tried once, the page builder from before the redesign, the three themes that came with the hosting account — is code to maintain for no benefit.

How to delete them safely

Back up first. Deleting is permanent: WordPress removes the folder and keeps no copy.

Know what Delete does to data. When you delete a plugin, WordPress runs its uninstall routine, and a well-written plugin uses it to remove its own settings and database tables (uninstall methods). For a plugin you don't want back, that's what you want. For one you might reinstall — a forms plugin with old entries, a shop extension with order data — export what you need before you delete it.

Plugins: Plugins → "Inactive" → "Delete" under each plugin's name, or tick several and choose "Delete" from "Bulk actions". A plugin has to be deactivated before WordPress offers Delete.

Themes: Appearance → Themes → click the theme → "Theme Details" → "Delete" in the bottom corner. WordPress doesn't offer Delete on the active theme.

Then reload the front page and a few key pages — the shop, the contact form — to confirm nothing depended on what you removed. On a multisite network, plugins and themes are managed in Network Admin, and something inactive on one site may be active on another, so check there before deleting.

Keep it from coming back

Try new plugins on a staging copy, not the live site. Most hosts offer one-click staging; what you test there never needs cleaning up on production.

Delete what you replace. When a new plugin takes over a job — a new SEO plugin, a new cache — delete the old one the same day, after its data is migrated, instead of leaving it deactivated "just in case".

Look at Plugins → "Inactive" and Appearance → Themes on a schedule: whenever you do updates, or monthly as part of WordPress maintenance. Fewer plugins also means fewer updates and fewer known vulnerabilities to track. The other half of the same exposure is who can trigger code like this: the fewer administrators, the fewer sessions an attack like Click2Shell can ride (WordPress user roles).

How Relvato catches it

Relvato's Vulnerability monitor reads the site's installed plugins and themes through the Relvato WordPress plugin, active and inactive. When some are inactive, the run carries a warning that names them: one for inactive plugins and one for inactive themes. The theme warning leaves out your active theme, its parent if you use a child theme, and the newest default theme when you don't use one, and says to keep that one as the fallback. Relvato's own plugin is never listed.

The same monitor checks installed plugins and themes against known-vulnerability feeds, inactive ones included, so a flaw in a plugin you switched off still shows up as a vulnerability, not just as clutter.

Relvato doesn't delete anything for you: deleting can't be undone, and a plugin's uninstall routine may take its data with it. The warning says where to do it. If an inactive plugin is there on purpose, press "Ignore this warning".

On the Free plan you press Run whenever you want to check, or schedule it weekly. Pro re-runs your monitors by itself after every update.

Inactive plugins and themes: keep or delete

WhatKeep or deleteWhy
The active themeKeepIt's your site
The parent of your active child themeKeepThe child theme loads it; looks inactive but isn't
The newest default theme (Twenty Twenty-Five or similar)Keep oneWordPress falls back to it if the active theme goes missing
Older default themesDeleteOne fallback is enough
Other inactive themesDeleteTheir PHP can still be loaded in a preview
A plugin switched off to troubleshootKeep, brieflyDecide within a week
Plugins you tried or replacedDelete (export data first if needed)Files stay reachable and stop getting updates

Questions, answered

Are inactive WordPress plugins a security risk?

They can be. Deactivating a plugin stops WordPress from loading it, but its files stay on the server and some can still be requested directly. If one of those files has a flaw, it can be exploited whether the plugin is active or not — and inactive plugins are the ones that stop getting updated. WordPress's Site Health recommends removing them.

Does deleting a plugin delete its data?

Often, yes. Deleting runs the plugin's uninstall routine, which a well-written plugin uses to remove its settings and database tables. Deactivating doesn't. If you might want the data, export it first; then delete.

Can I delete the parent theme of my child theme?

No. A child theme loads its parent, so deleting the parent breaks the site, even though Appearance → Themes shows it as not active. Keep both.

Should I keep a default WordPress theme?

Keep one: the newest default theme you have. WordPress falls back to it if your active theme goes missing, and Site Health warns when none is installed. Older default themes can go.

Is it enough to update inactive plugins instead of deleting them?

It closes known flaws, but only as long as someone keeps doing it, and it doesn't help when a plugin's developer stops releasing fixes. Code you don't use is cheaper to delete than to maintain.

Sources

Related reading
Guide

Know what's installed, not only what's active.

Relvato's Vulnerability monitor reads the installed plugins and themes through the WordPress plugin, lists the inactive ones, and checks them against known vulnerabilities.