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. This plug in has saved me a great deal of time in dealing with broken links. However lately it has been showing a “403 forbidden” message on Amazon image links. I am an Amazon affiliate, and review books, so I use a lot of images of book covers. I have tried removing and reinstalling the link, but I get the same message. Can you explain why? And is there a way to have this not happen?

    2. Jānis Elsts says:

      Could you post a few sample links? I’ll test them on my local WP install and see if I can figure out what the problem is.

      One possibility is that Amazon might have started blocking HTTP requests sent by the plugin. Some sites tend to block automated requests.

    3. Thanks for your reply. I’m going to hold off on pestering you for a while. I just changed hosts and Broken Link Checker is finding a lot more (legitimate) broken links all of a sudden. Today there were 30, I think. None of them were the Amazon links, but many had to do with photos from my own media library.

      When clicked by a reader, the photos are not supposed to link to anything, but link checker is showing the full url that the site uses to find the photos in my content.
      If this continues, I’ll let you know, but as long as the Amazon problem doesn’t resurface, you can just consider this a non-issue.

      Thanks again for your prompt reply.

    4. Jānis Elsts says:

      That’s actually a feature. The plugin checks image URLs even if the images don’t link to anything. You can turn it off by disabling the “HTML images” option in Settings -> Link Checker ->> Which Links To Check.

    5. Interesting. It has never before reported images that I have stored on my site and marked not to show link to reader. Now I have a dilemma because I like to have it inform me when Flickr and other exterior links change, so I hate to disable it.

      Puzzled as to why I’ve always had the check box marked to check images and it only last week started showing me the “invisible” links to my own content.

      I guess if I want to continue to check Flickr I’ll just have to put up with marking the links to photos in my media content as “unlink”.

      Thanks again for your responsiveness.

      Vera

    6. Aleks says:

      Hi

      I get following error when opening my webpage without the www in front of the domain.
      eg. mypage.com instead of http://www.mypage.com

      There is clearly some issue with the broken-link-checker because there is no error when i turn off the plugin.

      Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 7680 bytes) in /home/www/****/html/*****/Wordpress/wp-content/plugins/broken-link-checker/modules/containers/dummy.php on line 41

      It looks like a bug. Could you please fix it, because I like the plugin.

      Thx
      Aleks

    7. Jānis Elsts says:

      Unfortunately, memory issues can be very hard to track down because the error message always shows the script that pushed memory usage over the limit and not the script that used the most memory. Have you tried temporarily deactivating some of your other plugins to verify that it’s not one of them?

      On a related note, 32 MB is a pretty low memory limit for a WordPress site. WordPress documentation recommends at least 40 MB:

      […] By default, WordPress will attempt to increase memory allocated to PHP to 40MB (code is at beginning of wp-settings.php), so the setting in wp-config.php should reflect something higher than 40MB.

      (It is unusual that the error only shows up when you access the page without the www; I’m not sure what could cause that.)

    8. Aleks says:

      I solved the issue I had with the mypage.com. The problem was, that I pointed mypage.com directly on the servers subfolder with the wordpress installation. I now have installed a redirection to http://www.mypage.com and it works now.

      Thx
      Aleks

    9. Dion says:

      Hi Janis,

      This is a very handy plugin you’ve created! It’s already found numerous bad links, but I find I’m not understanding what all the options are. Specifically:

      1. In Tools > Broken Links, when I hover over a link, it gives me numerous options including “unlink”. What does that mean? Does it remove the URL, or just the hyperlink, leaving the URL or anchor text in place?

      2. In Settings > Link Checker > General > Link Tweaks it has two checkbox options to “apply custom formatting” with an “Edit CSS” link. Is there a default setting that’s enabled by selecting these checkboxes, or MUST we edit the CSS?

      Thanks!

    10. Jānis Elsts says:

      “Unlink” removes the hyperlink and leaves the anchor text in place. For example, if you have a link like this:

      <a href="http://example.com/">click here</a>
      

      …then “unlinking” it will leave just the text “click here”.

      As for custom formatting, the default is to add a strike-through effect to broken links and removed links. You can edit the CSS to change it to something different, or disable the feature by clearing the checkbox.

    11. […] Broken Link Checker Überprüft Ihr Blog auf fehlerhafte Links und nicht vorhandene Bilder und benachrichtigt Sie im Dashboard, wenn nichts gefunden wird. […]

    12. Perry says:

      This is a great and very useful plugin.

      Just a couple of questions.

      Does the plugin work with multisite? I have installed it but even though it is network activated it does not appear in any sub site plugin list. There doesn’t seem to be a settings option on the network plugins list either.

      On another site I am trying it out on I use Advanced Custom Fields and there is a repeater field that handles lists of URLs. No matter what settings I select in the Broken Links options I cannot get the plugin to pick up on broken links in these fields.

      Is this a compatibility issue or am I doing something wrong?

    13. Jānis Elsts says:

      Multisite is not officially supported. Some users have managed to get it to work one way or another, but it usually still has some issues.

      The Advanced Custom Fields website appears to be having some issues right now so I can’t download the repeater add-on. I’ll check it again later and see if I can figure out why BLC isn’t picking up those fields.

    14. Charles says:

      When I have this list of broken links that BLC has given me, and select all on the first page, and then do a bulk Unlink, it only does the first 3 or 4 instead of the whole page. This has gone on for the whole time I’ve tried using it which is over a year. Is there anything causing this. I have a lot of links to Unlink and need to get through them quickly.
      Thanks!

    15. Jānis Elsts says:

      How long does it take to unlink those 3 or 4 links? If it takes a long time for some reason then the script might be running into the execution time limit and getting terminated before it can process all the selected links.

    16. Mike says:

      Thank you for a great plugin. I have one question.

      Is there are way to specify an email address, other than the main site admin email, to which the broken link notifications are sent?

      Thanks

    17. Jānis Elsts says:

      No, that is currently not possible.

    18. Amy Hagerup says:

      I have a lot of 403 forbidden codes on my links. What action should I take to correct them so they don’t come up on broken links? unlink? dismiss? or what? Thank you. This is a great plug in.

    19. […] Broken Link Checker This plugin goes through all of your blog and lets you know if you have any broken […]

    20. […] Fix 5 broken links on your blog (How do you find the broken links? I use a WP plugin called Broken Link Checker) […]

    Leave a Reply