Broken Link Checker for WordPress
Notice: This plugin has been transferred to ManageWP. I am no longer working on it. Please direct any feedback to the new developer. See the plugin homepage for more information.
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.
Features
- Detects links that don’t work, missing images, deleted YouTube videos and other problems.
- Periodically checks links in posts, pages, comments, custom fields 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.
Download
broken-link-checker.zip (412 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.
Installation
Install “Broken Link Checker” just like any other WordPress plugin :
- Download the .zip file (see below).
- Unzip.
- Upload the
broken-link-checker
folder to you/wp-content/plugins
directory. - Activate the plugin in the Plugins tab.
Hmm, I see. Are the pages that show up just normal pages, or custom post types?
They are just normal pages with status set to draft.
Hmm, I can’t seem to reproduce that problem on my site.
Try this: uncheck “Pages” in the “Look for links” tab and save settings. Then re-enable it and save again.
Thanks, I’ll give it a try…
[…] Broken Link Checker リンクエラーやリンクエラーの画像がないかブログをチェックし、見つかった場合は、ダッシュボード等で通知します。 […]
[…] If you do have quite a bit of shared content on your WordPress website, there is a plugin called Broken Link Checker that will scan for broken links. This also pertains to reference links that you may have at the […]
[…] – die installiert aber nicht aktiv sind. Sie werden nur bei Bedarf aktiviert. “Broken Link Checker” gehört ebenso dazu wie der Performancemesser “P3 (Plugin Performance […]
[…] dank diesem PlugIn: Auf einmal war da ein HTTP-Status-Code 404 bei SchwelmeBräu – ist vermutlich auch insolvent […]
I was just wondering how you find the correct names for the custom fields you want to check. What would you look for in phpMyAdmin?
In phpMyAdmin, you would look for distinct values of the “meta_key” column in the “wp_postmeta” table. I think there’s a button that lets you get a list of them in one click.
I recently changed the structure of my tags and categories, so I have a lot of broken links. The broken link checker is finding the links, but when I try to edit them to what should be correct, and then press update, it just hangs, and the circle next to the update button keeps going, but there’s no other activity I can see. The link remains to the incorrect page. How do I stop it from hanging? Thanks!
That’s probably a bug. In theory, it should at least display an error message when it fails to change a link, not just keep spinning endlessly.
Check your PHP error log for messages related to this plugin. If you don’t know how to do that, see these posts:
http://premium.wpmudev.org/blog/wordpress-troubleshooting-basics-how-to-check-your-error-logs/
http://digwp.com/2009/07/monitor-php-errors-wordpress/
Also, just before you edit a link, open the JS console and see if any errors show up when you click “Update”.
Hi Jānis,
Broken Link Checker is flagging up some links with ‘999 Unknown Error’ that are actually valid links. All the examples I have found so far have been links to LinkedIn profiles, e.g.
Link URL : http://uk.linkedin.com/in/practicaleq/
Link URL : http://www.linkedin.com/in/andyjacksonuk
Best wishes,
Andy Smith
Bug?
Broken link checker is doing two things which leads me to think there is a bug here.
1. In one and the same article, some of my links are normal, some are visualized with a strikethrough.
2. Then the plugin report the ones with a strikethorugh as a broken link.
The problem is that the ones reported as broken not are broken at all. When deactivating the plugin all links act normal again.
A link are named tghis way: Sample link
Hope you have a fix or something 🙂
Sounds like false positive(s). Usually it’s not a bug in the plugin itself – most often, there’s some server configuration issue or network problem that prevents the plugin from accessing the linked page. And since the plugin can’t reach the link, it assumes the link is broken. What status message does it display for those links?
By the way, if you don’t want the strike-through, you can turn it off in Settings -> Link Checker -> General.
Hi
The email I receive just report:
Broken Link Checker has detected 35 new broken links on your site.
Here’s a list of the first 5 broken links:
Then it list the link text, link url and source url.
The funny thing is that some link are and some links are not, reported as broken on the same page.
Hmm, I suspect I might be missing something here. If some links on the same page are reported as broken and some are not, what’s strange about that? Are they all pointing to the same site or something?
🙂
No, links are not pointing to the same page, only to the same site.
I was just reflecting over the fact that if there was something wrong with the server config/network problem or plug in it self, its strange that not all links on that same page are affected by the same error.
I have had to disable the plugin on this site. It is reporting broken link after broken link — when they are NOT broken. Yet it seems to run fine on two other blogs. BUT those are mostly blogs and the Michele Sinclair site is more about “pages” than blogs.
I simply can’t deal with 50+ reported broken links when only ONE of the 50 was truly broken.
[…] Broken Link Checker – I found this one on another blogger’s list. It’s a great way to see if any of your links aren’t working, which is a huge pet peeve of mine! […]