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 -
- Download (see below).
- Unzip.
- Upload the broken-link-checker folder to you wp-content/plugins directory.
- Activate the plugin in the Plugins tab.
Upgrading
- Deactivate the plugin (important!).
- Do steps 1.-3. from “Installation”.
- Upload the broken-link-checker folder to you wp-content/plugins directory.
- Re-activate the plugin in the Plugins tab.
Download
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.
Related posts :
im thinking more along the lines of an auto responder to me which includes post title. ive found a couple of options but can’t get either working for 2.7.1
This one shows the link, but notification doesn’t appear in back-end. I also get errors trying to configure:
http://wordpress.org/extend/plugins/wp-report-posts/
This one looks awesome, but I can’t get the link to display on the page (display changing the incorrect syntax for < ?php . . .)
http://www.jailbait.gr/downloads/report-post.rar
Success! I followed the instructions for getting report post working here:
http://wordpress.org/support/topic/206058
works now! woot!
thanks shadow for your help
[...] appears that in WP-SpamFree 1.9.8.3 breaks Wordpress 2.7.1. It also appears that Broken Link Checker 0.4.10 breaks Wordpress 2.7.1 in the same [...]
Help! I just installed Broken Link Checker. I am running WordPress 2.7.1. Whenever I go to my wp-admin page and click on plugins, the page just hangs. I have tried it in two different browsers — FireFox and Safari.
I was able to deactivate the plugin. Is it not compatible with 2.7.1?
It should be compatible; at least it works on my 2.7.1 blogs. Some users have reported strange slowdowns this plugin may cause with various versions of WP, but I’ve never been able to pinpoint the exact cause. Maybe you have a lot of posts and it’s trying to check them all right away?
Yes, I have about 320 posts. I wish there were a way for me to use this. Checking all of these by hand is a hassle. (I recently converted from TypePad.)
in case you don’t know, your link-checker did not find the bad links in my header (only the pages).
cheers!
@johny : Yep, I know. It only checks the post/page content at this time.
Does the broken link checker check the links in the blogroll(s) (or is it planned for a future development) – ordinary users who are not admins don’t see these type of links to be anything different – they just bitch (sometimes) “It does not work” or go away from your site never to return !!
This is in the long-term To-Do list. It will probably get implemented eventually, but unfortunately I can’t give you a timescale. After all, I’m not paid to update my plugins so the updates happen whenever
[...] trata de Broken Link Checker, un plugin que comprueba en trasfondo que los enlaces de todos nuestros posts no apunten a sitios [...]
[...] Broken Link Checker [...]
There is something wrong when I deleted a post, this message occurs:
“WordPress database error:[You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near”
When I turn off this plugin, it works!
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
[...] Broken Link Checker – This plugin will monitor your blog and looks for any broken links and let you know if any broken links are found. [...]
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.
[...] Broken Link Checker [...]
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.