Broken Link Checker for WordPress
Sometimes, links get broken. A page is deleted, a subdirectory forgotten, a site moved to a different domain. Most likely many of your blog posts contain links. It is almost inevitable that over time some of them will lead to a “404 Not Found” error page. Obviously you don’t want your readers to be annoyed by clicking a link that leads nowhere. You can check the links yourself but that might be quite a task if you have a lot of posts. You could use your webserver’s stats but that only works for local links.
So I’ve made a plugin for WordPress that will check your posts (and pages), looking for broken links, and let you know if any are found.
Download it now! (16 KB)
Features
- Checks your posts (and pages) in the background (whenever the WP admin panel is open ).
- Detects links that don’t work and missing images. Checks both internal and outbound links.
- Notifies you on the Dashboard if any problems are found.
- Link checking intervals can be configured.
- New/modified posts are checked ASAP.
The broken links show up in the Manage -> Broken Links tab. If any invalid URLs are found a notification will also show up in the sidebar on the Dashboard.
The Broken Links tab displays a list of invalid URLs found along with the relevant posts and the anchor text of the links. “View” and “Edit Post” do exactly what they say and “Discard” will remove the message about a broken link, but not the link itself (so it will show up again later unless you fix it; this plugin doesn’t modify your links).
By default all old posts/links are re-checked every 72 hours, or you can set a different time period.
Notes (Semi-Technical)
I realize there’s a lot of features that could be added to improve this plugin considerably. However, this release is intended to “test the waters” and see if there’s demand for a plugin like this, so I only implemented the most basic functions. The plugin has been upgraded to be slightly beyond “basic”
I thought about using WP’s pseudo-cron to run the link checker by schedule and decided against it. AFAIK the cronjobs execute when a page is requested; since this plugin does some lengthy processing it may increase page load times unacceptably when used in this manner. That’s why I set it to run the checks asynchronously (AJAX) and invisibly in the admin panel.
Installation
Just like any other WordPress plugin –
- Download (see below).
- Unzip.
- Upload the broken-link-checker folder to you wp-content/plugins directory.
- Activate the plugin in the Plugins tab.
Upgrading
- Deactivate the plugin (important!).
- Do steps 1.-3. from “Installation”.
- Upload the broken-link-checker folder to you wp-content/plugins directory.
- Re-activate the plugin in the Plugins tab.
Download
Version 0.4.13 : broken-link-checker.zip (16 Kb)
(It needs at least WordPress 2.0.x to work, maybe 2.1.x. I’ve tested on 2.1.3 – 2.7.1)







I see your problem – those links don’t have quotes around the URL. This is invalid markup and the plugin can’t parse it.
I’m afraid fixing those links is up to you. I might add robust HTML parsing in a later version of the plugin, but that’s a long way off.
Fortunately, I’ll probably be able to solve the problem with a .htacess redirect. I’ve been hand coding since 1994 and haven’t bothered keeping up with the more pedantic stuff.
It’s a shame linkchecker isn’t robust. Do you insist on double quotes or do you recognise single quotes too? It may be worth mentioning this issue in the readme.
In the meantime, many thanks for all your help. It’s appreciated.
It works with either kind of quotes.
As for why it isn’t robust – failure-tolerant and flexible HTML parsers are typically huge, complex beasts. I’m not quite convinced it’s worthwhile to add one of those to the plugin just so it can handle the odd malformed link. However, PHP 5 includes a semi-decent DOM parser, so I will eventually modify the plugin to use that when it’s available.
[...] Broken Link Checker [...]
Hi, I love this plugin but I’m having some problems with it. When I activate this plugin, most of my dashboard will fail to load. It will show the modules that come before where this module shows up on my dashboard, but not the ones after. This happened when I upgraded to Wordpress version 2.8. If you need more details please email me and I’ll do my best to help you. Like I said, I love this plugin, and I’d like to see an update so that I can use it again. =)
Thanks for you time.
[...] for plugins and I went looking for a broken links plugin that would make my life easier… Broken Links Checker was at the top of my search results and it was the perfect [...]
[...] and: is it necessary to correct it. P.S. Still, check your broken links automatically: I use Broken link checker by Janis Elsts. Click to report broken post. Share and [...]
[...] go through them later. Edit (June 15): After switching from my ancient linklint-based script to the Broken Link Checker plugin for WordPress, it turns out that surprisingly few of the links here have gone bad. Maybe [...]
[...] Broken link checker: si imposta un intervallo in ore e il plugin, allo scadere del periodo, inizierà in background a controllare i link inseriti in post e pagine alla ricerca di quelli non funzionanti. Verrà creato un elenco dei link non funzionanti: automaticamente, poi, verrà loro assegnata un’apposita classe CSS, completamente personalizzabile. [...]
[...] Broken Link Checker 0.5.2 [...]
Just like Katrina (comment #569) said, the plug-in seems to be broken in WordPress 2.8 making my admin side fails to load. I emailed my hosting because I thought there was a problem in the server before I realize this
Hopefully it will be fixed!
Unfortunately I will need more information to fix this. I’ve emailed Katryna about it, but so far I haven’t received a reply.
It doesn`t report redirects anymore since wordpress 2.8
Any suggestions?
Revision,
Its not 2.8,just tested on 2.7.1 and doesnt work either.So then the problem must be my recent change of webhosts.
Do i need to make some file or directory writable for the plugin to work?
@ Allstar :
I still haven’t gotten around to investigating this in-depth, but here’s what I can tell you now -
1) You don’t need to make any files/directories writable to use this plugin.
2) If it doesn’t report redirects then that’s probably because your (new) host doesn’t have CURL. In theory, the plugin should detect redirects even then, but I’ve barely tested that part of the code and it’s probably buggy.
@ Michael Aulia :
When have the Dashboard open in your browser, click View -> Source and check the HTML for PHP error messages (probably near the end of the source code).
[...] Broken Link Checker : Ce plugin vous informe des liens morts trouvés dans vos articles. Grâce à ces fonctions en [...]
[...] Broken Link Checker: Checks your posts for broken links and missing images and notifies you on the dashboard if any are found. By Janis Elsts. [...]
[...] Broken Link Checker Checks your posts for broken links and missing images. You should also run a Xenu crawl once in a [...]
[...] Broken Link Checker – Überprüft alle Beiträge, ob irgendwo ein toter Link ist. [...]
[...] the help of a WordPress plug-in called “Broken Link Checker“, broken links can actually be monitored and dealt with [...]
Is there any problems between Broken Link Checker & FB Connect plugin ?
None that I know of.
[...] Broken Link Checker – ky plugin i kontrollone te gjithe postet tuaja nese ka ndonje image apo link te thyer (broken link) dhe te njofton ne dashboard nese e gjen ndonje. Me ka ndodhe shpesh qe tme gjej broken links dhe fal keti plugini e kam rregulluar linkun aty per aty ne dashboard. [...]
[...] allerdings ein ziemlich zeitaufwendiges Unterfangen wäre, empfiehlt es sich, das Plugin Broken Link Checker zu installieren, welches selbstständig alle Links überprüft. Dann einfach nur noch [...]
[...] Broken Link Checker ブログ内のリンクで繋がらないものがあったら通知 [...]
[...] Broken Link Checker Checks your posts for broken links and missing images. You should also run a Xenu crawl once in a while to find errors on your site. Checking for broken links is a hassle to do manually, but these tools and plugins make it easy. [...]
[...] Broken Link Checker [...]
[...] [...]
[...] bad behavior لحمايتك من السبام [...]