Skip to content

Instantly share code, notes, and snippets.

@BriceShatzer
Last active October 16, 2025 18:52
Show Gist options
  • Save BriceShatzer/8ec218e660498056f93325b56f51f15d to your computer and use it in GitHub Desktop.
Save BriceShatzer/8ec218e660498056f93325b56f51f15d to your computer and use it in GitHub Desktop.
Shortcode Cleanup nots

Plugins

  • Shortcodes Finder

    • general "shortcode utility"
    • positive reviews from ~4000 installs
    • last updated 4 months ago
    • mentioned in article
  • Clean unused shortcodes ⭐️ probably this? ⭐️

    • purpose built
    • last updated 10 months ago
    • positive reviews from ~100 installs
    • indicates that it's probably doing it's cleanup at DB level:
      Works extremely well. 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!).
  • Remove Orphan Shortcodes

    • Mostly postive reviews on ~1000 installs
    • negative reviews mention removing still in use codes, also has issues w/ gutenberg?
    • some of the reviews make it confusing as to what it is actually doing (hiding vs removing)
  • Remove Empty Shortcodes

    • Keeps shortcodes in the content, but hides them from rendering on the fly
    • Good if the plugins/themes/etc that use them may be reactivated in the future
    • last updated 6 months ago
  • Shortcode Cleaner - closed March 6, 2025 for security reasons

DB manipulation

Manually remove them from the DB w/ sql - Article, would have to
UPDATE wp_post SET post_content = replace(post_content, ‘[shortcode]’, ” ) ;
I would probably build a array of all shortcodes to remove & then loop through them? or something like that?


chatgpt's suggestion:

🚀 Recommended path for most migrations:

  1. Temporarily install WPBakery (or a “Visual Composer Compatibility” plugin) to view the original page content.
  2. Export content (using the built-in Tools → Export).
  3. Create a staging site with the new theme.
  4. Manually rebuild key pages in blocks while batch-removing [vc_*] shortcodes from minor posts using a script or plugin.
  5. Remove WPBakery once all key content is clean.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment