Using the WP-CLI Commands

Broken Link Fixer Advanced Last updated: October 5, 2026

Developers and agencies often want link checks in a script, a cron job, or a deployment pipeline. Broken Link Fixer Pro adds a wp blfx command that runs the same engine as the Results page. This guide covers the commands and the safe way to use them.

What You’ll Learn

  • How to scan and fail a deployment on broken links
  • How to list and count links in different formats
  • How to fix, unlink, and dismiss from the terminal
  • How to manage redirects and the 404 monitor

Before You Start

Every command needs an active license. Commands that change content also need an administrator, so add --user=<login>. Add --help to any command for all its options.

Scan

wp blfx scan scans the site in the terminal, with a progress bar. Add --fail-on=broken and the command ends with exit code 1 when it finds broken links, so a pipeline stops. Use warning to count warnings too (including soft 404 and mixed content), redirect for any issue, or none (the default) to never fail. --format=json prints the summary as JSON. A scan will not start while a background scan is running.

Look

  • wp blfx list --status=broken lists links, with --type, --fields, --per-page, --page, and --format=table, csv, json, ids, or count
  • wp blfx stats shows the counts and the last scan
  • wp blfx history shows the finished scans

Fix

  • wp blfx fix --status=redirect --dry-run shows what would change, and without --dry-run it uses the new address of redirecting links and of mixed content files. Add --all for both, or --to=<url> to use one address.
  • wp blfx unlink --status=broken unlinks and keeps the text.
  • wp blfx recheck, wp blfx dismiss, and wp blfx clear check again, hide, and remove the results.

They ask before changing anything unless you add --yes. Make a backup first.

Redirects and the 404 Monitor

  • wp blfx redirects list, add <source> <target>, delete, export, and import <file>
  • wp blfx 404 list, redirect <id> [<target>] (the suggested page is used when you give none), and clear

Networks

On a multisite network, add --network to scan and stats to cover every site. See Scanning a multisite network.


This feature is available in Broken Link Fixer Pro.

Forgot password? 0 View Cart