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 – Search engines hate broken links.  Whenever you add a link to an image or a trackback to another blog you’ll find that the host of the blog/image may move or remove that link.  This plugin will tell you on your WordPress dashboard whenever it finds a broken link then give you the option to change it or de-link.  Saves you the time of rummaging through your old posts checking for errors. […]

    2. […] Broken link Checker – Like anything else links too get broken, this pluggin will scan your posts for that and report any broken links in the dashboard section of wordpress. There you can easily fix them. […]

    3. This is a fantastic plugin. Thank you so much!

      I noticed that the font styling was a little off in the dashboard widget. (Why I notice these things, I do not know.) If you change the div tag to p, it’ll match the other widgets, and you won’t need the line-height style. The script still loads correctly.

    4. White Shadow says:

      Alright, it shall be done. And thank you for the donation 😉

    5. […] been playing with the neat Broken Link Checker plugin today, I discovered a few links that had gone or changed and set about fixing them.  During […]

    6. Joe Banks says:

      We are behind a huge firewall, and therefore we have to modify the code of Broken Link Checker, so that all links in our sites don’t become broken. But with each new release, we have to find out where to re-add the code

      Here’s an example of the code we added from plugin version 0.4.14, Line 278:

      curl_setopt($ch, CURLOPT_HEADER, true);
      curl_setopt( $ch, CURLOPT_PROXY, “http://our-firewall.domain.gov:1234”);

      We’d certainly request a place to add the proxy in the admin interface. Please feel free to contact me directly with questions and I’ll relay them to our PHP expert.

    7. Joe Banks says:

      Don’t post to websites in the morning before you’ve had your cup of tea! 🙂 Corrections to my previous post in brackets []:

      “We are behind a huge firewall, and therefore we have had to modify the code of Broken Link Checker [with each upgrade], so that all links in our sites don’t [appear false postive] broken in BLC. But with each new release, we have to find out where to re-add the code.”

      Here’s an example of the code we added from plugin version 0.4.14, Line 278:

      curl_setopt($ch, CURLOPT_HEADER, true);
      curl_setopt( $ch, CURLOPT_PROXY, “http://our-firewall.domain.gov:1234″);

      We’d certainly request a place to add the proxy in the admin interface. Please feel free to contact me directly with questions and I’ll relay them to our PHP expert.

    8. Joe Banks says:

      I will donate to this plugin if you add a WP-blessed changelog to the Broken Links WP Plugins page 🙂

    9. White Shadow says:

      I shall add that to my To-Do list, too 🙂

      But seriously, I’m currently working on updating another WP plugin, so these suggestions will have to wait. Though I will probably get around to implementing them within a week or two (at most).

    10. Josh Glemza says:

      @joebanks

      Instead of making up new variables, you could just use the globally defined proxy settings in WordPress.

      WP_PROXY_HOST
      WP_PROXY_PORT

    11. Joe Banks says:

      @joshglemza

      I am such a n00b. Thanks, Josh.

    12. […] found this plugin, which seems to be quite good at finding the dead-ends. For other WordPressers ready for a little […]

    13. […] keep them all up to date, especially if you’re changing categories, titles, etc. Download the broken link checker for this. You may be surprised at just how many dead links you have. Don’t forget to check […]

    14. […] keep them all up to date, especially if you’re changing categories, titles, etc. Download the broken link checker for this. You may be surprised at just how many dead links you have. Don’t forget to check […]

    15. […] keep them all up to date, especially if you’re changing categories, titles, etc. Download the broken link checker for this. You may be surprised at just how many dead links you have. Don’t forget to check […]

    16. Jay says:

      Wow! I *love* you broken link checker!

    17. Creating A Blogging Maintenance Routine That Isn’t A Chore | BestBlogBuzz says:

      […] keep them all up to date, especially if you’re changing categories, titles, etc. Download the broken link checker for this. You may be surprised at just how many dead links you have. Don’t forget to check […]

    18. […] keep them all up to date, especially if you’re changing categories, titles, etc. Download the broken link checker for this. You may be surprised at just how many dead links you have. Don’t forget to check […]

    19. mgomes says:

      I’m having this problem when using broken link checker and Simplepress Forum,

      “Fatal error: Cannot redeclare json_encode() (previously declared in wordpress/wp-content/plugins/simple-forum/library/JSON.php:810) in /wordpress/wp-content/plugins/broken-link-checker/utility-class.php on line 16”

      It seems you must wrap the JSON calls with if(!function_exists()) calls. There should be no conflict.

      best regards

    Leave a Reply