How to Fix 404 Errors on Your WordPress Website
You may have come across the “Page Not Found” message before. If you’re looking to fix a 404 error on your WordPress website, read on to learn how!
If you run any website (not just WordPress), you might encounter this 404 message on one of your website’s pages.
Like many common errors on pada WordPress, a 404 error is relatively easy to troubleshoot and fix. The solution involves restoring your site’s permalink structure, and this step can be completed in just a few minutes.
In this article, Mangcoding will explain what a 404 error is and what causes it on your site. Then, we’ll guide you on how to fix it in four simple steps, which we’ve quoted from dreamhost.com
A 404 error, also known as a “Page Not Found” error, indicates that your browser cannot find the page you are trying to access.
The message may look slightly different depending on the browser you’re using, but it usually contains the “404” code or a message like “page not found.”
Website owners can also create their custom 404 “Not Found” pages. For example, “Here’s our 404 page” (you can add your own custom 404 message).
Seeing this notification (or any error message) when trying to access your site can be confusing and frustrating. In some cases, your post may even be completely gone.
Some common reasons why WordPress posts show a 404 error include:
- Incorrect URL, This could be caused by a typo in the URL, and this is the most common reason.
- DNS Settings Issue, If you recently updated your DNS settings and are seeing this error, it could be because the changes haven’t fully propagated yet, and it may take up to 48 hours to complete.
- Issues with your site’s add-ons or structure, WordPress permalink issues can occur if the .htaccess file is missing or corrupted. Compatibility problems with WordPress components like plugins and themes can also cause this.
Whatever the cause, this error prevents access to your site, which confuses users and potential customers. Therefore, it needs to be resolved as quickly as possible. Let’s dive into troubleshooting and resolving the most common causes of 404 errors on your WordPress website.
A 404 error causes several problems on a website, in addition to preventing you from accessing a page. It also creates a poor user experience (UX).
If a page your visitors are looking for doesn’t exist, they will likely leave your site and may avoid clicking anything on your site due to a lack of trust.
If there are several of these errors on your site, they can drive users (and potential buyers) away.
Additionally, the worst-case scenario is that those visitors might leave and land on a competitor’s website, harming your business.
Moreover, a 404 error can also interfere with your search engine optimization (SEO). Search engines won’t index pages that show a 404 error because they believe the page doesn’t exist.
This is critical because SEO is a key driver of traffic to your website.

Before you start changing permalink settings or accessing the .htaccess file, it’s a good idea to back up your website and database. This way, if you make a mistake, you can easily restore your site to its previous state.
The best way to follow this step-by-step guide is to go through it in order, applying each change one by one, and checking if the error has been fixed after saving changes.
Step 1: Reset Your WordPress Permalink
The first step to try is to reset your permalink. Please open your WordPress dashboard, then select Settings > Permalinks.

Once you’re in this section, just click Save Changes at the bottom of the screen. Seriously, that’s it!
You actually don’t need to edit anything. Clicking that button will update the permalink settings even if you didn’t make any changes. This is important because it also refreshes the rewrite rules used for Permalink.
Once this is done, proceed and reload the page you were trying to access. If everything works, this step is complete, and you don’t need to continue to the next step!
However, if you’re still getting a 404 error, please continue to the next step.
Step 2: Restore Your .htaccess File
If resetting your permalink didn’t work, the next strategy is to restore your .htaccess file. This controls how WordPress interacts with the web server and how WordPress generates permanent links for your pages.
Restoring it to the default settings can fix sudden 404 errors. To restore the .htaccess file, you need to open it and make a few simple edits. There are several ways to do this.
You can use a Secure File Transfer Protocol (SFTP) client, such as FileZilla. We have detailed instructions for connecting via SFTP if you need assistance.
Once the file manager is open, select the folder corresponding to your domain name. You will find the .htaccess file inside (please look for items like “wp-content”).
If you’re unsure and worried about modifying the .htaccess file, please copy its current content and save it somewhere for backup. Then replace the contents of the .htaccess file with the following:
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
This is the default .htaccess code for WordPress. After pasting it and saving the changes, please wait as restoring this file will also reset the permalink settings for your WordPress site.
Therefore, if you’re using a custom permalink structure (or have changed it entirely from the default), you will need to restore those settings.
To do this, go back to your WordPress dashboard and navigate to Settings > Permalinks. (as in step 1 above). Restore your preferred settings and then click Save Changes.
Next, please reload or refresh your website and try to load the page that was showing the 404 error. If everything works, you don’t need to proceed to the next step! But if not, continue to the next step.
Step 3: Disable Your WordPress Plugins and Themes
If you’ve reset your permalink and .htaccess file but are still seeing the 404 error on your site, the next step is to check your WordPress themes and plugins.
Plugins, in particular, sometimes have bugs or compatibility issues that prevent the site from loading. So, let’s start there.
The basic step is to deactivate them one by one, checking the 404 error each time. To begin, go to your WordPress dashboard and navigate to Plugins > Installed Plugins.

Try deactivating one by one the plugins that you think may be causing the 404 error. Look for and click the “Deactivate” button next to the active plugin at the top of the screen.

Next, reload or refresh your website and try to load the page showing the 404 error. If everything works, you don’t need to proceed to the next step!
If you receive an error message that might break your website’s functionality, go back to the plugin, reactivate the one you just tried, and move on to another plugin to check and deactivate it.
Then, if you find a plugin causing the issue, you can check if it has an update that could fix the problem. If updating and refreshing it doesn’t work, look for an alternative plugin with similar functionality.
However, if no plugin is the issue, try changing your WordPress theme. To do this, go to Appearance > Themes.

Hover over a different theme and click Activate. Then, refresh your site and try accessing the problematic page again.
Note that changing themes can significantly alter your site. Additionally, if you’ve made any edits to your theme, those edits may be lost if the theme is changed or updated.
So, once again, take the time to back up your site before making any changes and clicking within your theme.
If you find that your theme is the problem, you may need to take the time to search for and find a theme that provides similar appearance and features.
Step 4: Set Up 301 Redirect for Moved Content
If you need to move content to a new URL and don’t want the old URL to cause a 404 error, here is the final step. You should set up a 301 redirect to point the old URL to the new one.
Next, the easiest way to do this is by installing the Redirection plugin, as this tool will allow you to quickly set up the redirects you need. Additionally, it’s free and easy to use.
If you want to set up your own custom 404 error page, you can easily do so. The 404 page plugin is a very popular option for quickly creating custom error pages.
Alternatively, you can take a more hands-on approach and do it manually. This is still fairly simple and just requires adding a single line of code to your .htaccess file to target the error to a specific page. Then, you can just create that new page.
Finally, if you want to keep an eye out for 404 errors in the future, you can do so with some practical tools.
If you’re using Google Analytics to track website traffic, you can also use it to find 404 errors on your site.
Google Search Console will also show errors found by Google bots as they index your site. This is a simple way to see all the issues Google is encountering.
You can also input your URL into specialized tools like Broken Link Checker, which will scan your entire site for broken links and notify you if it finds any 404 pages. This plugin is free and easy to use.
That concludes the article on how to fix 404 errors on your WordPress website, shared by Mangcoding. Hopefully, this article is helpful and provides you with new knowledge. If you have any feedback or suggestions, feel free to comment or send them via Email or Mangcoding’s Social Media.
Source : How to Fix WordPress 404 Error