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 :
0.3.3 is at http://wordpress.org/extend/plugins/broken-link-checker/ now – thx
0.3.3 is working ok for me – no apparent conflicts w BB –
thx
RH
Hi, I’d previously reported issues above that other people experienced (slow crawl, false broken links, etc.). Incidentally, I also have Bad Behavior plugin installed, so maybe that was a reason…
Anyway, you’ll be glad to know that I tried latest 0.3.3 and it seems to be working fine now…. for me. No false broken links, no weird activation issue (message that it could not be activated because it caused “fatal error”), etc. Great.
Thanks for the fixes. And thanks for releasing one of the most useful plugins that has ever been created for WordPress! It should be part of WordPress!
I just wish there was a feature/plugin that would check author links/any links in comments. I hate promoting broken links.
0.3.3 solved the problem. Only showing the one broken link that is actually broken, no false alarms and the admin pages speed seems fine in Firefox for me. Running several bot-blockers BB, Sabre, etc. and nothing clashing. Yeay
I tried this plugin but its giving me 408 Request Timeout all the time. What am I doing wrong? I mean its taking down my entire website. Any help would be appreciated.
moserw
http://www.nela.in/
@moserw : Maybe your hosting just can’t handle it. I don’t know of anyone who’s had a similar problem :/
[...] Broken Link Checker 0.3.3 – Scanează tot blogul după linkurile care nu mai sunt bune.In felul acesta pot să vad ce nu mere şi ce merge pe site incât să fac blogul fara probleme. [...]
[...] Alex King seems to be a much better programmer than Denis de Bernardy). I combine that with the broken-link-checker plugin to provide the functionality I was always missing with smartlink – an ability to automagically [...]
[...] Broken Link Checker 0.3.3: Does what it says. When I began, I did not know Yahoo didn’t keep its URLs, and the Marines don’t either. So, I have a lot of broken links. Nice thing is, if the link is broken, it displays with a line through it. [...]
it might be an idea to add a notice or remove the download link, of the older version … it had me confused for a bit !
blc is great but its shows me every email-adress as broken link. Is there a feature not to look for emails but only for homepages?
Not yet, but I’ll add something soon. I’ll just make it ignore “mailto:” links.
[...] Dịch từ: http://w-shadow.com [...]
this is a wonderful idea !
[...] Broken Link Checker for WordPress Plugin (tags: wordpress plugin wp-plugins) [...]
A very useful plugin!
I have found one small hitch though: I have a number of code examples (enclosed in
) which display links as code rather than being real links, if you see what I mean. Is there any chance of ignoring them?Thanks.
Yes, that seems doable. I’ll add it in the next version.
By the way, if you want the <code> tags show up in the comments here, you’ll have to write the angle brackets as < and >
While I don’t have the means to donate, I have put this plugin on my ‘whats new’ page and suggested WP users get it and install it.
I had to reinstall wp a few months ago after I hiccuped the mysql database. Many of my pages have links on the page to other parts of the blog. I felt just the category listing would mean too many clicks for viewers. So… the static links I had were out of sequence. I had corrected over 100 by hand over 3 months. This plugin found all of the remaining bad links I had been searching for in less than a day, 120 of them.
Thanks for a great plugin !
Thank you
[...] currently into the broken link hunt here at Deuts.NET. Thanks to the Broken Link Checker plugin by Janis Elsts, finding those broken links is a breeze. Two years into blogging, there will [...]
[...] Broken Link Checker der im gesamten Blog auf defekte Links prüft, funktioniert leider noch nicht. Er lässt [...]
Truly excellent. A sincere thank-you.
[...] Broken Link Checker [...]
I had moved a lot of my photos in my gallery which my blog has about 100 links to, therefore I probably have about 100 broken links. However there seems to be a limit to how many you can see on the broken link page. After you have fixed those it doesn’t show the other broken links.
So right now it says I have 26 broken links but my broken links page is blank. I did fixed 20 of them yesterday (it said there was 46 broken links then). I tried clearing cache and logging out but the page is still blank. So how do I fix the other 26 broken links?
[...] tome diversas ações a respeito. Trata-se do “Broken Link Checker“, desenvolvido pelo W-Shadow.com, o qual já está instalado e funcionando aqui no Open2Tech. [...]
There is no hard-wired limit to how many links the page will display.
Do you mean that it says somewhere that you have 26 broken links, but doesn’t display them on the “Broken Links” page (even after you refresh it)? I can’t think of any way that could happen.
A few things that might provide some clues :
* If you delete a post, all the broken links from that post will be gone, too (as you’d expect).
* When you edit a post all of it’s links (even those that you didn’t change) are removed from the “Broken Link” list and re-checked as soon as possible. This may take a while if there are a lot of links to check.
* Theoretically, in very rare circumstances, it is possible for the broken link table become desynchronized from the “posts” table. In this case, deactivate the plugin, activate it again and click “Recheck All Links” in the “Options -> Link Checker” page. This is pretty much the same thing as reinstalling the plugin, and should fix any discrepancies.
[...] Broken Link Checker 0.3.5 » Janis Elsts (url) Checks your posts for broken links and missing images and notifies you on the dashboard if any are found. [...]
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
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…
[...] 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. [...]
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?