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! (40 KB)

Note : This page, and the feature list below are slightly out of date as a major update has been released recently (see details). I’ll get around to updating this page eventually.

Features

  • Checks your posts (and pages) in the background (whenever the WP admin panel is open ).
  • Detects links that don’t work and missing images. Checks both internal and outbound links.
  • Notifies you on the Dashboard if any problems are found.
  • Link checking intervals can be configured.
  • New/modified posts are checked ASAP.

The broken links show up in the Manage -> Broken Links tab. If any invalid URLs are found a notification will also show up in the sidebar on the Dashboard.

The Broken Links tab displays a list of invalid URLs found along with the relevant posts and the anchor text of the links. “View” and “Edit Post” do exactly what they say and “Discard” will remove the message about a broken link, but not the link itself (so it will show up again later unless you fix it; this plugin doesn’t modify your links).

By default all old posts/links are re-checked every 72 hours, or you can set a different time period.

Notes (Semi-Technical)
I realize there’s a lot of features that could be added to improve this plugin considerably. However, this release is intended to “test the waters” and see if there’s demand for a plugin like this, so I only implemented the most basic functions. The plugin has been upgraded to be slightly beyond “basic” ;)

I thought about using WP’s pseudo-cron to run the link checker by schedule and decided against it. AFAIK the cronjobs execute when a page is requested; since this plugin does some lengthy processing it may increase page load times unacceptably when used in this manner. That’s why I set it to run the checks asynchronously (AJAX) and invisibly in the admin panel.

