Broken Link Checker for WordPress

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.

Download it now! (423 KB)

Features

  • Detects links that don’t work and missing images.
  • Periodically checks links in posts, pages, comments 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.

Installation

Install “Broken Link Checker” just like any other WordPress plugin :

  1. Download the .zip file.
  2. Unzip.
  3. Upload the broken-link-checker folder to you /wp-content/plugins directory.
  4. Activate the plugin in the Plugins tab.

Download

broken-link-checker.zip (423 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.

Share :
  • Reddit
  • del.icio.us
  • Digg
  • StumbleUpon
  • DZone
  • Ping.fm
  • Sphinn
  • Twitter
Related posts :

1,243 Responses to “Broken Link Checker for WordPress”

Pages: « 1 2 3 [4] 5 6 7 8 9 10 1142 » Show All

  1. 74
    Abi says:

    Hi
    I am getting an internal error 500 since upgrading to the new version of broken links. It shows all over the palce in admin panel. I had no problems with plugin until recently it worked like a dream – see error below:

    [www.lets-makemoney.co.uk] [Sun Apr 13 18:19:04 2008] [error] [client 86.146.73.230] Premature end of script headers: wsblc_ajax.php, referer: http://www.lets-makemoney.co.uk/wordpress/wp-admin/options-general.php?page=broken-link-checker/broken-link-checker.php&updated=true

    I have had vaiorus problems wit the plugin dashboad too like plugins not auto updating on request and activating a plugin and going back to find it deactivated? I am using wp 2.5.

    Some strange behaviuor which from the sounds of this board otehrs have experienced too? Any ideas? thanks muchly :)

  2. 75
    White Shadow says:

    I think I made no changes to the wsblc_ajax.php file in the new version, so it shouldn’t be suddenly crashing now. The error message also doesn’t explain much. If it wasn’t linked to the update I’d suspect server configuration or some kind of incompatibility…

  3. [...] Broken Link Checker—A perennial problem on my (and any other) site is that it has links to many other web sites, and those web sites change over time.  The Broken Link Checker scans all new posts (and periodically scans all old posts) and reports any broken links to me, giving me the opportunity to either remove or change those links so my readers don’t get 404 errors.  Very cool. [...]

  4. 77
    shootingboard says:

    Great plugin. One problem – when I activate it, the drag & drop feature of some of my other plugins (pageMash, FAQ-tastic) stop working. Any idea why?

  5. 78
    White Shadow says:

    I guess there’s some kind of JavaScript conflict (Prototype vs JQuery). I’ll see if I can find it.

  6. 79
    onews says:

    I move my data to new host and lot of images links missing, thank to Broken Link Checker that solve my problem, thanks author for your great job.

  7. 80
    Carl says:

    Great plugin. Found a bunch of false positives, all of which are links to wikipedia, but a couple other links that were actually broken. Well worth the trade off of occasionally getting a false positive.

  8. 81
    NewMexiKen says:

    175 and counting (but I have > 12,000 posts going back 4-1/2 years).

    I’m certain I’m just missing it, but I can’t find where I “can set a different time period.” Not that I want to, I just wondered.

    Also I don’t see the strike out, which is cool, documented. Am I just missing that too?

    Good work. Thanks.

  9. 82
    White Shadow says:

    All of the options are found under Options -> Link Checker (or Settings -> Link checker if you have WP 2.5).

    The “time period” option is on that same page and is called “Check Every Post Every [X] hours”. To get the strikethrough effect you need to enable the “Broken Link CSS” option, too (I think it should be on by default) and, if you have any caching plugins, make sure the cache is refreshed.

    That should do it :)

  10. 83
    jez says:

    I get Error: Couldn’t update the post (DB error)
    on almost every second thing I want to “unlink”.

    besides, great plugin!

  11. 84
    White Shadow says:

    jez, I don’t see anything in the code that could cause this. In fact, you should never see that error message, except when the post containing the link no longer exists at the moment you click “Unlink”.

    I’ll make the error reporting a bit more verbose in the next version, but that’s all I can do for now.

  12. 85
    jez says:

    I do now get “Error: Couldn’t update the post” (with the brand new version)

  13. 86
    White Shadow says:

    If you really have the new version there should be a more detailed error message in parentheses after the basic message. Or just empty parentheses if the error was that there is no error ;)
    Eh, I don’t know.

  14. 87
    Jandry says:

    Hi, Great plugin. But it seems not to be working with wikipedia links.
    The following link is detected broken
    http://fr.wikipedia.org/wiki/Jackson_Richardson

  15. 88
    Abi says:

    Hi

    I spoke to my host and figured why i was getting error500 with this plugi. they say they do not support AJAX at moment ???? Thing is the plugin did use to work, can i revert back to an old version. Is AJAX for recent versions? I am puzzelled. All i know is it used to work and the host are saying that they have never allowed AJAX so they dont know why it did? Can you advise pelase ?

    Thanks

  16. 89
    White Shadow says:

    @Abi : The plugin has always used AJAX, since the very first version. I also find it highly unlikely that your host “doesn’t support AJAX”. After all, AJAX isn’t something that you need to enable or install server-side. Anyway, you could try to install an older version of the plugin and see if that works. You can find the previous versions here.

    @Jandry : I’ll check the link on my blog. We’ll see how this goes.

  17. 90
    jez says:

    I can confirm the wiki issue.

  18. 91
    Abi says:

    Right this is strange, i went all the way back to original version and uploaded it and it worked fine. No error 500 so i thought i would test for you all way through to see what version broke. I got all the way to the newest version which is now appearring to work fine so far??? In doing this i completely deleted the borken links directory before uploading the new version? Has this had anything to do with it now working?

  19. 92
    White Shadow says:

    To be honest, I don’t know. Maybe some of the plugin files were corrupted and reinstalling fixed it. Or maybe it’s the full moon that makes it work :)

    @Jez, Jandry : The Wiki link works on my blog. Maybe Wikipedia is blocking automated access from your site (some sites tend to do that).

  20. 93
    Blaenk Denum says:

    Hey White Shadow, first of all thanks for the plug in! The only problem is I have 160 broken links (I changed my domain name…heh) and so it becomes a hassle having to click ‘Edit Post’ for each broken link and search for the link within the post. I’m sure the majority of the people if not everyone using your plugin have around the same amount of broken links if not more, after all if it weren’t that many they wouldn’t have a use for this plugin in the first place.

    For this reason I’m wondering how feasible it would be to implement a feature with AJAX where, within the broken link list, one can click the broken link URL or something and it becomes a text box, and then once someone clicks outside of the box or a button, it changes the link that way. It would be tremendously helpful. I would do it myself but I’ve no AJAX experience let alone Javascript experience (I just occasionally hack away with my knowledge of other languages). However if you do (And I really hope you do) choose to try to implement this, I would be glad to test this it for you if you need testers. Just wondering if you’ve ever thought about that, I’m positive everyone using this plug in would benefit from this.

  21. 94
    White Shadow says:

    My AJAX experience is a bit limited, but the idea seems doable and useful. I’ll add it to my “idea file” (aptly named arrgh.txt), though I make no promises as to when it’ll be implemented.

    You see, if I immediately went after every suggestion I get for my programs, scripts and plugins, I would never get anything new done (well, I do usually fix reported bugs ASAP). So it might take a while for me to get around to it. I’m sure you understand ;)

  22. 95
    Blaenk Denum says:

    Yeah I do, maybe in that time I’d have learned AJAX and done it myself :P But I’m glad you think it’s a good idea anyways and have added it to your todo list, though I’m curious as to how you couldn’t have thought of it before :P Really though, it’s obvious that it would make your plugin truly complete. Thanks for the consideration!

  23. 96
    White Shadow says:

    Complete, you say? Ah no, not even close. To be “complete” it would need to do at least the following :
    * Also check for missing CSS files.
    * And missing JavaScript.
    * Check blogroll links.
    * Check links in comments.
    * Actually, check all links.
    * Have a link checking function that doesn’t trigger any bot detectors.
    * Gracefully handle “soft” 404 – when a site doesn’t send the expected 404 Not Found HTTP response, but displays a search page or something like that instead.
    * Work without CURL (for compatibility).
    * And so on (ad infinitum?).

    There are always more ideas than there is time (or enthusiasm, or skill) :P

  24. 97
    Blaenk Denum says:


    * Also check for missing CSS files.
    * And missing JavaScript.”

    I understand your enthusiasm but this doesn’t necessarily have to be in a broken LINK checker, as broken link checker implies hyperlinks, nevertheless it would be a great feature.

    Really though, not trying to nag you or anything, but wouldn’t this be a simple thing to do? Just take a look at the code in 2.5 that handles the following: when you go to write a post, it automatically generates a post slug under the post title. You can click on this slug and it’ll turn into a box with which you can change the post slug. Just use this same code to do the box thing. Then in the manner that you found the link within the post (Regex? Or did you hook onto a WP function? I’ll look at the plugin code later), change the link within the post.

    I might try and hack something together later, I’ll give you whatever I could come up with, if anything.

  25. 98
    White Shadow says:

    It’s regexps + some hooks to know when a post if modified. You’d probably need to access the DB directly to modify a post (there’s probably an internal function for that, but I’ve found the documentation pretty spares in this regard).

    I have a general idea of how to do the box thing at the moment… And sure, feel free to send me any code you might come up with.

  26. 99
    Alexey says:

    Thank you very much!

    This is a great plugin and made possible to for me to check and fix more than 3000 pages with 9000 links.

    Is there a possibility to start it as cron job?

  27. 100
    White Shadow says:

    Not in the current version, but if you know PHP, it should be pretty easy to modify wsblc_ajax.php to work with cron. You’d need to slightly modify it so that wsblc_ajax.php?action=run_check doesn’t require the user to be logged in.

    I’m not going to add official cron support to the plugin because many users don’t have the option to use cron.

  28. 101
    Alexey says:

    Thank you a lot! I will do it with wsblc_ajax.php. Have a nice weekend!

  29. 102
    Bert says:

    Hello,
    First off thank you very much for writng this plugin, great idea! The plugin was working great. But now the pages are not redirecting. In Explorer the pages gets hung up indefinitely, in Firefox it gives this error.

    The page isn’t redirecting properly
    Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
    * This problem can sometimes be caused by disabling or refusing to accept
    cookies.

    Any ideas of what could have happen? Are there plugins not compactable with Link Cloaker?

    Thank you VERY MUCH for your time.

    Bert

  30. [...] using any widgets, but… I am using a few plugins: the Broken Link Checker and the Dashboard Widget Manager. (The latter let’s you clear stuff you don’t want to look at out [...]

Pages: « 1 2 3 [4] 5 6 7 8 9 10 1142 » Show All

Leave a Reply