When importing an existing database or restoring your WordPress, there are times when your posts and topics send back a 404 error page.
The error usually tells you your website, followed by the format of how you set your posts. So an example may be
Or something similar to that. What we need to do is reset this to default settings, and after that you can change the format to what you had originally. To do this, head to your WordPress dashboard and hover on “Settings” and click on “Permalinks”. Now you can change the “Common Settings” to default and save changes. Your WordPress posts should now be fixed. You can now set the format back to the way you had it and it should still work.