This plugin searches for links in your WordPress posts and pages (regular links or image links), then validates them for you. It can process local links, relative links, and external links.
[Most recent WordPress Link Validator updates]
December, 2015
Tested on WordPress 4.4. No changes needed.August, 2015
Tested on WordPress 4.3. No changes needed.September 14th, 2014 – Release 1.6.2
- Updated for WordPress 4.0.
- Updated nonce creation function for the background link validator process.
Previously, I have been relying on my sitemap generator to alert me of broken links, but that will only uncover broken local links. I needed something that will not only identify external broken links, but also be smart enough to check for unpublished articles on popular sites such as HubPages and Squidoo.
I decided to create the Shiba Link Validator Plugin.
Shiba Link Validator Features
- Extracts and validates links from all posts and pages. Operates on both HTML and image links.
- You can also set the plugin to check for links within comments.
- Checks for unpublished articles on hubpages.com and squidoo.com. In most public article sites, an unpublished page will not return a file-not-found code, but will return a ‘this article is no longer published’ page instead. The plugin checks for such pages.
- Link checking is performed in the background so that you may continue working on your blog.
- Attach urls to images (using Shiba Link objects) and render those links as a gallery.
Shiba Link Objects
Activate Shiba Link objects
- Go into Tools >> Shiba Link Settings.
- Click on the Enable Shiba Link Objects checkbox.
- Click the Save Options button.
Once activated, a Shiba Links tab will be added to the left of our WordPress dashboard. We can edit links, add thumbnail images, and perform other link management operations through this menu.
Translate old WordPress links to Shiba Link objects
- Go into Tools >> Shiba Link Settings.
- Click on the Translate button.
- Click on the Shiba Links tab. There should be a list of Shiba Link objects with the same title and URL addresses as our old WordPress links.
Shiba Link objects must be enabled for the translation process to go through.
Add Shiba Link objects to Shiba Media Library galleries
- Add a common tag (e.g. test link) to all the Shiba Link objects we want to include in our gallery. We can add tags in bulk by using the Bulk Edit drop-down menu on the Shiba Links tab.
- Create a new Shiba Media Library gallery.
- Add the link tag to our newly created gallery.
- In the Gallery Type metabox, make sure to click on the Any option. This will allow us to include Shiba Link objects into our gallery.
- Save the gallery and render it using the Shiba Gallery plugin.
Once saved, the gallery should be populated with the relevant Shiba Link objects. This dog training page has a bunch of Shiba Link objects rendered as a navigation list gallery.
How Links Are Validated
The Shiba Link Validator extracts all the links from your posts, pages, and comments; then checks if they point to valid pages. It uses cURL commands to check for broken links, and does an extra check for the hubpages.com and squidoo.com domains to identify articles that are no longer published.
If your web server does not support cURL, the plugin will switch to using PHP get_headers for link validation. However, this method is less efficient and cannot be used to check for unpublished articles.
Link validation will only start when you tell the plugin to do so from the Posts >> Validate Links menu. You can also check the Just show links, don’t validate box, in which case, all links will be shown without any validation. Otherwise, only potentially broken links will be shown together with their HTTP-CODE status.
The plugin creates a background thread to generate the post links, so you can continue using your WordPress dashboard while it is working. However, depending on the total number of posts, pages, and comments on your blog, the link generation process may take some time to finish and will put added load on your blog server.
It is best to carry out the link validation process when there is less traffic on your server. Enabling caching on your WordPress blog will also ensure that your site does not get overly busy with handling too many requests.
You can continue to monitor the link validation process by going into Posts >> Validate Links and refreshing the screen. You may even shut down your local computer if you wish, and come back later to check on the results. The link validation process runs on your server, and will not be affected.
Shiba Link Validator Future Additions
- Currently, all posts and pages are checked together. In the future I plan to add the ability to check links for chosen posts and pages. I also plan to add a validate links button to the Edit Post screen.
WordPress Link Validator Updates
Shiba Link Validator 1.6
April 19th, 2014
- Updated for WordPress 3.9.
- Fixed plugin url and directory paths to use plugin_dir_url() and plugin_dir_path().
- Creating link objects with empty input urls will no longer trigger a notice message.
- Added metaboxes to all the plugin settings/option pages and standardized the pages to use WordPress settings, forms, and messages.
Shiba Link Validator 1.5
Jan 20th, 2013
- Updated for WordPress 3.5
- Links are now processed in segments. This allows us to control the amount of memory needed for the link validation process.
- Added Shiba Link custom post type objects. This allows us to attach links to images, add links to our Shiba Media Library galleries, and/or render them using the Shiba Gallery plugin.
- Translate old style WP links to Shiba Link objects. Go into Tools >> Shiba Link Settings and click on the Translate button.
- Added ability to stop validation process.
- Added security nonce check to the validation process.
- Streamlined the validation process so that it makes fewer database calls.
Shiba Link Validator 1.3
Aug 3rd, 2012
- Updated for WordPress 3.4
- Now using the WordPress HTTP API for link validation.
- Added multiple result files for multi-site.
- Better feedback messages during link validation.
- Updated validation process so that it works better with w3tc.
Shiba Link Validator 1.2.2
Jan 11th, 2011
- Shiba Link Validator is updated for WordPress 3.1. It was tested on both 3.0 and 3.1.
- Fixed notice errors.
- Updated link checks for Squidoo and HubPages.
Shiba Link Validator 1.2
June 17th, 2010
- Shiba Link Validator is updated for WordPress 3.0. It was tested on both 2.9 and 3.0.
- Shiba Link Validator no longer uses proc_open to run the link generation process. It should now work across most hosting platforms.
- Prevent users from accidentally starting multiple link validation processes when clicking on the Generate Links button. This is achieved by doing a time and status check. Multiple processes can cause slow-downs on your server.
Shiba Link Validator 1.1
April 26th 2010
- Added the ability to generate and validate image links.
- Created a wrapper class and modularized the plugin. This makes the plugin cleaner and more secure.
Brian says
I have a few bad page scores in my page speed report (page speed 82). I was wondering if you can tell me how to “specify cache validator” and “defer parsing of java.” Thank you so much for taking the time to read this.