WordPress is a powerful content management system in which sometimes even a small tweak will result in making your website inaccessible. The one reason for such a scenario is 404 errors which are generated by your server when a requested URL is not found. Since WordPress creates a rewrite array which is responsible for managing permalinks, it will result in creating improper permalinks structure. This will leads to either breaking or corrupting of permalink array, thus causing 404 errors.
Fixing 404 Errors
- Resent the permalink array by going to WP-Admin > Permalinks tab and simply re-save the permalink structure.
- Navigate to: WordPress Dashboard → Settings → Permalinks: Click “Save Changes”
- Now Test your URL.
- If the 404 goes away, it means the issue has been resolved.
Using Plugin: DebugThis
- If this did not work or you are still seeing 404s, try disabling plugins which handle redirection or create customized permalinks.
- Now, use a debugger to view the rewrite array and confirm which rewrite rule is actually responsible for processing all your URLs.
- This can be done by installing the plugin DebugThis, which eases the job for you.
- Once this plugin is installed and activated, go to your site. Then navigate to Homepage → Admin Bar → DebugThis → Query → Rewrites.
- If this process too also does not work for you, then your site must be the victim of some another problem.
- You now have to start by deactivating plugins one by one to see if you can find the conflicting PHP responsible for the issue.
Photo Credit: Flickr/Marc Dubois