The same scanner and fixes are available from the terminal. Every command needs an active license.
What You’ll Learn
- Scanning and checking
- Previewing a fix
- Fixing and undoing
- Backups and the ignore list
Scanning and Checking
Run wp bsfx scan to scan the site. Add –fail-on=any to end with exit code 1 when something dead is found, which stops a deployment, or –fail-on=shortcode, block or delimiter for one kind. wp bsfx stats shows the counts, wp bsfx list the names, and wp bsfx posts –name=old_widget the posts that use one. Add –format=json for scripts.
Previewing a Fix
wp bsfx fix –tag=old_widget –action=strip –dry-run shows how many posts would change and saves nothing. Add –diff to see the change of each post, and –limit to show more posts.
Fixing and Undoing
Without –dry-run the same command changes the posts. It needs –user=admin (an administrator) and asks first, unless you add –yes. Actions for shortcodes: strip, strip_all and replace with –replacement=<shortcode>. For blocks add –kind=block: convert_html, convert_paragraph and remove. –all fixes every name, or every name that matches –search. When it finishes it prints the number of the fix, and wp bsfx undo 12 –user=admin puts the posts back.
Backups and the Ignore List
wp bsfx backups list shows the fixes that can be undone, and wp bsfx backups delete removes them. wp bsfx ignore list, add and remove manage the ignore list.
This is available in Broken Shortcode Fixer Pro.

