Powered By Network Solutions: How to Fix WordPress 404 Errors
Understanding 404 Errors
Encountering 404 errors while browsing a website can be frustrating for visitors and may even decrease website traffic. This article provides helpful steps on how to fix WordPress 404 errors.
If you're using WordPress, you might come across a 404 Page Not Found error page. There are different variations of this error page, including:
- Error 404
- Error 404 – Forbidden
- Forbidden: You don't have permission to access this resource
- 404 Forbidden
- HTTP Error 404 – Forbidden
- HTTP 404
In this article, we will discuss:
What causes a 404 error?
A 404 error means the browser cannot render a file because it is not found on the server. If you have already uploaded the file, then either the name is misspelled or it is in the wrong folder. It also shows up when your .htaccess file gets deleted, or there is some coding issue with its rewrite rules.
Quick Fixes
If you are experiencing a 404 Error, we have listed some quick fixes below to try to resolve the issue.
- Restart your browser: Close the current window and open a new one to refresh your session.
- Clear your cache: This often solves the problem by removing outdated files that might be causing the error.
- Verify the URL: Make sure the website address is entered correctly. A simple typo could be the culprit.
- Try a different device or browser: This can help determine if the issue is specific to the device or browser you're initially using. If it works on the new device, clear the cache on your original device.
- Use private browsing mode: Opening the website in private browsing or incognito mode can sometimes bypass the error by not using the cached version of the page.
Common Fixes to Issues Causing 404 Errors
Below are solutions to common underlying issues causing a 404 error. Please click a button to expand the details for troubleshooting:
If you have recently made changes to your website that have affected the URL, you may encounter issues with broken permalinks that lead to 404 errors. Permalinks are the permanent URLs used for specific pages, content, or posts on your WordPress website. A permalink consists of your domain name and a part of the URL called a Slug, which comes after your domain name.
If you are experiencing a 404 error due to broken permalinks on your WordPress website, you can fix it by following these steps:
- Log in to your WordPress dashboard and select Settings from the left-hand menu.
- Choose Permalinks from the options available.
- On the Permalinks Settings page, click the Save Changes button located at the bottom left to save your permalinks.
- After that, go back to your website and refresh the page or open it in private browsing mode.
- Test all navigation menu links that were previously broken to see if they are working correctly.
Another possible reason for seeing a 404 page on your website could be that incorrect custom URLs were set on the Menus section within the dashboard.
To fix this, please follow the steps below:
- Log in to your WordPress dashboard.
- Click Appearance on the left navigation menu, then hit Menus.
- In the Menus page, check if a Custom Link was set for the URL, then click the drop-down to see what it is set to.
- Look for Pages on the left menu, then double-click on it to check the correct URL the link should be using.
- Find the page for which you need to check the URL, then click Quick Edit.
- In our example below, the Slug is home. Note that the Slug is the end portion of the permalink.
- Return to the Menus tab.
- Under the Custom Link, update the URL using the correct Slug. For example, suppose the Slug for the custom link within the Menus page is the homepage. In that case, it should be updated to home to match it with the Slug within the Pages section of your WordPress dashboard.
- Once the Slug is updated, look for the Save Menu at the bottom-right corner of the page to save your changes.
- Recheck your website and refresh it, or open it using private browsing mode to see if the issue has been resolved.
If you're encountering a 404 error on your WordPress website, it might be due to your .htaccess file. To fix this, follow these steps:
- Log in to your File Manager or FTP application using your login credentials.
- Find the folder that contains your WordPress website in the Remote site section.
- Look for the existing .htaccess file.
- Right-click on the .htaccess file and select Rename.
- Rename your .htaccess file to set it back to default.
- Refresh your website or check it using private browsing mode.
If the error goes away, it means there was some problematic coding within the file causing the error.
It's possible that there are some images or links on your WordPress website that lead to a 404 error. This issue may occur due to misspelled or missing information within your WordPress files. To resolve this, you can go to your WordPress files and double-check the file path for each image or link. If you hover over the image, you will see the file path it is trying to access at the bottom left corner. Here's an example to help you understand better:
Follow the steps below to troubleshoot.
- Open the link in a new tab and check out the URL. This will tell you where the website is trying to find the image within the directory. In the example below, it is trying to find the GIF within the wp-content folder > uploads > 2022 > 09 > then the file name (giphy-5.gif).
- Head to your WordPress files and follow the path mentioned in step 1 to see if the data is missing or misspelled. Look for the following folders:
- Folder: wp-content
- Subfolder: uploads > 2022 > 09
- Check the file name to see if it matches the URL in our example above. In the example below, the file it is trying to access shows a capital G instead of a lowercase G. Note that URLs are case-sensitive.
- Once you've located the file, you can right-click and rename it to match what the URL is looking for.
- If the image still isn't working, try refreshing the page or opening it in private browsing mode.
These steps should help you fix any broken links or buttons on your website, not just for images but also for PDFs, custom pages, and more.
Review
To diagnose and fix WordPress 404 errors, it's important to understand that a 404 error indicates a webpage could not be found on the server. This issue might arise from problems with permalinks or the .htaccess file. To resolve these errors, you can take the following steps:
- Repair broken links.
- Update any incorrect custom URLs.
- Rename your .htaccess file.
- Correct any necessary information within your WordPress files.
By following this guide, you can restore your website’s functionality. If the issue persists, please contact support.