Guide
A broken link checker for WordPress that runs on your own server
For years the default answer to "how do I find broken links in WordPress" was one plugin that scanned everything locally. Then the popular checkers started pushing scans to hosted services. Here's what changed, what to weigh up, and how to keep link checking inside your own site.
What changed
The best-known link checker plugin now leads with a scan that runs on its maker's cloud servers, which needs a connection to the maker's service and a (free) account. A local mode is still available. Several other checkers only work through an external service: the plugin sends your URLs out and shows the results in WordPress.
A cloud scan has real advantages: it doesn't use your server's resources and it can crawl the site from outside. But it isn't for everyone.
When a local checker is the better fit
- You don't want another account for each client site you manage.
- The site isn't public: a staging site, an intranet or a site behind a login can't be reached by a cloud crawler.
- You'd rather not share your site's link list with a third party, for example for a client with strict data rules.
- You want it to keep working regardless of a service's free tier, limits or future plans.
What a local checker should do well
The old complaint about local link checkers was that they slowed sites down. That comes from checking hundreds of links in one go. A good local checker avoids it by:
- checking in small batches in the background instead of one long scan;
- using HEAD requests first, which don't download the page, with a GET fallback for servers that reject HEAD;
- treating timeouts and "too many requests" (429) as warnings until they repeat, so a busy external site isn't reported as broken;
- letting you fix a link where it's listed, without opening every post.
Setting up Hrefix
Hrefix is a free plugin built this way. It stores and checks links on your own WordPress site with WP-Cron and the WordPress HTTP API, with no account and no external API.
- Install Hrefix from Plugins > Add New and activate it.
- Go to Tools > Hrefix and click Start link checking.
- Hrefix collects the
<a href>links and<img src>addresses from published posts, pages and public custom post types, and checks them in the background. - Broken links, redirects and warnings appear in one list. Recheck, edit, unlink or dismiss each one. Unlinking keeps the anchor text.
- For broken internal links, Hrefix suggests similar published pages and can add a simple 301 redirect.
Under Settings you can change the batch size, choose post types, add exclusions and turn off checking of external links if you only care about your own pages.
Switching from another checker
- Deactivate the old plugin first, so two checkers don't run at the same time.
- Note any redirects the old plugin created. If you delete it, check whether those redirects need to move to your redirect plugin or server config.
- Run a first full check in Hrefix and work through the broken list once. After that, broken links are rechecked daily and working ones every 7 days.
Related: four ways to find broken links in WordPress and fixing 404 errors with 301 redirects.
Want this done inside WordPress? Hrefix is a free plugin that finds broken links on your own site, with no account and no cloud service. Hrefix Pro (from €39 per year) adds a 404 monitor, a bulk redirect fixer and a weekly email report.