Title: Remove Empty Shortcodes
Author: Tom McFarlin
Published: <strong>2025 年 3 月 24 日</strong>
Last modified: 2026 年 2 月 6 日

---

搜索插件

![](https://ps.w.org/remove-empty-shortcodes/assets/banner-772x250.png?rev=3455510)

![](https://ps.w.org/remove-empty-shortcodes/assets/icon-256x256.png?rev=3455510)

# Remove Empty Shortcodes

 作者：[Tom McFarlin](https://profiles.wordpress.org/tommcfarlin/)

[下载](https://downloads.wordpress.org/plugin/remove-empty-shortcodes.1.0.0.zip)

 * [详情](https://cn.wordpress.org/plugins/remove-empty-shortcodes/#description)
 * [评价](https://cn.wordpress.org/plugins/remove-empty-shortcodes/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/remove-empty-shortcodes/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/remove-empty-shortcodes/#developers)

 [支持](https://wordpress.org/support/plugin/remove-empty-shortcodes/)

## 描述

Remove Empty Shortcodes helps maintain clean content by removing shortcodes that
no longer work or generate output. This commonly happens when:

 * You’ve deactivated a plugin that provided shortcodes
 * You’re trying different plugins and some left behind inactive shortcodes
 * You have shortcodes from plugins that weren’t properly uninstalled

#### Key Features

 * Automatically removes inactive shortcodes from displayed content
 * Preserves your original content in the database
 * Works with all public post types
 * Handles both self-closing and wrapped shortcodes
 * Admin scanner to find and review unregistered shortcodes
 * On-demand scanning with cached results
 * Ignore specific shortcodes you want to keep
 * Zero configuration required for automatic removal

#### How It Works

The plugin checks your content for shortcodes when pages are displayed. If it finds
shortcodes that:
 * Don’t produce any output * Aren’t registered with WordPress *
Are empty or inactive

It removes them from the displayed content while keeping your original content intact
in the database.

#### Use Cases

 * Clean up content after removing plugins that used shortcodes
 * Remove inactive shortcodes without editing posts manually
 * Maintain clean content for readers and search engines
 * Preserve original content in case you reinstall removed plugins

## 屏幕截图

 * [[
 * Scanner ready to scan your content for unregistered shortcodes
 * [[
 * Scan results showing unregistered shortcodes found across your site
 * [[
 * Expanded view showing context preview and edit options for each shortcode
 * [[
 * By Post view showing all affected posts with their shortcodes

## 安装

 1. Upload `remove-empty-shortcodes` to your `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. That’s it! No configuration needed

## 常见问题

### Will this modify my database content?

No. The plugin only filters content when it’s displayed. Your original content remains
unchanged in the database.

### What happens if I reinstall a plugin that uses the removed shortcodes?

Since your original content is preserved, the shortcodes will start working again
automatically when you reinstall the plugin that handles them.

### Does this work with all shortcodes?

Yes, the plugin works with any WordPress shortcode, whether from themes or plugins.

### Will this affect shortcodes that are working correctly?

No. The plugin only removes shortcodes that are either unregistered or produce no
output.

### Is there any configuration needed?

No. The plugin works automatically once activated.

### How do I find unregistered shortcodes on my site?

Go to Tools > Empty Shortcodes in your WordPress admin. Click “Run Scan” to search
all your content for shortcodes that are no longer registered with WordPress.

### What does “Ignore” do in the scanner?

Ignoring a shortcode adds it to a global ignore list. The scanner will no longer
flag that shortcode, and the automatic removal feature will leave it untouched. 
Use this for shortcodes you intentionally want to keep.

## 评价

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

### 󠀁[Seems to work](https://wordpress.org/support/topic/seems-to-work-65/)󠁿

 [CMG](https://profiles.wordpress.org/seraphyn/) 2025 年 3 月 27 日 1 回复

Would be great to have an option to delete them from the database , too Of course
with a backup before. This will make an export to Markdownblog much easier

 [ 阅读所有1条评价 ](https://wordpress.org/support/plugin/remove-empty-shortcodes/reviews/)

## 贡献者及开发者

「Remove Empty Shortcodes」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Tom McFarlin ](https://profiles.wordpress.org/tommcfarlin/)

[帮助将「Remove Empty Shortcodes」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/remove-empty-shortcodes)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/remove-empty-shortcodes/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/remove-empty-shortcodes/)，或通过
[RSS](https://plugins.trac.wordpress.org/log/remove-empty-shortcodes/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/remove-empty-shortcodes/)。

## 更新日志

#### 1.0.0

 * Admin page under Tools menu for scanning and managing unregistered shortcodes
 * On-demand scanning with progress indicator and cached results
 * Two view modes: By Shortcode and By Post
 * Context preview showing surrounding text for each shortcode
 * Global ignore list for shortcodes you want to keep
 * Support for all public post types
 * Fixed false positive shortcode detection
 * New abstract blue branding
 * Restructured plugin with class-based architecture

#### 0.7.0

 * Update support for WordPress 6.8

#### 0.6.0

 * Added support for multi-line shortcode detection
 * Added a banner and icon for the WP plugin repository
 * Improved handling of unregistered shortcodes
 * Updated shortcode pattern matching
 * Removed Composer dependencies
 * Enhanced performance and reliability

#### 0.5.0

 * Added latest version of PHPStan
 * Fixed page content processing
 * Updated namespace structure

#### 0.4.0

 * Added page post type support
 * Fixed subscriber content handling

#### 0.3.0

 * Initial public release
 * Added standard post type support
 * Improved shortcode detection

## 额外信息

 *  版本 **1.0.0**
 *  最后更新：**4 月前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 5.0 或更高版本 **
 *  已测试的最高版本为 **6.9.4**
 *  PHP 版本 ** 7.4 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/remove-empty-shortcodes/)
 * 标签
 * [cleanup](https://cn.wordpress.org/plugins/tags/cleanup/)[content](https://cn.wordpress.org/plugins/tags/content/)
   [content management](https://cn.wordpress.org/plugins/tags/content-management/)
   [maintenance](https://cn.wordpress.org/plugins/tags/maintenance/)[shortcodes](https://cn.wordpress.org/plugins/tags/shortcodes/)
 *  [高级视图](https://cn.wordpress.org/plugins/remove-empty-shortcodes/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  1 条 5 星评价     ](https://wordpress.org/support/plugin/remove-empty-shortcodes/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/remove-empty-shortcodes/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/remove-empty-shortcodes/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/remove-empty-shortcodes/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/remove-empty-shortcodes/reviews/?filter=1)

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

[查看全部评论](https://wordpress.org/support/plugin/remove-empty-shortcodes/reviews/)

## 贡献者

 *   [ Tom McFarlin ](https://profiles.wordpress.org/tommcfarlin/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/remove-empty-shortcodes/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](https://buymeacoffee.com/tommcfarlin)