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 :
- Download the .zip file.
- Unzip.
- Upload the
broken-link-checkerfolder to you/wp-content/pluginsdirectory. - 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.
Related posts :
Wow, looks like this bug has been present since the first release and nobody spotted it till now
I’ll upload a fixed version; you should see the upgrade notice in 12 hours or so.
[...] Broken Link Checker [...]
Thanks for the update, my site is now showing no broken links at all, which is what I hoped for! Its great to see an author respond so swiftly to bug reports.
Great Job for the update! Swiftly done!
Now I found this error when trying to edit a post:
Warning: join() [function.join]: Bad arguments. in …/plugins/broken-link-checker/broken-link-checker.php on line 323
I’m not quite sure why that happens, but 0.4.13 might fix it. You can download the update from the link in the post, or wait for the update notification.
I have just noticed this error message on my dashboard
“You don’t have permission to access /wp-content/plugins/broken-link-checker/wsblc_ajax.php on this server.”
I don’t think I’ve changed anything regarding BLC – tried to upgrade to the latest version but I still get the same message. I’m not sure if this means that BLC does not work – there are no reports of broken links .
Judging by the error message, I don’t think this is a BLC problem. Something – like a security-oriented plugin or something in .htaccess – might be blocking the access to that file.
Nice plugin!!!
Any chance that you will add localization to it? That would be nice!
Is there a changelog published somewhere on the net, where users can review changes before upgrading to a new version?
@ BLC : Yes, see the revision log.
@ Georg : Perhaps someday
Great job! I’m amazed at your working phase
I just found this recently, all the link directing toward en.wikipedia.org is deemed as broken link (it has a strikethrough line in it). Please see it here:
http://netsains.com/2009/03/kalah-teknologi-iphone-tak-laku-di-jepang/
I remember ‘discard’ a link to wikipedia once, but after that I’ve done nothing regardless.
Wikipedia probably thinks the plugin is a suspicious bot and blocks it. There’s not much I can do about it – a big site like Wikipedia will probably have very sophisticated bot traps.
You can add Wikipedia to the exclusion list in Settings -> Link Checker if you don’t want to see those false positives anymore.
The plugin breaks the layout of the admin page when used with PHP 5. I’ve uploaded a screenshot here if you’d like to see.
I use PHP 5.2.6 and I don’t see any problems, Richard. Are you sure that it is not another plugin that causes it?
Same here, I use PHP 5 both on my dev machine and on this site and the plugin works fine. Are there any PHP error messages in the HTML?
[...] I moved my wife’s blogger blog to WordPress I needed a way to check for broken links and the Broken Link Checker for WordPress plugin helped me identify all the broken links I needed to check into and fix. It provides a list [...]
I’ve deactivated all other plugins and still get the same problem, only when running PHP 5 but not PHP 4. Sorry, how would I check for PHP error messages?
View source and search for any mentions of “error” or “warning”. My guess is that there’s an error message generated somewhere that breaks the HTML and makes the page render incorrectly.
[...] Found and removed all those broken/dead links thanks to Nile for mentioning this plugin. [...]
[...] 関係ないけど、Broken Link Checkerプラグインが切れてないリンクを デッドリンクとして認識しまくって困っている。 今日新しいバージョンが出ていたから更新したけど、改善されてるかなぁ? [...]
[...] Si vous voulez diminuer votre taux de rebond et améliorer votre référencement, il est indispensable de contrôler les liens entre articles. Pour cela il suffit d’installer ce plugin : Broken Link Checker for WordPress [...]
[...] تقوم بهذا العمل في الووردبريس وهذه هي صفحة الإضافة Broken Link Checker [...]
[...] 違うんだ、あたしがやりたかったのは、昨日紹介したBroken Link Checkerの もっと精度のいいプラグインを入れたかっただけなんだ。 何もリダイレクトとかまでBad Linkと決めつけたかったんじゃないんだ。 くっ…。 [...]
any hints on how to show redirect-pages 302/303 as broken links?
$result['okay'] = (($code>=200) && ($code=200) && ($code<300)) || ($code == 401); is not working.
Off the top of my head :
This will treat all 3XX codes as indicating broken links. The RFC says those are all some form of redirect, so the code should do what you want.
Thanks a bunch!Works sweeeet!Thank you so much,great plugin,love your site!
Btw,do you know if this plugin consumes a lot of bandwidth when checking links?I need to check about 4500 links every 24 hours.Thanks in advance.
It tries to use only HEAD requests (when possible); that is, it asks the target server whether the page exists and doesn’t try to actually download it. This uses very little bandwidth. However, it will double-check each broken link and use more bandwidth for them.
Okay thanks,plugin works great