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! (10 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 -

  1. Download (see below).
  2. Unzip.
  3. Upload the broken-link-checker folder to you wp-content/plugins directory.
  4. Activate the plugin in the Plugins tab.

Upgrading

  1. Deactivate the plugin (important!).
  2. Do steps 1.-3. from “Installation”.
  3. Upload the broken-link-checker folder to you wp-content/plugins directory.
  4. Re-activate the plugin in the Plugins tab.

DownloadCC-GNU GPL
Version 0.3.5 : broken-link-checker.zip (10 Kb)
(It needs at least WordPress 2.0.x to work, maybe 2.1.x. I’ve tested on 2.1.3 - 2.5)

Related posts :

315 Responses to “Broken Link Checker for WordPress”

Pages: « 11 10 9 8 7 6 5 4 [3] 2 1 » Show All

  1. 75
    Deuts.NET - Broken Link Hunt Says:

    [...] currently into the broken link hunt here at Deuts.NET. Thanks to the Broken Link Checker plugin by Janis Elsts, finding those broken links is a breeze. Two years into blogging, there will [...]

  2. 74
    White Shadow Says:

    Thank you :)

  3. 73
    Samgreen Says:

    While I don’t have the means to donate, I have put this plugin on my ‘whats new’ page and suggested WP users get it and install it.

    I had to reinstall wp a few months ago after I hiccuped the mysql database. Many of my pages have links on the page to other parts of the blog. I felt just the category listing would mean too many clicks for viewers. So… the static links I had were out of sequence. I had corrected over 100 by hand over 3 months. This plugin found all of the remaining bad links I had been searching for in less than a day, 120 of them.

    Thanks for a great plugin !

  4. 72
    White Shadow Says:

    Yes, that seems doable. I’ll add it in the next version.
    By the way, if you want the <code> tags show up in the comments here, you’ll have to write the angle brackets as &lt; and &gt; ;)

  5. 71
    Rob Marsh Says:

    A very useful plugin!

    I have found one small hitch though: I have a number of code examples (enclosed in ) which display links as code rather than being real links, if you see what I mean. Is there any chance of ignoring them?

    Thanks.

  6. 70
    [i:rrhoblog] » links for 2008-03-19 Says:

    [...] Broken Link Checker for WordPress Plugin (tags: wordpress plugin wp-plugins) [...]

  7. 69
    Samgreen Says:

    this is a wonderful idea !

  8. 68
    My Blog » Broken Link Checker for WordPress Says:

    [...] Dịch từ: http://w-shadow.com [...]

  9. 67
    White Shadow Says:

    Not yet, but I’ll add something soon. I’ll just make it ignore “mailto:” links.

  10. 66
    sansibar Says:

    blc is great but its shows me every email-adress as broken link. Is there a feature not to look for emails but only for homepages?

  11. 65
    preblogging Says:

    it might be an idea to add a notice or remove the download link, of the older version … it had me confused for a bit !

  12. 64
    America’s North Shore Journal | Blogging Changes Says:

    [...] Broken Link Checker 0.3.3: Does what it says. When I began, I did not know Yahoo didn’t keep its URLs, and the Marines don’t either. So, I have a lot of broken links. Nice thing is, if the link is broken, it displays with a line through it. [...]

  13. 63
    My final word about Semiologic and their Smartlinks plugin | Michael's corner of the web Says:

    [...] Alex King seems to be a much better programmer than Denis de Bernardy). I combine that with the broken-link-checker plugin to provide the functionality I was always missing with smartlink - an ability to automagically [...]

  14. 62
    wp plugins update | paulierco's blog Says:

    [...] Broken Link Checker 0.3.3 - Scanează tot blogul după linkurile care nu mai sunt bune.In felul acesta pot să vad ce nu mere şi ce merge pe site incât să fac blogul fara probleme. [...]

  15. 61
    White Shadow Says:

    @moserw : Maybe your hosting just can’t handle it. I don’t know of anyone who’s had a similar problem :/

  16. 60
    moserw Says:

    I tried this plugin but its giving me 408 Request Timeout all the time. What am I doing wrong? I mean its taking down my entire website. Any help would be appreciated.

    moserw

    http://www.nela.in/

  17. 59
    Graeme Says:

    0.3.3 solved the problem. Only showing the one broken link that is actually broken, no false alarms and the admin pages speed seems fine in Firefox for me. Running several bot-blockers BB, Sabre, etc. and nothing clashing. Yeay :D

  18. 58
    FruityOaty Says:

    Hi, I’d previously reported issues above that other people experienced (slow crawl, false broken links, etc.). Incidentally, I also have Bad Behavior plugin installed, so maybe that was a reason…

    Anyway, you’ll be glad to know that I tried latest 0.3.3 and it seems to be working fine now…. for me. No false broken links, no weird activation issue (message that it could not be activated because it caused “fatal error”), etc. Great.

    Thanks for the fixes. And thanks for releasing one of the most useful plugins that has ever been created for WordPress! It should be part of WordPress! :)

    I just wish there was a feature/plugin that would check author links/any links in comments. I hate promoting broken links.

  19. 57
    R. Richard Hobbs Says:

    0.3.3 is at http://wordpress.org/extend/plugins/broken-link-checker/ now - thx

    0.3.3 is working ok for me - no apparent conflicts w BB -

    thx
    RH

  20. 56
    White Shadow Says:

    Damn, I suspected I had forgotten something. I uploaded the changes, but didn’t update the version information. It’s up now (wordpress.org will take 10-20 minutes to refresh).

    I’ve got nothing against Bad Behaviour (which is probably the culprit here). However, I don’t think I’d be able to “fool” it into treating the plugin as harmless, now that BB has started blocking it.

  21. 55
    R. Richard Hobbs Says:

    <<>> yes- if Akismet and BadBehavior are what you mean… and it is imperative they stay as well.

    <<>> where, please? at this writing 3.2 is linked above and on the WP Plugins Page http://wordpress.org/extend/plugins/broken-link-checker/

    thx
    RH

  22. 54
    White Shadow Says:

    Do you have any plugins/server modules that block bots? Some of them identify this plugin as a malicious bot, and will cause all of your links show up as broken.

    Also, try the 0.3.3 version that I just uploaded.

  23. 53
    R. Richard Hobbs Says:

    Graeme Says: March 13th, 2008 at 6:55 am
    I updated to 0.3.2 and suddenly every link on my site became “broken” according to the plugin, but when I tried them, they all worked perfectly. Nothing else changed apart from this update. The previous version worked perfectly.

    <<< Ditto me

  24. 52
    White Shadow Says:

    I don’t know why this happens, but my guess would be it’s something to do with the web browser. Try a different browser and see if it helps.

  25. 51
    Dana Betz Says:

    Oops. Just realized others are experiencing similar problems. Thanks again for any help.

    Dana

  26. 50
    Dana Betz Says:

    Hi. I installed the plugin and it appears to work fine with one exception. Once the plugin is activated, my system slows down to a crawl when navigating in the WordPress environment. As soon as I deactivate the plugin, everything is normal again.

    It I’m using Version 2.3.3. Any help will be greatly appreciated!

    Dana Betz

  27. 49
    White Shadow Says:

    Seems you’re not the only one to experience this. I’ll download 0.3.1 and 0.3.0 from the WP plugin database (there’s a link for “Other versions”) and try to find which change might have caused it.

    On a related note, it seems that this plugin is now getting blocked by Bad Behaviour. Maybe that’s at least part of the problem?….

  28. 48
    Graeme Says:

    I updated to 0.3.2 and suddenly every link on my site became “broken” according to the plugin, but when I tried them, they all worked perfectly.

    Nothing else changed apart from this update. The previous version worked perfectly.

  29. 47
    White Shadow Says:

    Strange. I suppose it could cause a slowdown in very specific circumstances (AJAX/broser/server configuration) while the links are checked.

    Though I don’t see how it could “trigger a fatal error”. Hmm.

  30. 46
    FruityOaty Says:

    Strange, it was working fine with older plugin version… then I updated to 0.3.2 today. Then it falsely reported 132 broken links. I checked all of of them and none of them were broken.

    Even weirder, after activating the plugin, my WordPress Dashboard started loading very slowly, so I deactivated the plugin then “tried” to activate again and now I can’t activate at all… because I now keep getting this message:

    “Plugin could not be activated because it triggered a fatal error.”

    But now my WordPress Dashboard (2.3.3) is loading fine and fast. Hmm.

Pages: « 11 10 9 8 7 6 5 4 [3] 2 1 » Show All

Leave a Reply