How to Fix WordPress Posts Returning 404 Error
Step 1: Reset Your WordPress Permalinks
Step 2: Restore Your .htaccess File
Step 3: Disable All of Your WordPress Plugins and Theme
Step 4: Set Up a 301 Redirect for Moved or Renamed Content
If you want a complete step-by-step guidance then please visit “How to Fix WordPress 404 Error”
Save Permalinks to Fix WordPress Error 404
Very often, the solution to 404 error in WordPress is simply saving your permalinks. Doing this will update your .htaccess file with the correct configurations for your WordPress website.
To save permalinks, login to your WordPress dashboard and go to Settings > Permalinks.
Next, scroll to the bottom and simply click Save Changes.
Now try accessing your posts to see if the issue is resolved.
Manually Reset Permalinks
Add this code to your .htaccess file:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
After editing and uploading the file, refresh your site and access posts and pages to see if this fixes your WordPress error 404 issue.
Regards, James Cutt