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! (40 KB)
Note : This page, and the feature list below are slightly out of date as a major update has been released recently (see details). I’ll get around to updating this page eventually.
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.5.3 : broken-link-checker.zip (40 Kb)
Requirements
- WordPress 2.7 or later
- MySQL 4.1 or later
Starting with version 0.5 this plugin is only compatible with WordPress 2.7 and up. Older versions (e.g. ver. 0.4.14) should work with WP 2.1 – 2.6.x.
Related posts :
[...] Indispensable, cuanto antes lo instales mejor. Este plugin revisa que todos los links en tus posts funcionen correctamente. Yo lo puse luego de años de tener el blog y encontré muchos links rotos. Lamento no haberlo tenido desde el principio. Link [...]
[...] WordPress.com Stats 1.5 [...]
I enjoy the links checker, however, I’ve noticed a systematic error that the plugin is making. I have links to the site http://www.tigersandstrawberries.com, and all the links are working (hand-checked). However, the plugin identifies them as broken and draws a line through them.
Here’s the actual post location: http://www.chileunderground.com/2008/08/14/august-f-bom-tigers-and-strawberries/
The broken-link details include notification of error 412, precondition not met. I’m now looking through all the other links the plugin found to be “broken” looking for more instances. Is there a workaround to keep these type of “broken links” from being mis-identified?
The Chile Doctor
At first glance the 412 response code seems like a fairly sure indication that the site in question is running some kind of anti-bot script that’s blocking the plugin. I’ll run some tests later to make sure, but it’s probably the most likely answer.
As far as I know, there isn’t much I can do to prevent the plugin from being detected as a web crawler/bot/an automated thingy – in a sense, it actually is those things.
Great Plugin – love it, I was shamed by the amount of broken links by blog had.
I just wanted to thank you for your quick response the other day. I asked about the work queue (mistakenly thought I was being hacked). Thank you for responding right away!
[...] but dead links over which I have no control. If you are running WordPress, you’re in luck: the Broken Link Checker plug in makes fixing these errors easy. You can format them with strikethrough automatically, or [...]
[...] Xenu, and I blogged about it here. Not that there is anything wrong with Xenu, I just noticed Link Checker* and thought I’d give it a [...]
Thanks a lot for this plugin! Installing it right away!
[...] Broken Link Checker for WordPress – As your blog gets more and more posts, it can be difficult to go back and look for what has broken with time. This plugin will check images and links and notify you via the dashboard when it locates something. [...]
HI there,
I have just installed last relase of your plugin (0.5.10), but unfortunatly give me some error like this follow, on the page where linkchecker has find broken url…
Warning: html_entity_decode() expects parameter 2 to be long, string given in /home/luxemoz1/public_html/wp-content/plugins/broken-link-checker/highlighter-class.php on line 62
can you chek please
thanks
G.
Oops, that was a really silly bug/typo. Should be fixed now (might take a few minutes/hours before the update shows up on wordpress.org).
Hey…really fast support! Thanks
I have just installed the last version (0.5.11). But I had to deactivate the plugin because of this warning:
Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (…) in (…)/wp-content/plugins/broken-link-checker/core.php on line 2055
(…) I deleted the paths
Version 0.5.9 works fine for my blog. Could you check this please?
Diego, you’re not alone. I started getting that error with 0.5.10 and when 0.5.11 appeared I was pleased because I thought it would contain a fix. Unfortunately the problem persists. I’ve got it disabled now as well.
This should be fixed in 0.5.12 which will be up shortly.
*Wonderful!* Thank you very kindly. The error has disappeared after upgrading!
Congrats, your suport works better than other “plugin creator” offer on payment.
Thanks again!
(HEy i saw that your plugin is not localized yet. If you want i offer my service for italian translation)
Bye bye
I’ll put localization on my to-do list and let you know if/when I get around to it
OK contact me via email when you decide to start
I’ve been using this plugin for quite some time, and have been pretty pleased. Unfortunately, the updates over the last several months have caused problems.
Whenever I try to update automatically through Wordpress, it says it failed because the directory already existed. So I have to manually rename the directory and then reinstall it. Which is rather time-consuming and annoying.
There have been a few times when this didn’t happen, so I don’t think it’s something on my end. Please take a look into this, so it doesn’t happen again.
[...] правильность удобно с помощью плагина Broken Link Checker, он позволяет прямо из админки исправлять битые [...]
This plugin is not working properly for me. I installed it and it came back with:
No broken links found.
No URLs in the work queue.
No links detected.
I found that it only detected the links if I went into each post and “edited” it. If I push the ‘Re-check’ all pages button however it goes back to saying what it was before and I have to bulk-edit all the pages again…
Great plugin. I wanted to let you know that it breaks both “Incoming Links” and “Google Analytics” dashboard widgets. It stops them from fully loading. This is not a huge issue, but something you might look into for the next release.
Thanks
Seems to be a great plugin but doesn’t work for me. It locks my system and I get a MySQL Server error. Any ideas about other conflicting plugins, e.g. Redirection, WP Super Cache?
Thanks!
[...] for some knock-out plug-ins for my blog. I found quite a few … AdRotate Askimet (Of course) Broken Link Checker CommentLuv Google XML [...]
Like everyone else, I adore this plugin.
I was, however, wondering if it would be possible to make it is that it also checks comment (particularly commentor URLs) links?
Thanks again for all your hard work!
@ Valerie : I, on the other hand, think it’s something on your end. In particular, it sounds like it could be a permission problem with newly created files. The reason it only shows up in some of the newest versions is that some of them contain new .php files (as opposed to just modified versions of old files).
@ Pixie : No idea why this would happen. Try installing the debug version and using the FirePHP addon to monitor the plugin’s activity. Maybe some interesting error messages will come up?…
@ Doc4 : I’ll look into it.
@ Jose : That sounds like the rare and mysterious “performance problem” that I can never replicate in any of my tests. What is the specific MySQL error you get? As for plugin conflicts, BLC is perfectly compatible with WP Super Cache (I’ve used both plugins on this very site for months) and probably shouldn’t conflict with Redirection.
@ Dee : It’s on my to-do list
@ Doc4 (again) : I suspect it could be a JavaScript issue; check your browsers error console for any error messages.
[...] dem „Broken Link Checker“, den man hier herunterladen kann, beseitigt man dieses Problem. Das Plugin ist schnell installiert und läuft hier [...]