Broken Link Checker for WordPress

Notice: This plugin has been transferred to ManageWP. I am no longer working on it. Please direct any feedback to the new developer. See the plugin homepage for more information.

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.

Features

  • Detects links that don’t work, missing images, deleted YouTube videos and other problems.
  • Periodically checks links in posts, pages, comments, custom fields and the blogroll.
  • New and modified entries are checked ASAP.
  • Notifies you on the Dashboard if any problems are found.
  • Lets you edit all instances of a specific link at once.
  • Gives you a list of all links ever posted on your site, with the ability to search and filter it.
  • Lets you apply custom CSS styles to broken and removed links.
  • Highly configurable.

The broken links show up in the Tools -> Broken Links tab along. If any invalid URLs are found a notification will also show up on the Dashboard widget. To save screen real-estate, the widget can be configured to stay closed most of the time and automatically expand when broken links are detected.

Download

broken-link-checker.zip (412 KB)

    Requirements

    • WordPress 3.0 or later
    • MySQL 4.1 or later

    The current version of this plugin is only compatible with WordPress 3.0 and up. If you have an older version of WP, try one of the older releases. Specifically, version 0.8.1 is the last one that’s still compatible with the WP 2.8 branch, and version 0.4.14 is the last one compatible with WP 2.1 – 2.6.x.

    Installation

    Install “Broken Link Checker” just like any other WordPress plugin :

    1. Download the .zip file (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.
    Related posts :

    2,584 Responses to “Broken Link Checker for WordPress”

    1. […] 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. […]

    2. […] many dead links from Missnexus.com thanks to the WordPress Broken Link plugin. There are still images of my own that are dead links.  If you find some, please send a […]

    3. […] Broken Link Checker デッドリンクがあるとダッシュボードに表示&自動で打ち消し線を入れてくれる […]

    4. […] Broken Link Checker As the blog gets older, some of the old links get outdated. Enter Broken Link Checker. As it searches the database, any old, outdated links that it finds will still work, but it will flag them on the WordPress Dashboard, and it draws a line through the original link in the original post. You have the option of either deleting the link entirely, unlinking the text, or editing the post yourself. […]

    5. Having recently changed the permalink structure on my blog, I wanted to use Broken Link Checker as a tool to help me change internal links, but none of these seem to show up even though they are returning error 404s.

    6. White Shadow says:

      Does the plugin detect those links at all? Go to to Tools -> Broken Links and click on “All” to see the complete list of detected links. You can then click the “Details” link below each item in the list to see when/if that URL was checked and what the result was.

      Also, make sure your site isn’t mentioned in the exclusion list in Settings -> Link Checker.

    7. I’ve gone through the 64 pages of links it has detected and none that link to blog posts have been detected, although links to images and other media are detected.

      Take this post:
      http://www.stephennewton.com/nave-marketing-strategies2-easy4men/
      The links with anchor text:
      Barcelona…
      Naïve Marketing Strategies#1: High-Low
      Naïve Marketing Strategies#3: McDonald’s Salads Plus
      are not detected. They all produce 404s.

      This is consistent across the whole blog.

    8. White Shadow says:

      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.

    9. 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.

    10. White Shadow says:

      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.

    11. Katryna says:

      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.

    12. […] 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 […]

    13. […] 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 […]

    14. […] 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. […]

    15. […] Broken Link Checker 0.5.2 […]

    16. 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!

    17. White Shadow says:

      Unfortunately I will need more information to fix this. I’ve emailed Katryna about it, but so far I haven’t received a reply.

    Leave a Reply