404 error, it is common problem that most WordPress developers face sometimes posts pages are returning 404 error. It's possible shows error if your .htaccess file got deleted or may be rewrite rules.

Can fix 404 error using permalinks settings and flush rewrite rules. 

Logged into your admin dashboard need to do is fix your permalinks settings.

Most probably fixes the 404 error thereby solution, If it dows not works then you need to update .htaccess file

Create a file with the name of .htaccess and add below lines,


# 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