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 :

    1. Download the .zip file (see below).
    2. Unzip.
    3. Upload the broken-link-checker folder to you /wp-content/plugins directory.
    4. Activate the plugin in the Plugins tab.
    Related posts :

    2,584 Responses to “Broken Link Checker for WordPress”

    1. lowspeed says:

      It immediately shows no links detected.

      I have php 5.3.0

    2. […] Plugin, dass immer stabiler wird und meiner Meinung nach nicht fehlen darf, ist der Broken Link Checker. Ich verlinke gern und viel (übrigens follow, dank des Do Follow-Plugins). Ich benutze Bilder von […]

    3. WordPressをインストールしてから設定したことあれこれ | マツリノアト says:

      […] Broken Link Checker – ブログ記事内のリンク切れをチェックしてくれる。WordPress導入後の設定いろいろ – IDEA*IDEA 〜 百式管理人のライフハックブログ 〜を参考に。 […]

    4. Harsha says:

      Awesome plugin. I don’t know how I did not find this till now. Fixed some broken links on my blog, voted that it works on WordPress 2.8.6 and gave it 5 stars.

    5. White Shadow says:

      @ lowspeed : Sorry for not responding earlier. I haven’t been able to come up with a probable cause for the bug, but here’s something you could try to get additional information : the debug version of the plugin.

      If you install Firefox, Firebug and FirePHP, you will be able to see the debug messages this version outputs when processing your posts. To do that, go to the plugin’s settings page, open the Firebug console and click the “Recheck” button. It should display a whole lot of information as it parses (or tries to parse) your posts for links.

      I don’t know what specifically you should be looking for, but maybe some error message catches your eye.

    6. lowspeed says:

      Thanks for your help, especially since i’m not expecting any support for this.

      I installed the debug version. already had firebug so i installed firephp.

      When i do recheck, nothing happens (firephp is enabled)

      It should just display the info in the browser portion ?

    7. White Shadow says:

      It should display it in the Firebug console, i.e. the thing that shows up when you click the Firebug icon in the status bar.

    8. lowspeed says:

      I get this error:

      Database error: Table ‘wordpress.wp_blc_instances’ doesn’t exist

    9. lowspeed says:

      Maybe this will help better i had to remove all the quotes:

      Looking for posts and bookmarks that need parsing…
      Found 1 items to analyze.
      Parsing post 1434
      Executing query: DELETE FROM wp_blc_instances WHERE source_id = 1434 AND (source_type = post OR source_type=custom_field)
      Database error: Table wordpress.wp_blc_instances doesnt exist
      Found link: http://lkjlkjkjx.com
      Custom fields loaded: array(_edit_lock=>array(0=>1260901724), _edit_last=>array(0=>1))
      Marking post 1434 as synched.
      No unparsed items found.
      Cleaning up the link table.
      Looking for links to check (threshold : 2009-12-12 13:28:45)…
      SELECT *, ( last_check < 2009-12-12 13:28:45) AS meets_check_threshold FROM wp_blc_links WHERE ( last_check = 400 OR http_code < 200 OR timeout = 1) AND check_count 0 AND last_check < 2009-12-15 13:08:45) ORDER BY last_check ASC LIMIT 50
      Checking 1 link(s)
      Checking link 1
      No links need to be checked right now.
      All done.

    10. White Shadow says:

      Hmm, so the plugin failed to create one of its tables for some reason. What version of MySQL do you have?

      For reference, here’s the SQL query that the plugin uses to create the table. You could try running it manually and seeing if/why it fails :

      CREATE TABLE wp_blc_instances (
      	instance_id int(10) unsigned NOT NULL auto_increment,
      	link_id int(10) unsigned NOT NULL,
      	source_id int(10) unsigned NOT NULL,
      	source_type enum('post','blogroll','custom_field') NOT NULL default 'post',
      	link_text varchar(250) NOT NULL,
      	instance_type enum('link','image') NOT NULL default 'link',
      		
      	PRIMARY KEY  (instance_id),
      	KEY link_id (link_id),
      	KEY source_id (source_id,source_type),
      	FULLTEXT KEY link_text (link_text)
      )
      

      (The table prefix is actually not hardcoded, but that’s not relevant in this case.)

    11. lowspeed says:

      if i try to create the table it gives me this error:

      The used table type doesn’t support FULLTEXT indexes

      I’m using mysql: 5.1.40

    12. lowspeed says:

      need to force the query to ENGINE=MyiSAM not sure how to do it?

    13. White Shadow says:

      According to this page, you just need to add ENGINE = MYISAM after the last bracket in the CREATE TABLE command.

    14. lowspeed says:

      Super, thank for your help.

      Maybe you should consider putting that command in the plugin’s next revision.

      Thanks again!

    15. White Shadow says:

      Aye, I’ll probably do that. Cheers.

    16. tks for plugin and info

    17. […] Reduces spam comments, standard plugin to fill this need for hundreds of thousands WordPress users.Broken Link CheckerHyperlinks have this unfortunate tendency to change and your links can be outdated in no time. This […]

    18. […] Broken Link Checker for WordPress […]

    19. […] Broken Link Checker 記事にリンクが切れているアンカータグがないかどうかを定期的に調べ、見つかったリンク切れ情報をダッシュボード一覧表示してくれます。 […]

    20. […] Broken Link Checker – As your blog or website gets larger and larger, it becomes harder and harder to keep track of “dead” links. […]

    Leave a Reply