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. White Shadow says:

      @ Rick : On my test site, Aperture links are correctly detected as working. What does the log entry say for those links? (click the “Details” link(s) in the broken links table to display the log).

      @ Roger : This is a rare problem. I’ve never seen it happen myself, but my guess would be that some low-performance servers can get overloaded when the link checker starts up and tries to process links as fast as possible. This is usually a temporary issue, but it can bring down the site for a while. Still, the vast majority of users never encounter this problem.

      I’m planning to eventually add a configuration option that would tell the plugin to suspend link checking if the server is too overloaded.

      @ Math : At the moment, there is no easy way to restore deleted links. However, you could perhaps check the post’s revision history – if the link is still present in one of the older revisions you could either restore that revision or just copy the link HTML to the current version of the post.

      As for having a way to recover deleted links, I’ll think about it. It would probably be much more complex to do than you might think.

    2. rick powell says:

      Thanks for the reply.

      Log:
      1. Log : (Using Snoopy)
      HTTP/1.0 403 Forbidden
      Server: squid/2.7.STABLE7
      Date: Thu, 11 Feb 2010 01:08:38 GMT
      Content-Type: text/html
      Content-Length: 66683
      X-Squid-Error: ERR_ACCESS_DENIED 0
      X-Cache: MISS from sq59.wikimedia.org
      X-Cache-Lookup: NONE from sq59.wikimedia.org:80
      Connection: close

      Link is broken.

      So it’s saying that the link is forbidden? A huge proportion of my apture links lead to wikipedia, but they’re all working as far as I have tested. Apture does this automatically for all wikipedia links.

    3. Roger says:

      @White Shadow
      Thanks a lot for your answer !
      As my server is quick and far from being overloaded, I finally enabled the plugin and tried it.
      And guess what…. It worked perfectly 🙂

      Thanks again and keep up the good work !
      Roger

    4. White Shadow says:

      @ Rick : Right. Unlike when using CURL, the current version of the plugin makes no attempt to masquerade as a real web browser when using the Snoopy library. So any site/service with bot-detection abilities would easily stop it…

      Try the development version instead. I added a simple user-agent spoofer to the Snoopy-using code; this might help with some of the false positives.

      @ Roger : Good, good 🙂

    5. rick powell says:

      Thanks! That worked.

    6. josh says:

      It’s very powefull tools and very usefully information.
      Thank you Friend

    7. Mathdelane says:

      Thanks, White Shadow! Your tip worked for me. Hoping for recoverable links in the future.

    8. […] to the efforts of the Broken Link Checker for WordPress, I was able to go through the site and isolate any HTML-related 404 errors. Image-related errors […]

    9. […] Broken Link Checker Homepage Download Broken Link Checker […]

    10. Mossack Anme says:

      Hmm…your plugin make my blogs have a Fatal error memory exhausted. Sometimes My WP-plugin RSS at my Dashboard couldn’t read the RSS, sometimes my WP core upgrade tools couldn’t upgrade automatically because that Fatal error memory exhausted, and many other errors. All of my errors end at the time since I deactivated Broken Link Checker plugin. Why?

    11. White Shadow says:

      Well, your server apparently doesn’t have enough memory to run this plugin. In the current implementation, the plugin always tries to process links as fast as possible, which in rare cases can overload the user’s server.

      Ahem. Settings that let you set limits on resource usage will be added in one of the future releases.

    12. Mossack Anme says:

      Hmm…I use a define method in my wp-config.php to give a memory limit for every script/file in your plugin…but it’s still happened..

      I’ll wait for your future release…!! ^^

    13. […] Broken Link Checker – Überprüft Beiträge auf tote Links und fehlende Bilder und informiert auf dem Dashboard, ob welche gefunden wurden. […]

    14. […] Broken Link Checker te permite revisar la validez de todos tus enlaces de forma automática y además te muestra un pequeño informe con el listado de aquellos rotos. Desde este mismo listado, simplemente tienes que decidir qué hacer con ellos: eliminarlos, editarlos o incluso corregirlos y cambiarlos por otros. Esta es la apariencia que tiene: […]

    15. […] Broken Link Checker […]

    16. […] Broken Link Checker plugin is an easy way to make sure that all of the links on your site — internal or external — […]

    17. Roxanne Hawn says:

      I know for sure I have broken internal links after a move to a WordPress, but the plugin says “no broken links found.” Help?

    18. White Shadow says:

      Try finding one of those links in Tools -> Broken Links -> All and see what the “Details” panel says. Maybe that will provide some clues as to whay the plugin doesn’t detect them.

    19. […] Doyle, a writer/blogger friend, recommended a plugin called Broken Link Checker. It seems to be finding the broken links (mostly times when I link back to previous blog posts […]

    Leave a Reply