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. Great plugin! I especially love the email alert system, and how you can change a broken URL once from the plugin admin page and it will fix all occurances of it on your site automatically!

      I wrote a small review of it here… http://cladlab.com/programming/website-design/wordpress/wordpress-plugins-that-this-site-uses

    2. Very much appreciate your site. It has always worked, but recently I added a private page and loaded an imperfect URL link to test it. It hasn’t notfied me of the broken link. I did check private page and every 24 hrs.
      Thank you

    3. @John Ashbaugh, I had this problem too. It could be that the “Only Run When Server Usage Is Below” option if set to low.

      I found that the default was too low and that Broken Link checker never ran. It is changed in the settings page for Broken Link Checker.

    4. […] Broken Link Checker – Verifica e notifica-te se tiveres links quebrados no teu blog. […]

    5. […] Broken Link Checker – Will check for broken links and send you notifications according to your settings. […]

    6. MUrech says:

      something like your tool, I always searched! What a good thing! Thank you!

    7. yaleman says:

      It seems like there’s a bug in the latest version, or incompatibility with wordpress 3.5.1. Any ideas? Doing the deactivate/reactivate makes it “work” for a couple of hours – probably just until it updates again 🙁

      Broken Link Checker installation failed. Try deactivating and then reactivating the plugin.

      Installation log follows :
      Plugin activated at 2013-05-10 21:51:33.
      Installation/update begins.
      Upgrading the database…
      Database schema updated.
      Database successfully upgraded.
      Cleaning up the database…
      … Deleting invalid container records
      … 5 synch records deleted
      … Deleting invalid link instances
      … 5 instances deleted
      … 0 more instances deleted
      … Deleting orphaned links
      … 4 links deleted
      Notifying modules…
      … Updating module cache
      … Notifying module “http”
      … Notifying module “link”
      …… Parser “link” is marking relevant items as unsynched
      …… Executing query: UPDATE wordpress_blc_synch SET synched = 0 WHERE (container_type = ‘page’ AND last_synch >= ‘1970-01-01 00:00:00’) OR (container_type = ‘post’ AND last_synch >= ‘1970-01-01 00:00:00’) OR (container_type = ‘comment’ AND last_synch >= ‘1970-01-01 00:00:00’)
      …… 723 rows affected
      … Notifying module “image”
      …… Parser “image” is marking relevant items as unsynched
      …… Executing query: UPDATE wordpress_blc_synch SET synched = 0 WHERE (container_type = ‘page’ AND last_synch >= ‘1970-01-01 00:00:00’) OR (container_type = ‘post’ AND last_synch >= ‘1970-01-01 00:00:00’) OR (container_type = ‘comment’ AND last_synch >= ‘1970-01-01 00:00:00’)
      …… 0 rows affected
      … Notifying module “metadata”
      …… Parser “metadata” is marking relevant items as unsynched
      …… Executing query: UPDATE wordpress_blc_synch SET synched = 0 WHERE (container_type = ‘custom_field’ AND last_synch >= ‘1970-01-01 00:00:00’)
      …… 0 rows affected
      … Notifying module “url_field”
      …… Parser “url_field” is marking relevant items as unsynched
      …… Executing query: UPDATE wordpress_blc_synch SET synched = 0 WHERE (container_type = ‘comment’ AND last_synch >= ‘1970-01-01 00:00:00’)
      …… 0 rows affected
      … Notifying module “comment”
      …… Deleting synch. records for removed comments
      …… 0 rows affected
      …… Creating synch. records for new comments
      …… 32 rows affected
      … Notifying module “post”
      …… Deleting synch records for removed posts
      …… 0 rows deleted
      …… Marking changed posts as unsynched
      …… 0 rows updated
      …… Creating synch records for new posts
      …… 0 rows inserted
      … Notifying module “page”
      …… Skipping “page” resyncyh since all post types were already synched.
      … Notifying module “dummy”
      Updating server load limit settings…
      Optimizing the database…
      Completing installation…
      Configuration saved.
      Installation/update completed at 2013-05-10 21:51:34 with 31 queries executed.

    8. I am having that same issue Yaleman. A fresh install of the plugin didn’t change anything. Could potentially be a conflict with another plugin too perhaps?

    9. Jānis Elsts says:

      So it appears to work for a few hours, but then displays an installation error? That’s pretty unusual. I would expect it to throw an error right away if installation/update failed. Also, the installation log itself looks completely fine, no error messages or anything.

      It seems unlikely that the last update could have caused this – it was a minor patch with no big changes – but just to be sure, try installing an older version and see if it the error disappears. You can download older versions here:
      http://wordpress.org/extend/plugins/broken-link-checker/developers/

    10. MichaelBoots says:

      I’m having this problem too.
      Every time I go away from my website to write offline and come back hours later or the next day I find the same message.
      I have made no changes in plugins, updates etc since well before it started happening.
      Fabulous plugin apart from that.
      You don’t seem to have a donate button. I like to give $5 each year to each developer of a plugin that I use.

      Michael

    11. ellen says:

      I’m having the same experience, although it’s only happening on one of my websites. The other 2 seem to be OK.

    12. I am seeing this problem too on 2 blogs. It has worked fine until now. Reinstall has not helped.

    13. ellen says:

      I spoke too soon. It’s happening on all my WP sites and reinstall only helps for a short time.

    14. ellen says:

      This is the message I’m getting:

      Broken Link Checker installation failed. Try deactivating and then reactivating the plugin.

      Installation log follows :
      Plugin activated at 2013-05-12 12:35:01.
      Installation/update begins.
      Upgrading the database…
      Database schema updated.
      Database successfully upgraded.
      Cleaning up the database…
      … Deleting invalid container records
      … 0 synch records deleted
      … Deleting invalid link instances
      … 0 instances deleted
      … 0 more instances deleted
      … Deleting orphaned links
      … 0 links deleted
      Notifying modules…
      … Updating module cache
      … Notifying module “http”
      … Notifying module “link”
      …… Parser “link” is marking relevant items as unsynched
      …… Executing query: UPDATE wp_blc_synch SET synched = 0 WHERE (container_type = ‘page’ AND last_synch >= ‘1970-01-01 00:00:00’) OR (container_type = ‘post’ AND last_synch >= ‘1970-01-01 00:00:00’) OR (container_type = ‘comment’ AND last_synch >= ‘1970-01-01 00:00:00’)
      …… 92 rows affected
      … Notifying module “image”
      …… Parser “image” is marking relevant items as unsynched
      …… Executing query: UPDATE wp_blc_synch SET synched = 0 WHERE (container_type = ‘page’ AND last_synch >= ‘1970-01-01 00:00:00’) OR (container_type = ‘post’ AND last_synch >= ‘1970-01-01 00:00:00’) OR (container_type = ‘comment’ AND last_synch >= ‘1970-01-01 00:00:00’)
      …… 0 rows affected
      … Notifying module “metadata”
      …… Parser “metadata” is marking relevant items as unsynched
      …… Executing query: UPDATE wp_blc_synch SET synched = 0 WHERE (container_type = ‘custom_field’ AND last_synch >= ‘1970-01-01 00:00:00’)
      …… 0 rows affected
      … Notifying module “url_field”
      …… Parser “url_field” is marking relevant items as unsynched
      …… Executing query: UPDATE wp_blc_synch SET synched = 0 WHERE (container_type = ‘comment’ AND last_synch >= ‘1970-01-01 00:00:00’)
      …… 0 rows affected
      … Notifying module “comment”
      …… Deleting synch. records for removed comments
      …… 0 rows affected
      …… Creating synch. records for new comments
      …… 0 rows affected
      … Notifying module “post”
      …… Deleting synch records for removed posts
      …… 0 rows deleted
      …… Marking changed posts as unsynched
      …… 0 rows updated
      …… Creating synch records for new posts
      …… 0 rows inserted
      … Notifying module “page”
      …… Skipping “page” resyncyh since all post types were already synched.
      … Notifying module “dummy”
      Updating server load limit settings…
      Optimizing the database…
      Completing installation…
      Configuration saved.
      Installation/update completed at 2013-05-12 12:35:01 with 31 queries executed.

    15. Jānis Elsts says:

      Has any of you tried re-installing the previous version yet (see the link in my previous comment)? If that fixes the problem it will at least narrow down the possible sources of the error to the changes made in the newest release.

      Also, you can try installing this version:
      http://w-shadow.com/files/broken-link-checker-debug2.zip

      It will add more debugging information to the error message. I’m particularly interested in the first four lines.

    16. MichaelBoots says:

      Before I reinstall, which I am happy to do, I need to point out that when it says
      Broken Link Checker installation failed. Try deactivating and then reactivating the plugin.

      It has not just been installed. It has been there for months.
      Is it uninstalling itself? Doe it have to “reinstall” to run its link checking routine?
      That might be where the problem starts
      M

    17. Jānis Elsts says:

      The plugin runs an installation script when you activate it. Even if it has been installed before and you just deactivate and re-activate it, BLC must run some checks to make sure that it’s database tables are still up to date and so on.

      The “installation failed” message usually means that the installation script failed. However, that doesn’t seem to be the case this time since the installation logs other users have posted look perfectly normal – there are no error messages or anything else suspicious. So I’m at something of a loss as to what could be causing it.

    18. Noisegate95 says:

      I can confirm that re-installing 1.7 has removed this error.

    19. MichaelBoots says:

      I can also confirm that installing 1.7 instead of 1.7.1 has solved it.
      And I found the donate button in the plugin.
      Thanks
      M

    20. Todd says:

      Rolling back to 1.7 also fixed it for me. Here’s the link http://downloads.wordpress.org/plugin/broken-link-checker.1.7.zip

      Thanks again!

    Leave a Reply