How to Fix 404 Not Found Error in WordPress
404 is not a new error. You might have come across it many times on the internet. However, the problem begins when you start facing the error. This is the place where we will discuss the error and we will also see how to fix the 404 not found an error on the WordPress website.
Overview of 404 Error
There are many reasons why you might see the 404 error on your WordPress website. It simply means that the website or the URL trying to open is not found.
The common reasons include typing mistake, permalinks issue, hosting issue or one of the plugins might be giving you this issue. We will see how you can fix it.
The first thing you need to do is make sure that you are typing the URL correctly. Don’t forget to check your website in incognito mode.
You will now have to back up your files and database. We will make a couple of changes in the database. If you don’t have a backup, you might end up losing stuff. So, your second job is to take the proper backup of the database and files.
Once you are there, you are all set to troubleshoot the issue and fix it with the proper methods.
Fix 404 Not Found Error in WordPress
Here are some of the methods that you can try. One of them will surely work for you.
Knowing the Error Type
Shocked? Yes, there is a small difference that you need to see.
You see if the website is not found, you will see a different error which is usually the same. In most cases, you will get a Google logo saying 404 error not found.
However, if you can see your theme and the website name, it means that there is something wrong with the page you are trying to open.
This small thing will help you in troubleshooting the website. If the entire website is not found, there are good chances that something is wrong with the database or the hosting.
If you have recently migrated your web hosting, make sure that you have changed the URL of your website. This might cause the issue. Further, you also need to check the spelling in the database as well as in the URL that you are writing.
Fixing the Permalinks
The best way to fix most of the errors in WordPress is by regenerating the permalinks. Permalinks are responsible to name the links of the page. All these are stored in the .htaccess file in the WordPress directory.
If the file is corrupted, you will see one of the errors in most of the URLs. This is not a hard thing to do. You can easily fix it by regenerating the .htaccess file.
Now, if you have access to your WordPress admin dashboard, you can open it and head over to permalinks.
By going to the permalinks, you will see various options that you can choose from. Don’t do anything and just hit the save button. This will regenerate the .htaccess file.
On the other hand, if you don’t have access to the WordPress dashboard, you can simply delete the .htaccess file and open the URL back.
The file is located in the primary folder of your WordPress directory. Open your file manager and open the directory where you have installed WordPress. In most cases, this is stored with the same name as your website. You can look for the folder with the same name as your domain.
You will find the .htaccess file right there in the directory. If you can’t find it, you can enable hidden files. You can do it by going to the settings option. Usually, situated at the top right corner of the panel.
Open the settings option and click on “show hidden files” and click on save. This will show all the files again.
Please note that makes sure you have a proper backup of your WordPress website. If you don’t have the backup, you need to take it. You can also download the .htaccess file before deleting it.
Rollback the Changes
If you have made recent changes to your WordPress website, you can try reversing it back. If you have installed a plugin from an unknown source, you will see this issue. Some of the plugins have bad code that might crash the website or show error in specific pages.
In such cases, you can simply rollback the changes and fix 404 not found error. If you have installed a plugin, you can deactivate the plugin and try again to see if the error still occurs or not. In the same way, if you have installed a theme, you can switch back to the default theme to see if it fixes.
You can also try to deactivate all the plugins and switch back to the default theme. This will surely fix the issue.
Now, this can only be possible if you have access to the WordPress panel. What if you don’t even have access to WordPress panel?
In such cases, you can go to your file manager and change the name of the plugin. This will automatically deactivate the plugin. You can also delete the folder and move it to trash.
In the same way, if you want to deactivate all the plugins, you can change the name of the “plugin” folder, this will deactivate all the plugins. The same applies to the theme.
The Post Change Error
Sometimes, the error is from the WordPress side. If you can see the title or the menu of your website, the error is from the WordPress side.
This usually means that your post/page URL is changed or you have deleted that post. You can see if the post is available and if it is the same URL or not. In some cases, the permalinks might be different.
For example, if you have just migrated your website, the default permalinks will begin with page id. You can change to the name. This is a common way to fix this error.
Now, if you are changing the post or the pages a lot and this also changes the URL, you can install a redirection plugin from the WordPress directory.
The plugin will automatically change the URL of the edited posts. So, you don’t have to worry about the error. Further, you can also add manual redirection where you can add the source URL and the final URL. The user will be redirected to that page directly.
Some of the SEO plugins like Rank Math also gives the redirection option. The point is that you need to change the URL.
DNS stands for Domain Name Server. While pointing the domain name to your hosting, there are name servers needed to do it. If there are some issues there, you will see a 404 error on your WordPress website. So, you can fix the issue by going to DNS settings.
You can generally try resetting the nameserver. Please note that it takes up to 48 hours for DNS propagation. If you just reset it, you need to wait for at least 48 hours for changes to take effect.
Therefore, you can either wait for 48 hours if you have just changed it. However, if not, you can surely check the DNS to make sure everything is alright. Just make sure that the domain name is pointed to the right nameservers.
If you have changed the hosting, you will also have to change the name servers. So, make sure you change it. Once you do the changes, you can try refreshing the page. Wait up to 48 hours for changes to propagate.
Make sure you check the website in incognito mode to get rid of cache memory.
If none of the above things solves it for you, you can surely try contacting your hosting provider or domain name registrar. Sometimes, the issue is caused by their side. This is a very rare scenario where something like this might happen.
In most cases, the above-given ways will fix the 404 not found an error in WordPress. However, if nothing works, you can surely contact the support. They will help you.
With that being said, if you are using CDN, you can also check out the CDN’s website.
To conclude, these are some of the ways to fix the 404 not found error in WordPress. You can try all of them one by one. One of them will surely work and the error will be gone. Make sure you check the website in the incognito mode. This will make sure that the cache is cleared. If you don’t clear it, the website will be loaded from the cache memory itself. Therefore, you can try it in incognito mode. If you are using a cache plugin for WordPress, make sure you clear the memories. This will make sure that the fresh website is served to the new visitors without any issues. As a result, the error won’t be shown.
WORDPRESS WEBSITE BROKEN? WordPress Emergency Service
Stop wasting your time we will fix your website today!