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 :
[...] the help of a WordPress plug-in called “Broken Link Checker“, broken links can actually be monitored and dealt with [...]
Is there any problems between Broken Link Checker & FB Connect plugin ?
None that I know of.
[...] Broken Link Checker – ky plugin i kontrollone te gjithe postet tuaja nese ka ndonje image apo link te thyer (broken link) dhe te njofton ne dashboard nese e gjen ndonje. Me ka ndodhe shpesh qe tme gjej broken links dhe fal keti plugini e kam rregulluar linkun aty per aty ne dashboard. [...]
[...] allerdings ein ziemlich zeitaufwendiges Unterfangen wäre, empfiehlt es sich, das Plugin Broken Link Checker zu installieren, welches selbstständig alle Links überprüft. Dann einfach nur noch [...]
[...] Broken Link Checker Checks your posts for broken links and missing images. You should also run a Xenu crawl once in a while to find errors on your site. Checking for broken links is a hassle to do manually, but these tools and plugins make it easy. [...]
[...] Broken Link Checker [...]
[...] [...]
[...] yes, download links. Before I forget, this is where you can download the “broken link checker“. [Wordpress Plug-in [...]
Hi,
I tried the latest version of this plugin and it didnt reported 302 redirection.You said that it was probably cause my server didnt have curl.I checked and my server has curl.I tried an older version of this plugin and it works with the 302 redirects.So good news but do you have any idea how this is posible cause your latest version of this plugin has a so much better dashboard interface and i would like to use the latest one
Which version was that? I’m asking so I can compare the relevant code and (hopefully) see why it doesn’t work in the newer version. Also, could you give me an example URL (or two) that isn’t reported correctly? It might help with the debugging.
[...] Web: w-shadow.com/blog/2007/08/05/broken-link-checker-for-wordpress [...]
The version that is working is 0.4.13 running on wordpress 2.8, example url: http://www.megavideo.com/?v=UJHYX7FE
I also use your latest version of the plugin on another site running 2.7.1 and it works great,but the older version wont work on that site
hello thanks for this plugin has come along way since i first sen it one thing if you can tell me where in the code i can change the timeout value as some of the sites i use/link to can load slow at times therefor they be reported as broken links
thanks
@Allstar : Looks like this is a bug in the linked site and possibly cURL. The the example URL returns a misnamed field in the HTTP response header (“location” instead of “Location”) and apparently this causes some kind of glitch in your version of cURL.
Well at least that’s what I think. Here’s a test : put a link to http://w-shadow.com/redirect302.php in one of your posts (this is simply a one-line PHP script that does a well-formed 302 redirect to my homepage. You can use an old post and remove the link later). If my idea above was right, this link should be detected correctly by the plugin.
@ paul : The timeouts are set in the link-classes.php file.
If you have cURL, change the lines 159-160 :
If not, change line 222 :
I have a longstanding blog with many broken links.
Finding them is one thing … do you have a global search and replace utility that works on my WordPress SQL database to fix any that I condsider fixable ?
You can change a link via the plugin’s interface. On the broken link list, hover your mouse over the link’s URL and click the “Edit” thing that will show up. Then input the new URL and click “Save”. This will replace the old URL with the new one in all posts and pages where it’s used.
Also, check out the Search and Replace plugin.
Wow, many thanks.
That’s the power I am looking for … I shall be trying out this plug in and contributing if it works
Double wow – that global S&R will be very useful too … I have repeatedly mistyped names and terms over the years and that will ease my housekeeping.
[...] Broken link checker: Este plugin revisa os links externos do nosso blog e comprova que estes links estão ativos ainda ou não. Muito útil para artigos antigos. [...]
When I activate the plugin on a test blog with only a few articles (v0.5.3), it works like a charm. When I activate it on my main blog with over 300 articles and thousands of links, it takes a few minutes to get going and the site isn’t responsive during that time.
Any way to improve performance and making the install/upgrade play more nicely in the background?
[...] engorro tratar de localizarlos uno a uno y ver por qué están fallando. Sin embargo, con el plugin Broken Link Checker for WordPress (que ya tiene un par de años, pero desconocía), esta labor es coser y cantar. El programa sondea [...]
@ Jacob : Sorry, I can’t think of anything useful at the moment. Maybe your server is just slow? It might be possible to make introduce some kind of staggered update algorithm, but that wouldn’t make much sense for the initial install because most users probably want the plugin to be up and going as fast as possible.
Hi! The plugin is nice, but I decided to delete it from one of my blogs because the plugin does uses too many memory and the uninstall process simply brought me to a blank page, and nothing was deleted
At first look, it seems that you are using the right code, but who knows. I’m using WP 2.8.1.
Any fix necessary?
I’m not sure what I can do about the memory usage, but I’ll fix the uninstaller right away (found the bug).
[...] Broken Link Checker for WordPress: muy completo. Rastreo programable. Opciones avanzadas como la de cambiar el estilo de los enlaces rotos, por ejemplo tachándolos. [...]
White Shadow, thank you for your time.
Can you think of reasons why I seem to be getting a lot of false broken links? I think this has been going on since upgrading WP to 2.8 (now at 2.8.2 and latest plugin). They show up as broken links, but when I expand them they show something similar to:
# Link last checked : July 20, 2009
# HTTP code : 0
# Response time : 0.000 seconds
# Final URL :
# Redirect count : 0
# Instance count : 1
What other info would you need? Thank you for your time.
Links that are currently being checked may be incorrectly reported as broken. However, those false positives should go away in a few minutes, tops.
Another possibility is that the plugin starts checking a link (the link record is “half-updated” immediately due to complicated reasons) and the link URL takes a long time to respond, causing the checking script to be terminated for exceeding the maximum allowed execution time. I’ve never seen this happen myself, but it’s theoretically possible on servers that have the max execution time set low and don’t allow scripts to change it.
Or it could just be a legitimate link timeout. Network glitches/server overloads do happen. In this case the false positives should go away in a few hours.
If you don’t think the above ideas explain the issue, post a few example URLs that are (consistently and incorrectly) detected as broken. I’ll see if I can find out why.
[...] Broken Link Checker – monitors and notifies you for broken links on your blog. [...]
[...] Broken Link Checker is really handy. It goes through your site and looks for broken links – then displays a nice dashboard widget telling you how many unique links you have in your site, and how many of them don’t work. Since the web is everchanging, a site that is up today may be gone tomorrow – it’s handy to know so that you can easily remove broken links without having to test them all yourself. [...]