fix broken links in WordPress

As operators of multiple websites, we understand the frustration of dealing with broken links firsthand. Manually scouring through countless pages is a time-consuming ordeal, especially for larger sites with extensive archives.

But fear not! In this post, I’ll share a way you can find and fix broken links on your website to streamline this task efficiently. I’ll cover why checking for broken links manually is a poor solution, how to identify broken links automatically and how to fix them.

So, let’s dive in and tackle those broken links head-on!

Why checking for broken links manually is a poor solution

Technically, you could fix the broken links on your site manually. You can go through each page and post on your site, checking every link contained within. However, this is an incredibly time-consuming process on all but the tiniest of sites. Plus, approaching the task this way means you’d have to keep repeating it periodically, taking your attention away from more important work.

Instead, you can use a plugin to both simplify and automate the process of checking for broken links and removing or replacing them. This is what we do here at Themeisle and on other sites as well.

Let’s take a look at how this works in practice.

How to fix broken links on your website using a plugin

If you want to ensure that every link on your site works properly, you’ll need the right tool. Broken Link Checker is the go-to plugin for fixing your site’s links. It’s simple to use, and very customizable:

To get started, you’ll need to install and activate the plugin on your WordPress site. Then you can navigate to Link Checker > Local [old] within WordPress to begin using it:

☝️ The primary distinction between the Local (old) and Cloud (new) options in Broken Link Checker lies in the location of the scan execution. Local indicates that the scan for broken links occurs on your website’s server, thereby exerting a load on your server resources. Conversely, the Cloud option conducts the scan on remote (you guessed it!) cloud servers, alleviating your website hosting from any workload and ensuring compatibility with all sites and servers.

For the purpose of this tutorial, I will demonstrate how to execute the scan and address broken links locally. While many hosting providers discourage using the plugin in this manner due to significant resource consumption, it remains a viable approach for small and medium-sized websites.

If you choose the cloud option you will have to register and connect your site to WPMUDEV servers. You can register as many websites as you’d like for free.

Broken Link Checker plugin interface

You actually don’t need to do anything to get this plugin working – it will begin scanning for broken links as soon as it’s installed and display them for you in a handy list. You’ll see each broken URL, as well as its status, anchor text, and location.

To fix a broken link, hover over the URL and select Edit URL. (Or, choose Unlink to simply remove the link.) You can change both the anchor text and the URL itself:

Broken Link Checker plugin - how to edit a link

The tool may also show you suggestions about what link you can use instead, if relevant. Once you’re happy with the revised link, click on Update to make the change live.

⚡ Speed things up: If you’d like to unlink multiple URLs at the same time, the easiest way to do this is to use Bulk Actions. Select all posts that you would like to unlink, click on the Bulk Actions dropdown, select Unlink and click on the Apply button. You’ll be asked to confirm if you’d like to unlink all posts. Just click OK and that’s it!

Broken Link Checker plugin - how to unlink posts in bulk

The nice thing about this method is that Broken Link Checker will continue to scan your site, so you can simply come back to this screen from time to time and look for any new issues. If you’d like, you can also configure how the plugin works by navigating to Settings > Link Checker in your dashboard:

Broken Link Checker options

Here you can decide how often the plugin will perform its scan, what locations and link types it should pay attention to, and more.

Other options to find and fix broken links in WordPress

Some web hosts, most notably WP Engine and GoDaddy, block the Broken Link Checker plugin because it can use too many system resources.

If your site is hosted at one of those hosts, you can still automatically find broken links…you’ll just need to use a third-party tool. These tools can usually be split into following categories:

Keep in mind that while these tools will assist in identifying broken links, you’ll still need to manually remove each broken link from your posts or pages.

The causes and effects of broken links in WordPress

Have you ever clicked on a link, only to be shown an error, taken to the wrong page, or told that the content you’re looking for no longer exists? If so, you’ve encountered a broken link – and you know how frustrating that can be.

404 page example

In general, a broken link occurs when the page it leads to has been moved or deleted, or if its URL has been changed. In these scenarios, the link you originally added to your content will no longer take visitors to the right place – it will often display a 404 error instead.

For long-standing websites, it’s likely that there will be at least a few broken links. The sites are constantly updated and revised, and a blog post that’s there one day can easily be gone the next.

You’ll often hear claims that the biggest issues with having 404s on your site is that they are bad for Search Engine Optimization (SEO). While this claim isn’t entirely accurate, there are other important reasons why their presence on your site can be harmful:

  • Broken links are understandably frustrating to users, and can lead them to give up on your site.
  • They can also make your content come across as unprofessional, untrustworthy, or just sloppy.
  • They can have adverse effects on site metrics such as bounce rate and session duration.

These factors alone should underscore the importance of promptly addressing and resolving broken links on your website.

Conclusion

Broken links pop up on every site from time to time, but fortunately they’re easy to deal with. Instead of trying to find and fix these links manually (which could take hours), you can complete this task in minutes using a dedicated plugin like Broken Link Checker. This tool enables you to check for broken links quickly and helps you put the process on autopilot.

If you need (or prefer) a non-plugin alternative, you can also use tools like Screaming Frog or W3C Link Checker to accomplish much the same thing.

Do you have any questions about how to handle broken links in WordPress? Ask away in the comments section below!
Free guide

4 Essential Steps to Speed Up
Your WordPress Website

Follow the simple steps in our 4-part mini series
and reduce your loading times by 50-80%. 🚀

Free Access

0 Comments
Inline Feedbacks
View all comments

Or start the conversation in our Facebook group for WordPress professionals. Find answers, share tips, and get help from other WordPress experts. Join now (it’s free)!