The 404 error occurs when users try to access a page that no longer exists or cannot be found on your WordPress site. This can negatively impact visitor experience and SEO. In this guide, we’ll show you common causes of the 404 error and how to fix them.
1. Check Permalink Settings
One of the most frequent causes of 404 errors in WordPress is an issue with permalinks. To fix this:
- Go to the WordPress Admin Dashboard.
- Navigate to Settings > Permalinks.
- Note the current setting (e.g., “Post Name”).
- Temporarily select “Plain” and click Save Changes.
- Switch back to your original setting and save changes again.
This process rewrites the .htaccess file and can resolve the issue.
2. Regenerate the .htaccess File
If the problem persists, manually rewrite the .htaccess file:
- Connect to your server via FTP or cPanel > File Manager.
- Locate the
.htaccessfile in your site’s root directory. - Download a backup copy.
- Replace the file content with this standard WordPress code:
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPressSave and upload the file back to the server.
3. Check and Fix Broken Links
If 404 errors result from broken links, use specialized plugins to identify and fix them:
- Broken Link Checker – Automatically scans your site for broken links.
- Redirection – Allows you to set up redirects for URLs returning 404 errors.
After installation, run scans and fix broken links by updating URLs or adding redirects.
4. Set 301 Redirects for Removed Pages
If you’ve changed URL structures or deleted pages, use 301 redirects to guide users to relevant pages:
- Install the Redirection plugin.
- Go to Tools > Redirection.
- Add the old URL and the new URL, then save.
This helps both users and SEO.
5. Temporarily Disable Plugins and Active Theme
Sometimes a faulty plugin or theme can cause 404 errors. To check:
- Deactivate all plugins from Dashboard > Plugins.
- Check if the error persists.
- If the issue disappears, activate plugins one by one to identify the culprit.
- If the issue continues, temporarily switch to a default theme (e.g., “Twenty Twenty-Four”) and test again.
Conclusion
404 errors can negatively affect user experience and search rankings but can be quickly fixed with the methods above. Regularly monitor broken links and keep your site updated to prevent future problems.