There are several ways to fix WordPress error 404:
When you are using Word Press, you might face too many mistakes; WordPress error 404 is one of them. Error 404 flashing frequency is higher as compared to the other one, and it comes unexpectedly.
In this guide, we will try to let you know the root causes behind this and several ways to fix this error.
Leading causes behind to get this WordPress error 404:
- Permalinks of Wordpress site are responsible for generating error codes
- Some time user type incorrect URL in the browser address bar might be causing to getting this error code.
- Changed in the Wordpress directory root directory purposely or accidentally.
Several ways to fix this WordPress error 404:
Though this word press error 404 is related to you links, you can fix it by reconfirming that permalinks are correctly configured or not. You also required to reset linking structure using .htaccess file.
fix-1:
Save permalinks:
In most of the cases, this error can be flush out by just saving permalinks. To do this, first, go to the site dashboard, then choose a setting, then Permalinks. Once you reach the desired location, scroll down below and click on the save change button to save permalinks.
I hope this work for you still you are facing the same error, kindly proceed to the next solution.
Fix-2:
Reset Permalinks manually:
Simple saving process for Permalink does not work; you have to do this reset process manually by making slight changes in the .htaccess file.
To do manual changes, first, access your wordpress site through FTP. Once you access the website, try to locate the .htaccess file for editing purposes. Make changes in the appropriate file and upload it again to your server.
2.1. Reset operation when WordPress site exists in the main domain:
If wordpress site exists in the main-domain, You have to replace your existing code with the new code given below.
<# Begin word press
<IfModule med_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteRule ^index\.php$ -[L]
RewriteCond %{REQUEST_FILENAME}!-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END Wordpress
2.2: Reset operation when WordPress site exist in sub-domain
Suppose if your wordpress site is in the sub-domain like the blog. yoursitename.com. use the code to your .htaccess file.
Rewrite engine on
Rewrite base /
RewriteRule ^index\.php$ – [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -F [OR]
RewriteCond %{REQUEST_FILENAME} – d
RewriteRule ^ -[L]
RewriteRule ^ (wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\php)$ $1 [L]
RewriteRule . index.php [L]
2.3: Reset process when WordPress site is in subdirectory:
incase if the WordPress site is in a subdirectory, i.e., www.yoursite.com/blog. please include this code in .htaccess file
RewriteEngine On
RewriteBase
RewriteRule ^index\.php$ -[L]
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin? $1wp-admin/ [R=301, L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ – [L]
RewriteRule ^([_0-9a-zA-Z-]+/) ? (wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php) $ $2 [L]
These are the possible ways to fix WordPress error 404. I hope this will find it suitable for you. Still, you are looking more in detail; keep in touch with the Certified team.
Read Also: WordPress 503 Error