Installation
Just like any other WordPress plugin -

  1. Download (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.

Upgrading

  1. Deactivate the plugin (important!).
  2. Do steps 1.-3. from “Installation”.
  3. Upload the broken-link-checker folder to you wp-content/plugins directory.
  4. Re-activate the plugin in the Plugins tab.

DownloadCC-GNU GPL
Version 0.5.3 : broken-link-checker.zip (40 Kb)

Requirements

  • WordPress 2.7 or later
  • MySQL 4.1 or later

Starting with version 0.5 this plugin is only compatible with WordPress 2.7 and up. Older versions (e.g. ver. 0.4.14) should work with WP 2.1 – 2.6.x.

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

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

Pages: « 126 27 28 29 30 [31] 32 33 34 35 36 » Show All

  1. 901
    White Shadow says:

    In theory, all you need to do is enter the name of the custom field in the “Custom fields” box on the plugin’s configuration page.

    If that doesn’t work then most likely the custom field is in a format that can’t be parsed by this plugin. It only understands custom fields that contain nothing but the link URL (for multi-line fields the URL should be on the first line).

  2. 902
    JM Snyder says:

    Well, I think part of the problem is I’m not sure what the field name is. I used another plugin to create a custom write panel, and the field name is “Purchase Link.” If I put that in the Custom Fields box, it tries to put it on two lines.

    I’ve looked at the MySql table and at the Post page but can’t figure out what the actual field code is. I guess I’ll just fiddle around with it until I get it to work. Thanks though! :)

    J.M. Snyder

  3. 903
    White Shadow says:

    Point of interest – you could get a list of all custom fields used on your blog with this SQL query :

    SELECT DISTINCT meta_key FROM wp_postmeta

    (This assumes you table prefix is wp_)

  4. 904
    JM Snyder says:

    Unfortunately the space in my custom field name (Purchase Link) still makes the plugin separate both words onto different lines. Thanks for all your help!

  5. 905
    JM Snyder says:

    Just an FYI ~ I went back and changed the name of my field to Purchase_Link (with an underscore) and it works now. Thanks for the awesome plugin! And for all your help! I’ll be donating a little something to you via Paypal for your help and effort!

    Happy holidays!

  6. [...] Broken Link Checker : Un plugin che consente di individuare subito eventuali errori generati da link rotti (i temuti 404) e di correggerli evitando penalizzazioni dai motori di ricerca. [...]

  7. 907
    Henrik says:

    I guess this has been requested before but can you check comment link as well? I had people commenting my post 3-4 years ago and probably allot of those blogs have been taken down or change url by now.

    Super nice plugin hope you keep supporting it.

  8. [...] Link Checker 0.7 – Now With Search & Filters Behold, a new version of the Broken Link Checker plugin for WordPress is available! This release includes the routine batch of bug fixes, two new translations (Spanish [...]

  9. 909
    dave l says:

    just curious, is “broken link” checker Broken? it seems as if every day I have to upgrade it to a newer version? I do not always check my plugins every day. will this be a problem for this plugin.?

  10. 910
    White Shadow says:

    @ dave l : The core functionality is pretty stable. Most of the updates consist small improvements suggested by users (e.g. using Esc/Enter in the “Edit URL” box, localized date display, and so on) and fixes for rare bugs (e.g. redirect detection failing when the server has a buggy version of cURL). You will not lose much if you don’t install the update(s) immediately.

    Personally, I think periodic updates is a good thing. They show the plugin is up-to-date and actively supported.

    @ Henrik : Yes, that’s been suggested before. I guess I’ll have to move it closer to the top of my to-do list.

  11. 911
    Rudi says:

    Thanks for creating this plugin.

    This plugin make my work more easy….

    CAN I REQUEST A NEW FEATURES?
    Can you add some features for check and fix broken link on comment page?
    Thanks before

  12. 912
    Guide Delini says:

    Thanks a lot for your plugin.
    I have two requests:
    1 – I use the PODS plugin which allows to add custom pages : is it possible to check links in PODS? or in other page…
    2 – When using the broken link checker, the referrer is set to the domain name; is it possible to set the referrer to the page where the link is found? Otherwise, the external site may think it is spam referrer. Moreover, if the referrer is set with the page where the link is, you may win some links back. Good for SEO.
    But again, great plugin!

  13. [...] a lot of development, and some features definitively need improvement, but it’s very useful. Broken Link Checker for WordPress | W-Shadow.com VN:F [1.7.6_1010]Rating: 0.0/10 (0 votes [...]

  14. 914
    White Shadow says:

    @ Rudi : Yes, it’s on my to-do list ;)

    @ Guide Delini : I’ll take a look at PODS, but no guarantees. Using the post URL as the referrer might be doable, but it would further increase the plugin’s resource usage (if only slightly).

  15. [...] Installed the Broken Link Checker on all of my sites. Now, I will automatically know if any links are [...]

  16. 916
    Asmodiel says:

    Hi there!

    As i stated before, the plugin has problems with the temp dir on open_basedir affected systems. I like your idea of the error catching (about line 2790, core.php) but it only works when i first check the ini_get(‘upload_tmp_dir’), because the other one throws the same error because you aren’t even allowed to check whether a folder is writable when it’s outside the open_basedir.

    So you just have to change the order of the two if()s.

    Thanks,
    Asmodiel

  17. 917
    White Shadow says:

    “Neveeer!”
    * Runs off laughing maniacally *

    But seriously, that sounds like a bug in PHP, and I’ve still got a few ideas about how to work around it. Try the latest development version.

  18. [...] solch ein Unterfangen ganz erheblich erleichtern: Search & Replace von Frank Bültge und der Broken Link Checker von Janis Elsts, um mal die beiden wichtigsten zu nennen, die mir heute den Tag gerettet haben. [...]

  19. 919
    FizzyPopMan says:

    Hi.

    First of all… great plugin. Thanks!

    Just to let you know, I did the automatic upgrade today and I got the “can’t create a lockfile” error message (not sure why as the directory was writable). Anyway, I uninstalled the plugin, downloaded the new version from the Wordpress site, and it now works fine.

    Just thought you might want to know!

    Cheers
    Fizzy

  20. 920
    White Shadow says:

    I changed around some of the code that detects if a directory is writable, so I guess I might have introduced a new bug. Let me know if it happens again.

  21. 921
    Asmodiel says:

    Wow, you finally managed it to purge all bugs from the activation and installation on a open_basedir affected server!
    Thank you, now I don’t have to change the file manually each update :)

    Asmodiel

  22. 922
    SCMG says:

    Greetings…

    I have the same error as “fizzy” above:

    Broken Link Checker can’t create a lockfile. The current temporary directory is not accessible; please set a different one. Details.

    I can’t seem to get it to relinquish – I’ve completely uninstalled / removed – and reset up – to no avail… any suggestions ???

  23. 923
    White Shadow says:

    So the new “writability-detection” algorithm works on sites where it didn’t work before (e.g. Asmodiel’s) and doesn’t work on sites where it did (Fizzy & SCMG).

    I’ll modify the plugin so that it only uses the new algorithm when open_basedir is set, as in Asmodiel’s case. An update should be out soon.

  24. 924
    PK says:

    Hi, when i use the plugin it tells me: Broken Link Checker can’t create a lockfile. Even after i create a new directory, made it writable, i get the same message, what could it be? no debug info, everything is working, curl,snoopy all of that………what could it be?

  25. 925
    White Shadow says:

    Do you have the latest version (0.7.2)? If not, wait until you get the update and then try again.

  26. 926
    PK says:

    yes latest version…

  27. 927
    White Shadow says:

    Hmm, I don’t see why that would happen. What’s your lockfile location? Is open_basedir set on your server? (you can find out by going to Settings -> Link Checker and clicking “Show debug info”).

  28. 928
    PK says:

    lockfile location /public_html/wp-content/lockfiles

    open_basedir is on, i just encountered another problem, it gets stuck after checking half of the links, now it does nothing, i set max exucution time to 600 but no luck…

  29. 929
    White Shadow says:

    So you’re using a custom directory for the lockfiles?

  30. 930
    PK says:

    yes because after activating the plugin i got imidiatly the message: Broken Link Checker can’t create a lockfile. First i made the blc directory writable but that had no affect then tried a custom path, also no affect.

Pages: « 126 27 28 29 30 [31] 32 33 34 35 36 » Show All

Leave a Reply