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”
Step 1: Reset Your WordPress Permalinks
The first step to try is resetting your permalinks. Head to your WordPress dashboard and navigate to Settings > Permalinks.
From here, just click on Save Changes. That’s right — you don’t actually need to edit anything. Clicking that button will update the permalink settings even if you don’t make any changes. This is important because it also refreshes the rewrite rules used for “pretty permalinks.”
With this done, go ahead and reload the pages you were trying to access. If everything works, you’re all done. If you still get a 404 error, head to the next step.
Step 2: Restore Your .htaccess File
If resetting your permalinks didn’t work, the next strategy is restoring your .htaccess file. This controls how WordPress interacts with the server and how it generates permalinks for your pages. Restoring it to the default settings can fix sudden 404 errors.
To restore the .htaccess file, you’ll first need a way to access it. If you’re using DreamPress hosting, you can use the built-in file manager found in the DreamHost control panel. Most other web hosts offer a similar feature, or you can use a Secure File Transfer Protocol (SFTP) client such as FileZilla. We have detailed instructions for connecting via SFTP if you need help.