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,582 Responses to “Broken Link Checker for WordPress”

    1. You are a genius. Thank you for this plugin.

      Mandy
      smallfineprint.com

    2. Andre says:

      It’s great your Plug-in is one of the 100 Most Popular Plug-ins. Congratulation.
      I enjoy this nice program a lot.

      Unfortunately I can’t update to newer version of the PlugIn, because since Version 1.60 my WordPress is always just crashing. I was so happy v1.62 was published but with this Version my WordPress (WP 3.41 / PHP v5.2.17 / MySQL v5.5.25) crashed hardly.

    3. Jānis Elsts says:

      That doesn’t look like a redirect or a broken link to me. When I try it, it just returns a normal “200 OK” HTTP response and a blank page. Perhaps the target site displays different pages to different visitors?

    4. Nirav says:

      Hey thanks for the reply In my production server the links that are redirects and are shown as broken , this is the status i am getting with the 404 .

      Link last checked : July 16, 2012
      HTTP code : 404
      Response time : 0.000 seconds
      Redirect count : 0
      Instance count : 56

      This link has failed 3 times.
      This link has been broken for 1 day.
      Log : === HTTP code : 404 ===

      HTTP/1.1 404 Not Found
      Date: Mon, 16 Jul 2012 19:58:39 GMT
      Server: Apache/2.0.64 (Unix) mod_ssl/2.0.64 OpenSSL/0.9.7a mod_bwlimited/1.4 PHP/5.3.13
      Content-Length: 498
      Content-Type: text/html; charset=iso-8859-1

      Link is broken.

    5. Nirav says:

      And yes the redirects are in my .htaccess files as 301

    6. Thank you for a great plug-in!

      One feature that I wish it had would be to identify the location of duplicate links. My report is “Detected 3222 unique URLs in 3231 links.” That suggests I have 9 duplicate links, some of which may have been unintentional on my part.

    7. Elizabeth says:

      Thanks for this great plugin. My client has asked me to clean up and recategorize a lot of their posts and pages, so we’re anticipating some broken links. If I select the “Stop search engines from following broken links” option, what will be the result? Will those pages not show up at all in search results, or will the broken links redirect to the home page?

    8. Jānis Elsts says:

      @Andre:

      You can always download one of the older version here and use that. Sorry I can’t suggest anything better.

      @Nirav:

      Hmm, so the plugin doesn’t see them as redirects (“Redirect count : 0″). Could it be that your .htaccess redirects only work for normal visitors and not for the plugin? Does the .htaccess contain any user-agent or IP-based restrictions, or something like that?

      @Charlie:

      I’ll add that to the idea list.

      @Elizabeth:

      Selecting that option will make the plugin add a rel=”nofollow” attribute to broken links. See the Wikipedia page on nofollow for an explanation of what this attribute does.

      The pages that contain the links will still show up in search results as normal, and the broken links will still point to the same (missing) pages.

    9. Nirav says:

      Hey Janis ,

      I am checking the user-agent or IP-based restrictions . The weird think is if i do the curl using the server where website is hosted it shows 404 , but it works fine when i do from any other machine and browser , so not sure if its curl header issue. Do u in any way use curl for the plugins to check the links .Appreciating your help .

      Nirav

    10. Jānis Elsts says:

      Yes, the plugin uses the curl PHP extension if it’s available. However, it also replaces the default curl user agent header with its own, so I don’t think that could be the problem.

      Try loading the page with wget instead of curl to see if it’s related to headers or IP/DNS stuff.

    11. […] new Google algorithm, lots of broken links are a big No-No, so when I started my clean up I used a Broken Link Plug In and it said I had over 900 broken links (that it could find), so I have spent countless hours […]

    12. […] Το συγκεκριμένο plugin κάνει κάτι πάρα πολύ σημαντικό.Ελέγχει εάν υπάρχουν κάποια Links στο site μας τα οποία είναι σπασμένα κοινώς τα πατάμε και δεν οδηγούν κάπου.Αυτά τα κοιτάει και η google και καλό θα είναι να μην έχουμε στο site μας τέτοια links.Κατεβάστε εδώ το Broken Link Checker […]

    13. […] Checks your blog for broken links and missing images and notifies you on the dashboard if any are found. Version 1.6.2 | By Janis Elsts | Visit plugin site […]

    14. Marshall says:

      After latest update of broken link checker to 1.6.2 I got an email of 2 broken links all of which were working ok. After clicking on the links, broken link checker showed no broken links. Any ideas on this.

    15. Jānis Elsts says:

      The links were probably broken temporarily, e.g. due to a short site downtime, and were back again by the time you checked. This happens sometimes.

    Leave a Reply