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 :
This is an excellent plugin, I’ve included it in my must-have maintenance Wordpress plugins list at:
http://www.howtomakemyblog.com/how-to-set-up-a-blog/must-have-wordpress-blog-maintenance-plugins/
Thank you for the wonderful plugin!
I tried it out for a few days and it was working well (and even helped me find a couple of links that had recently changed. However, it is now reporting a status of “Error: You can’t do that. Access denied.” while logged in as an Administrator. Any suggestions?
@Lance – That’s strange. I recently updated the plugin and changed what capabilities are needed to see/edit broken links : now it’s “edit_others_posts”. Administrators should have this capability by default and I haven’t encountered any problems with my two blogs (WP 2.6.3 and 2.7-almost-beta).
Are you using the latest version of WP? Also, can you still access the Manage -> Broken Links page?
I am running the latest plugin version, am using WP 2.6.3 and can access Manage -> Broken Links. It did stop working a couple of days ago, perhaps this is when I upgraded the plugin. I will email you with a few more details. Thank you!
You were right; after logging out and back in, everything is now working. Thank you so much for your assistance!
[...] Broken Link Checker for WordPress – As your blog gets more and more posts, it can be difficult to go back and look for what has broken with time. This plugin will check images and links and notify you via the dashboard when it locates something. [...]
هذه هي بلدي وليس من المستغرب بعد ذلك ، ولكن بفضل..
I have been using your broken link checker plugin on a few WP sites and it seems to be randomly putting a strikethrough line through some of my affiliate links. At least that is what the developer of the paid for link cloaker says. So I’m going to leave your plugin active until the next time an affiliate link gets the strikethrough and then I will deactivate it to confirm if it is in fact the culprit. Has anyone else had this same problem?
[...] para determinadas palavras-chave. Se por ventura utiliza Wordpress, procure instalar o plugin Broken Link Checker, que faz uma análise completa ao seu blog, detectando imediatamente links que não consegue seguir [...]
@Steve – Yes, the plugin will show a “strikethrough” line on links it considers broken. You can turn off this feature by going to Settings -> Link Checker and unchecking the “Apply class=”broken_link” to broken links” box.
Great plugin!
Congratulation an thaks from Brazil!
@White Shadow –
Okay great! That is good to know and thanks for taking the time to reply!
Hi,
Been using your plugin for a little while now and have found it very handy (especially when I moved my blog about six months ago).
I have a question:
I would like to display the number of broken links on a stats page I have put together and basically want to show my readers the number of broken links on my blog.
Any ideas?
R
@Robert@PNG – Hmm, it can be done, but probably not easily. There isn’t any built-in API useful for this purpose.
In a nutshell, you can get the number of broken links by running this MySQL query : “SELECT count(*) FROM [linkdata_name] WHERE broken=1″, where “[linkdata_name]” is the name of the plugin’s link metadata table (usually it is “wp_blc_linkdata”).
I don’t know if this helps any
That did the trick mate!
Thanks,
R
@AJ –
I’m having the same problem. I have WordPress 2.6
So you have Wp plugin too!!!
Man you’re so great
Thnx for this useful plugin ..
regards
[...] Broken Link Checker – Der Broken Link Checker Überprüft automatisch auf tote Links und zeigt diese ggf. im Dashboard an. [...]
[...] Check for broken links Search engines and your blog readers do not like broken links so use the Broken Link Checker WordPress plugin to check for broken [...]
[...] Broker Link Checker überprüft alle Links in den Beiträgen ob diese noch vorhanden sind oder nicht und markiert oder deaktiviert diese dann auf Wunsch automatisch. [...]
G’day from Australia
Have you been getting any problems with this plugin on GoDaddy Hosting? I have a couple of blogs (2.65 and 2.7) and they are both failing on GoDaddy.
My other blogs on other hosting servers are fine.
Any ideas.
Dave
@David from the Jewelry Appraisal Center – What kind of problem are you having exactly?
@White Shadow – G’day again and many thanks for your swift reply.
When I first installed it there was a FATAL ERROR – probably due to activating 2 plugins at the same time. Once I did them one at a time it seemed to just hang but eventually (after kicking me out of the Admin area and asking me to download the edit file?) I managed to get back in.
Everything was extremely slow – but with some patience (I went for coffee) found it was simply checking all my posts and links. There were 79 broken links – Wow and I thought I had everything under control
Now all is well and so I put it down to PHP4 on GoDaddy PLUS two plugins clashing.
Many thanks anyway – great plugin.
Dave.
@Dave at the Jewelry Appraisal Center – Hmm, yes, it can slow down the site for some users, but I haven’t been able to figure out why. Glad to hear it’s working now.
[...] Broken Link Checker – Este plugin faz-me lembrar a minha avó: podia estar um calor do caraças, mas quando eu saía de casa dizia-me sempre para levar uma camisola porque «pode fazer frio». O Broken Link Checker examina todos os links existentes nos teus posts e informa-te quais os que se encontram inválidos, incluindo alguns que estão a funcionar bem. Tens a opção de editar a morada e corrigi-la sem necessidade de abrir o post, de «esquecer» o assunto quando refere como inválido um link válido (mas depois o falso alarme regressa) ou simplesmente remover o link. É uma ferramenta interessante se fores um tipo picuinhas como eu, mas de vez em quando exagera e é preciso muita paciência. [...]
[...] Broken Link Checker for WordPress | W-Shadow.com (tags: tools wordpress web plugin plugins php 404 brokenlink) [...]
[...] Broken Link Checker [...]
[...] Broken Link Checker - Checking broken links can be a tedious chore and this plugin makes this task simple by checking [...]
[...] Broken Link Checker ; Another must have for siteowners everywhere. This plugin basically goes through EVERY single link there is on your site and checks to see if it’s broken. If it is, it gives you a handy dandy table to where you can select to whether you would like to unlink it or even discard it, all without having to actually edit the page. A lifesaver! [...]
[...] Broken Link Checker – A handy little tool which regularly checks all of the links on your blog and warns you of any broken ones. Includes a handy interface to change or unlink broken links without editing the full post or page. It does struggle with some redirected links but that’s not really the fault of the plugin. [...]