Go to Settings » Permalinks, and simply click on Save Changes button.
This will update your permalinks settings and flush rewrite rules. In
most cases this solution fixes the WordPress posts 404 error. However,
if it does not work for you, then you probably need to update your
.htaccess file manually.
Login to your server using FTP, and modify the .htaccess file
which is located in the same location where folders like /wp-content/
and /wp-includes/ are located. The easiest thing you can do is to
temporarily make the file writeable by changing the permissions to 666.
Then repeat the original solution. Don’t forget to change the
permissions back to 660. You can also manually add this code in your
.htaccess file:
on their computers using a local server for testing purposes. If you
want to use pretty permalinks, then you need to enable the
rewrite_module in the Apache configuration of your MAMP, WAMP, or XXAMP.
We have written a tutorial here on how to enable custom permalinks in WordPress local environment.
How to Fix WordPress Posts Returning 404 Error
This will update your permalinks settings and flush rewrite rules. In
most cases this solution fixes the WordPress posts 404 error. However,
if it does not work for you, then you probably need to update your
.htaccess file manually.
Login to your server using FTP, and modify the .htaccess file
which is located in the same location where folders like /wp-content/
and /wp-includes/ are located. The easiest thing you can do is to
temporarily make the file writeable by changing the permissions to 666.
Then repeat the original solution. Don’t forget to change the
permissions back to 660. You can also manually add this code in your
.htaccess file:
1 2 3 4 5 6 7 8 9 10 | # 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 |
Fix for Local Servers
Often designers and developers install WordPresson their computers using a local server for testing purposes. If you
want to use pretty permalinks, then you need to enable the
rewrite_module in the Apache configuration of your MAMP, WAMP, or XXAMP.
We have written a tutorial here on how to enable custom permalinks in WordPress local environment.
How to Fix WordPress Posts Returning 404 Error
No comments:
Post a Comment