Broken Link Checker is a tremendously useful plugin, one that I include with all my WordPress installs. It does exactly what its name suggests: Checks your blog posts and pages for broken links (automatically, in the background) and lets you fix them easily, without having to visit and edit each individual post.
How to install and configure Broken Link Checker
You’ll want to install this WordPress plugin in the usual way. And this is one of those plugins that works great with the default configuration. Just activate it and let it do its magic!
Now that it’s installed, here’s how to use it to find and fix those pesky broken links.
You can access this plugin in two ways: In the sidebar of your WordPress Dashboard, visit Settings –> Link Checker or visit Tools –> Broken Links.
Visiting and changing the plugin settings
When you visit Settings –> Link Checker, you’ll see a screen that displays the number of broken links at the top, along with a button labeled “re-check all pages.” Clicking this button will, you guessed it, re-check all the links on your site. It may take some time if you have a lot of posts or pages, but it can be really useful if you’ve just done some site overhauling.
Even if you don’t use the “re-check all pages” button, Broken Link Checker will be working in the background, checking all your links at the interval specified in the “Check each link” field. The default is every 72 hours.
Also on this settings page is something called “Broken link CSS.” If the checkbox is checked, the default setting is for broken links to be marked with a strikethrough. You could change this to any style you want, but the important thing to remember is that anyone viewing your site will see broken links marked this way. If you don’t want to visually call out the fact that your links are broken, just uncheck the box.
Personally I think you’re better off catching and fixing those links than visually marking them for all to see. Which you can also do quite easily with this plugin. Read on to find out how.
Finding and fixing broken links
If you click the “found (number) broken links” link on the settings page, OR if you visit Tools –> Broken Links, you’ll be presented with a handy list of all your broken links, showing the page or post title, the link (anchor) text, and the non-working URL, as shown here:
In this example, I have a link to a post on my own blog that’s not working (oops, I probably changed the permalink), a link to an external site that’s not working, and a link to an image on one of my blog posts that’s not working (probably left over from when I was hosting my images somewhere else in my hosting system).
Fortunately, these are pretty easy to fix. I can find the updated URL of my own post and the blog image. If the external site has changed, I can use a new one…or simply make the text no longer be a link. I can even tell the plugin to stop telling me a certain link is broken if I don’t want it to show up in my broken link list anymore.
Just hover your cursor over the link in question, and several options appear below the post title and link URL:
The three options underneath the post/page title are:
- Edit, which opens the post editing screen so you can manually change the text and/or link
- Delete, which deletes the post (click with caution!)
- View, which shows you how this post looks to a blog visitor
However, it’s often quicker and simpler to edit the link directly, right within this plugin screen. To do that, choose one of the four options that appear underneath the URL:
- Details, which shows you a log of how many times the link has failed, if there was an error code generated, etc. You probably won’t need to click on this unless you like reading error logs (hahahaha!)
- Unlink, which simply makes the text (or image) no longer a link. Very useful and simple solution. Just don’t use for text like “click here” or buttons, because inviting people to click on something unclickable ends up confusing them.
- Exclude, which tells the link checker to stop reporting instances of this link as broken. In my example, links to photobucket.com kept coming up as broken, despite the fact that I could visit the site just fine. So I ended up excluding them.
- Edit URL, which lets you directly edit the web address the link is pointing to without visiting the Edit Post screen. If the page in question has a new address, you can paste it here. Just remember to click “Save URL” after you’ve made changes in the URL field.
You’ll probably end up using Unlink and Edit URL the most. They’re super-useful.
Once you’ve made a change that fixes the broken link, it will blink a soothing green-is-for-go color and disappear from this page. Nice job! If you fix a link and the link checker doesn’t seem to “get” it, you can wait awhile, force a recheck, or click “Exclude” to give yourself a clean slate.
And that’s it! Useful, quick, and really easy to use, Broken Link Checker is a must-have plugin for WordPress sites of all sizes.