Title: Clean unused shortcodes
Author: Amr Abdelkarem
Published: <strong>6 Tháng 9, 2022</strong>
Last modified: 21 Tháng 5, 2026

---

Tìm kiếm plugin

![](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

 Bởi [Amr Abdelkarem](https://profiles.wordpress.org/amrelarabi/)

[Tải về](https://downloads.wordpress.org/plugin/clean-unused-shortcodes.2.1.0.zip)

 * [Chi tiết](https://vi.wordpress.org/plugins/clean-unused-shortcodes/#description)
 * [Đánh giá](https://vi.wordpress.org/plugins/clean-unused-shortcodes/#reviews)
 *  [Cài đặt](https://vi.wordpress.org/plugins/clean-unused-shortcodes/#installation)
 * [Nhà phát triển](https://vi.wordpress.org/plugins/clean-unused-shortcodes/#developers)

 [Hỗ trợ](https://wordpress.org/support/plugin/clean-unused-shortcodes/)

## Mô tả

**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.

## Ảnh màn hình

[⌊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.

## Cài đặt

 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.

## Hỏi đáp

### 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).

## Đánh giá

![](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/) 8 Tháng 1, 2026 1 trả lời

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/) 26 Tháng 6, 2025 1 trả lời

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/) 22 Tháng 6, 2025 1 trả lời

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/) 15 Tháng 5, 2025 1 trả lời

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/) 7 Tháng 5, 2025 1 trả lời

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/) 21 Tháng 4, 
2025 1 trả lời

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

 [ Đọc tất cả 7 đánh giá ](https://wordpress.org/support/plugin/clean-unused-shortcodes/reviews/)

## Người đóng góp & Lập trình viên

“Clean unused shortcodes” là mã nguồn mở. Những người sau đã đóng góp vào plugin
này.

Những người đóng góp

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

[Dịch “Clean unused shortcodes” sang ngôn ngữ của bạn.](https://translate.wordpress.org/projects/wp-plugins/clean-unused-shortcodes)

### Muốn tham gia phát triển?

[Duyệt code](https://plugins.trac.wordpress.org/browser/clean-unused-shortcodes/),
check out [SVN repository](https://plugins.svn.wordpress.org/clean-unused-shortcodes/),
hoặc theo dõi [nhật ký phát triển](https://plugins.trac.wordpress.org/log/clean-unused-shortcodes/)
qua [RSS](https://plugins.trac.wordpress.org/log/clean-unused-shortcodes/?limit=100&mode=stop_on_copy&format=rss).

## Nhật ký thay đổi

#### 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

 *  Phiên bản **2.1.0**
 *  Cập nhật lần cuối **5 tháng trước**
 *  Số lượt cài đặt **300+**
 *  Phiên bản WordPress ** 5.8 hoặc cao hơn **
 *  Đã kiểm tra lên đến **7.0.7**
 *  Phiên bản PHP ** 7.4 hoặc cao hơn **
 *  Ngôn ngữ
 * [English (US)](https://wordpress.org/plugins/clean-unused-shortcodes/)
 * Thẻ
 * [admin](https://vi.wordpress.org/plugins/tags/admin/)[clean](https://vi.wordpress.org/plugins/tags/clean/)
   [shortcode](https://vi.wordpress.org/plugins/tags/shortcode/)[tools](https://vi.wordpress.org/plugins/tags/tools/)
   [ui](https://vi.wordpress.org/plugins/tags/ui/)
 *  [Nâng cao](https://vi.wordpress.org/plugins/clean-unused-shortcodes/advanced/)

## Đánh giá

 4.4 trên 5 sao.

 *  [  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)

[Xem tất cả đánh giá](https://wordpress.org/support/plugin/clean-unused-shortcodes/reviews/)

## Những người đóng góp

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

## Hỗ trợ

Có điều gì muốn nói? cần giúp đỡ?

 [Xem diễn đàn hỗ trợ](https://wordpress.org/support/plugin/clean-unused-shortcodes/)

## Ủng hộ

Bạn có muốn hỗ trợ vào sự phát triển của plugin này?

 [ Ủng hộ plugin này ](https://www.paypal.com/paypalme/amrelarabi)