WordPress is an excellent website building platform; however, sometimes, even a slight change can make your website unavailable.
Another common issue (like internal server error) that you might face is your posts/pages returning a 404 not found error.
Permalinks
If you see this error in your browser – it means that the web server couldn’t find the page/file you were looking for.
To fix the issue in question, login to your WordPress dashboard and head to Settings section > Permalinks option, and click the Save Changes button.
This action will force WordPress to update and flush the rewrite rules in .htaccess file automatically and bring back your missing posts.
Rewrite rules
If this doesn’t help, you probably need to update the rewrite rules manually.
.htaccess file
Create a new text file on your computer with .htaccess name and paste the following content into it:
#BEGIN WordPress
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
Then, log in to your cPanel control panel.
Then launch the File Manager feature under the Files section:
Double-click the public_html folder to enter it, remove the old .htaccess file (you can back it up locally just in case first), and upload the new .htaccess file you created using the Upload feature in the top menu.
Local server
If you’re a web developer or web designer running WordPress locally on your computer for development purposes – you need to make sure to enable the rewrite_module in Apache web server in your MAMP, WAMP or LAMP installation.