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. Jānis Elsts says:

      Yes, go to “Settings -> Link Checker -> Protocols & APIs” and enable “YouTube API”.

    2. I found this Plugin very usfull while keeping Site free of problems with broken links, but I am using User Access Manager Plungin to contol access to contents for many different groups of users. Broken Link Checker repots public inaccessible content as broken links, but it isnt generally true.
      Checking Site at all of defined access levels would be very nice feature.

      Sincerely yours

      Marek Krygowski

    3. Anders Borg says:

      A possible improvement:

      The flow:
      – BLC reports a broken link
      – I get an e-mail about that
      – I test the link immediately
      – Now it works (most of the time, like 80-90%)

      So the idea: Why not make a doublecheck after half a day or so and not report to the admin until the link doesn’t work that other time either.

      As far as I know you don’t use the database for temporary storage, but that would be required to keep tab of what links should be retried. Not a major change though.

      Cheers

    4. Jānis Elsts says:

      That’s on my to-do list. The plugin already double-checks broken links – after the first failure, it will check a link up to 3 more times with 30 minute intervals – but currently it doesn’t use the number of failed checks when generating email notifications.

    5. Eric TF Bat says:

      Don’t know if you’re used to getting fan mail, but I have to say the Broken Link Checker plugin is one of the cleanest, best-designed plugins I’ve ever seen. In the vernacular of olden-times Australia, “I doffs me lid to yer” (which means: I take my hat off, in other words I express great respect and admiration). Thank you for your excellent work!

    6. Chris says:

      I tried this out on my site, but it seems to cause performance issues while scanning for broken links.

      I found that I would get logged out of my session, and then have to re-authenticate, and when I tried to log in, I received warnings that I had “too many login attempts” and had to wait to try to log in again.

      I believe that this plugin conflicts with some security settings that I had in place, causing my wp user account to get locked out of the site due to requesting too many urls that returned 404 messages from the server, which is falsely treated as an intrusion attempt.

      Otherwise, it did a good job of finding my broken links and allowed me to fix them quickly.

    7. Jen says:

      Count me as a raving fan! I’ve been revamping a really big old blog, and just can’t imagine how on earth I’d even begin to tackle the task without the Broken Link Checker… Thank you so much for creating (and maintaining) your very awesome plugin.

    8. AKEP says:

      Is there any documentation for this? What do you do with the broken links once they are found? I found that it puts strikethroughs on the front end of my site just by having it active

    9. Jānis Elsts says:

      What to do with broken links is entirely up to you. You can remove them, change their URLs so that they’re no longer broken, or do something else.

      If you don’t want the strike-through effect for broken links, you can disable it in Settings -> Link Checker -> General.

    10. AKEP says:

      Thank you for your quick response!

    11. dude says:

      It’s broken? I have just changed permalinks and had hundreds of broken media links basically in every post, made it check and it gave me 0 broken links..

      the people above me that says it’s working, on what version of wp are you guys on?
      mine is 3.7 and another guy in support forum said he was on 3.8.1

    12. Jānis Elsts says:

      Is the problem that the plugin reported too many broken links (i.e. false positives), or that you actually have broken links but it’s not reporting them?

    13. dude says:

      I have broken links and they are not reporting them. Reason wants to use your plugin is to have all broken link listed so I can easily edit em..

      May I know what exactly is the safest setting for this plugin as for it not to break the server? what exactly is the safest timeout, max working time and max load limit?

    14. dude says:

      May I suggest to add function where we could set for it to check only for (custom numbers) of links and maybe a category where to search?

      maybe the reason it’s breaking the server is due to it checking all thousands of post at one time..

      currently if I set it to more than 1 second timeout with server load limit around 70. it still cannot find any broken links. if I set it to 1s and no server load limit it then gave me a 500 server error..

    15. Jānis Elsts says:

      Yes, right now performance can be a problem on some servers. By default, the plugin will check links as fast as it can, which can overload a server that doesn’t have enough spare resources.

      The load limit is unfortunately very server-dependant. For example, on my server the load average usually stays below 2. If it reaches 10 or more that typically means that someone is running a brute-force attack on the WP login page.

      The best approach would be to see what the load average is when the plugin is not actively checking links, then set the limit to slightly higher than that.

    16. Tony says:

      How to get Broken Link Checker to work on WP Multisite.

      Install in the usual way.

      Go to each site in turn and Activate locally.

      If you Network Activate then you get an error message on all sites except the root one which implies something is missing from a database table. In that case Network Deactivate and continue as above.

      Now go fix those broken links!!

      Thanks to Janis for this advice.

    17. HS1972 says:

      Many thanks for a great plugin, really helped me out!

      One quick questions, is it possible to be alerted to links which re-direct to an external website’s homepage rather than the original destination page intended?

      Many thanks in advance for your help.

    18. Jānis Elsts says:

      No, there’s no way get email alerts about redirects. All I can recommend is just checking Tools -> Broken Links -> Redirects once in a while.

    19. What an excellent and indispensable plugin! I’ve recently moved my site to a new hosting provider, changed my permalink structure *and* switched to SSL, and thanks to BLC, fixing everything that broke in the process took two evenings instead of two weeks.

      One thing I’d really like is a Recheck Now item in the links under each Broken Link / Redirect in the list, in addition to the Change URL, Not Broken, Dismiss etc. links already there. The OK message usually follows fairly quickly, but I’d like to force-check a link (for instance, after I change the URL) immediately. Perhaps you could offer that option, and have it force the link to the top of the queue?

      Also, can I pay/donate? I like to spend money on things excellent.

    20. This is s great plug-in, I use this on every site I make. It is one of the top 10 SEO plugs out there for wordpress, that includes both free and paid plug-ins.

      I encourage you to keep up the good work.

    Leave a Reply