Checking Old Sites on 404
We recently ran into the situation where a page on a client’s site was returning 404 (File Not Found) because the page really lives in the archived copy of the site, but had the URL as if it were on the current website. It was easy enough to update the URL in page content where we referred to it. However, in this instance the docunent that was linked was a PDF that had links in it that were broken in the same way. Editing the PDF was not something we had the source material to do, nor wanted to do as it was part of the archived site. So we had to come up with an automatic solution.
We went about looking into how WordPress could redirect 404 errors over to the archived site if the requested path was not found on the current site, but was found on the archived site. The result is the TG 404 Site Checker plugin. Since it is a simple enough plugin we thought that we’d make it available to anyone else who may find it useful. Configuration instructions are in the readme file. Feel free to use this plugin. If you find any problems or want to suggest any features, just submit an issue.
Bottom line, we had a problem on a client’s site, and made a fix that is generic enough we think it may help others. So, here is the plugin we wrote with the fix. Generally, whenever we can we like writing plugins that are more generic, because that way we can use them on all our client websites as needed. TG 404 Site Checker is a simple plugin that fills a very real need, and has a simple configuration. We hope you find it as useful as we do.