Title: Clean unused shortcodes
Author: Amr Abdelkarem
Published: <strong>September 6, 2022</strong>
Last modified: May 21, 2026

---

Search plugins

![](https://ps.w.org/clean-unused-shortcodes/assets/banner-772x250.png?rev=2780409)

![](https://ps.w.org/clean-unused-shortcodes/assets/icon-256x256.png?rev=2780409)

# Clean unused shortcodes

 By [Amr Abdelkarem](https://profiles.wordpress.org/amrelarabi/)

[Download](https://downloads.wordpress.org/plugin/clean-unused-shortcodes.2.1.0.zip)

 * [Details](https://pirate.wordpress.org/plugins/clean-unused-shortcodes/#description)
 * [Reviews](https://pirate.wordpress.org/plugins/clean-unused-shortcodes/#reviews)
 *  [Installation](https://pirate.wordpress.org/plugins/clean-unused-shortcodes/#installation)
 * [Development](https://pirate.wordpress.org/plugins/clean-unused-shortcodes/#developers)

 [Support](https://wordpress.org/support/plugin/clean-unused-shortcodes/)

## Description

**Clean unused shortcodes** helps you find and remove shortcode tags left behind
by old plugins, themes, or page builders — without hunting through posts one by 
one.

The tool lives under **Tools  Clean unused shortcodes**. Choose which public post
types to scan, review the results, preview changes, then clean individual shortcodes
or run a bulk cleanup.

#### Highlights

 * **Scan by post type** — posts, pages, and other public types (media/attachments
   excluded).
 * **Three result tabs** — unused (unregistered) shortcodes, used (registered and
   found), and registered but unused.
 * **Content and excerpts** — scans both fields and shows where each shortcode appears.
 * **Batched operations** — scan and clean large sites in chunks with a progress
   bar and cancel option.
 * **Incremental scan** — optionally rescan only posts modified since the last run.
 * **Dry-run preview** — see before/after snippets per post before saving.
 * **Protected shortcodes** — allowlist tags you never want removed (e.g. `caption`,`
   embed`).
 * **Skip on clean all** — exclude specific shortcodes from bulk cleanup.
 * **Gutenberg-aware** — removes empty `wp:shortcode` blocks after the inner shortcode
   is stripped.
 * **Hyphenated names** — detects shortcodes like `[my-slider]` as well as `[gallery]`.

#### Who is this for?

 * Sites that deactivated plugins but still have `[shortcode]` tags in content.
 * Editors who want a clear list of where each tag appears before deleting.
 * Administrators cleaning up legacy content on staging before going live.

Always **back up your database** (or test on staging) before running bulk clean 
operations.

## Screenshots

[⌊Tools screen with post type selection, scan progress, and results tabs.⌉⌊Tools
screen with post type selection, scan progress, and results tabs.⌉[

Tools screen with post type selection, scan progress, and results tabs.

[⌊Unused shortcodes table with locations, skip option, preview, and clean actions.⌉⌊
Unused shortcodes table with locations, skip option, preview, and clean actions.⌉[

Unused shortcodes table with locations, skip option, preview, and clean actions.

[⌊Dry-run preview modal showing before and after content.⌉⌊Dry-run preview modal
showing before and after content.⌉[

Dry-run preview modal showing before and after content.

## Installation

 1. Install the plugin through **Plugins  Add New** in WordPress, or upload the `clean-
    unused-shortcodes` folder to `/wp-content/plugins/`.
 2. Activate **Clean unused shortcodes** through the **Plugins** screen.
 3. Go to **Tools  Clean unused shortcodes**.
 4. (Optional) Set **Protected shortcodes** — one name per line.
 5. Select post types, click **Scan shortcodes**, then preview or clean as needed.

## FAQ

### What is an “unused” shortcode?

A shortcode tag found in your scanned content that is **not** currently registered
in WordPress (not in the global `$shortcode_tags` list) and is not on your protected
list.

### Will this remove active plugin shortcodes?

No. Registered shortcodes are listed under **Used** or **Registered but unused**
and are not removed by the clean actions. Only unregistered (orphaned) tags in the**
Unused** tab are removed.

### Does it work with the block editor?

Yes. Shortcodes inside the **Shortcode** block (`wp:shortcode`) are scanned. After
cleaning, empty block wrappers are removed so you do not get blank Shortcode blocks
in the editor.

### Can I undo a clean?

There is no built-in undo. Use a backup or revision restore if you need to roll 
back. Use **Preview** before cleaning to review changes.

### Does it scan custom post types?

Yes. All public post types are available in the selector (attachments are excluded).

## Reviews

![](https://secure.gravatar.com/avatar/64a1f8547c740e483410fef98309bb3a43e12658d09c03ad2aeda2112e30b1af?
s=60&d=retro&r=g)

### 󠀁[Did what it said it would](https://wordpress.org/support/topic/did-what-it-say/)󠁿

 [icreation](https://profiles.wordpress.org/icreation/) January 8, 2026 1 reply

I had some old code from Bakery Builder, and it was all over my site. This plugin
got rid of it in seconds. Well done.

![](https://secure.gravatar.com/avatar/9902e094e94b00e4eb7783253562028f3bce9407aae65bee3a0738189bb55251?
s=60&d=retro&r=g)

### 󠀁[Works Perfectly](https://wordpress.org/support/topic/works-perfectly-2865/)󠁿

 [Ally Drez](https://profiles.wordpress.org/relp01/) June 26, 2025 1 reply

Installed, Activated, Ran "Clean up unused shortcodes" and voila. The site had no
more shortcode residue from Divi theme. THANK YOU!

![](https://secure.gravatar.com/avatar/7660e5104ac5a14e87ce834a193cc58f597ce0cff4b2ee5b741b6d0b84db7e35?
s=60&d=retro&r=g)

### 󠀁[Works extremely well](https://wordpress.org/support/topic/works-extremely-well-12/)󠁿

 [transit54](https://profiles.wordpress.org/transit54/) June 22, 2025 1 reply

I imported posts from a client site which previously used Divi, so they were littered
with Divi shortcodes. I tried a few Divi shortcode cleaner plugins while they removed
some of the shortcodes, there were will many remaining. This plugin worked quickly
to remove all of remaining ones – I'd highly recommend it for this purpose (just
remember to backup your database before you attempt anything like this!).

![](https://secure.gravatar.com/avatar/b366889cd846213d38b977f63dd60b6af7e9ed5b067a024a76fe0865155ef9db?
s=60&d=retro&r=g)

### 󠀁[Works like a charme W/ Gutenberg](https://wordpress.org/support/topic/works-like-a-charme-w-gutenberg/)󠁿

 [Yumigo](https://profiles.wordpress.org/yumigo/) May 15, 2025 1 reply

Does what it says. After migrating a 200 pages/posts site from a wpbakery page builder
to another framework, I had plenty of all [vcrow] etc. This plugin cleaned my contents
in seconds. Underrated plugin, thank you so much ! Saves a lot of time and efforts

![](https://secure.gravatar.com/avatar/2eb21425a27886141b28bc4d73fffd5bc28193aab0c68ac0e40fe250dc86ee69?
s=60&d=retro&r=g)

### 󠀁[Worked great!](https://wordpress.org/support/topic/worked-great-287/)󠁿

 [gordonium](https://profiles.wordpress.org/gordonium/) May 7, 2025 1 reply

Simple plugin that worked quickly and did exactly what we needed. Will use again!

![](https://secure.gravatar.com/avatar/a299cf0eda34ddb3cfee009b60dcecf4dcdfe1662bdc29c08c27bc2c51343bfe?
s=60&d=retro&r=g)

### 󠀁[It worked perfectly for me](https://wordpress.org/support/topic/it-worked-perfectly-for-me-3/)󠁿

 [freelancesgroup](https://profiles.wordpress.org/freelancesgroup/) April 21, 2025
1 reply

It is installed and with a single click it cleans the entire shortcode.

 [ Read all 7 reviews ](https://wordpress.org/support/plugin/clean-unused-shortcodes/reviews/)

## Contributors & Developers

“Clean unused shortcodes” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ Amr Abdelkarem ](https://profiles.wordpress.org/amrelarabi/)

[Translate “Clean unused shortcodes” into your language.](https://translate.wordpress.org/projects/wp-plugins/clean-unused-shortcodes)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/clean-unused-shortcodes/),
check out the [SVN repository](https://plugins.svn.wordpress.org/clean-unused-shortcodes/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/clean-unused-shortcodes/)
by [RSS](https://plugins.trac.wordpress.org/log/clean-unused-shortcodes/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 2.1.0

 * Rebuilt admin tools UI (reliable vanilla JS; no React dependency on the tools
   screen).
 * Post type multiselect — scan posts, pages, and other public types.
 * **Batched scan and clean** with progress bar and cancel for large sites.
 * **Incremental scan** — optionally rescan only posts changed since the last run.
 * **Dry-run preview** with per-post before/after snippets (content and excerpt).
 * **Protected shortcodes** allowlist and per-shortcode **skip on clean all**.
 * Result tabs: unused, used, and **registered but unused**.
 * Scan **excerpts**; show whether each hit is in content or excerpt.
 * Detect **hyphenated** shortcode names (e.g. `my-slider`).
 * Remove empty Gutenberg **Shortcode** (`wp:shortcode`) blocks after cleaning.
 * Improved security (capability checks, nonces; no unauthenticated AJAX).

#### 2.0.1

 * Update author name.
 * Tested with WordPress 6.9.4.

#### 2.0.0

 * Complete plugin rewrite using React for the admin UI.
 * Preview unused and used shortcodes; location list with edit/view links.
 * Clean All for unused shortcodes.

#### 1.0.4

 * Updated admin UI.
 * Fixed white screen on the tools page.

#### 1.0.3

 * Tested with WordPress 6.1.1.

#### 1.0.2

 * Updated plugin description.

#### 1.0.1

 * Updated donate link.

#### 1.0.0

 * First release.

## Meta

 *  Version **2.1.0**
 *  Last updated **5 months ago**
 *  Active installations **300+**
 *  WordPress version ** 5.8 or higher **
 *  Tested up to **7.0.7**
 *  PHP version ** 7.4 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/clean-unused-shortcodes/)
 * Tags
 * [admin](https://pirate.wordpress.org/plugins/tags/admin/)[clean](https://pirate.wordpress.org/plugins/tags/clean/)
   [shortcode](https://pirate.wordpress.org/plugins/tags/shortcode/)[tools](https://pirate.wordpress.org/plugins/tags/tools/)
   [ui](https://pirate.wordpress.org/plugins/tags/ui/)
 *  [Advanced View](https://pirate.wordpress.org/plugins/clean-unused-shortcodes/advanced/)

## Ratings

 4.4 out of 5 stars.

 *  [  6 5-star reviews     ](https://wordpress.org/support/plugin/clean-unused-shortcodes/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/clean-unused-shortcodes/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/clean-unused-shortcodes/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/clean-unused-shortcodes/reviews/?filter=2)
 *  [  1 1-star review     ](https://wordpress.org/support/plugin/clean-unused-shortcodes/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/clean-unused-shortcodes/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/clean-unused-shortcodes/reviews/)

## Contributors

 *   [ Amr Abdelkarem ](https://profiles.wordpress.org/amrelarabi/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/clean-unused-shortcodes/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://www.paypal.com/paypalme/amrelarabi)