I recently installed wordpress , I am facing issues when I try to change the permalinks format ,
when I change the permalink from default to day and time
Default http://127.0.0.1/?p=123
Day and name http://127.0.0.1/2015/03/16/sample-post/
the link generated does’t working , it gives the same error 404
all the
time ,
The requested URL /2015/03/16/post-5-problem/ was not found on this server.
But when the permalink type was default this works perfectly.
I found some solutions which are
sudo a2enmod rewrite
Module rewrite already enabled
Another solution is to change the mode permissions of .htaccess file to 666(giving write permission to wordpress of .htaccess file) before change the permalink from default to some other type ,
sudo chmod 666 /address_of_.htaccess
i checked the .htaccess file
# 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
but the above seems to be correct , the above included by the wordpress itself
Both the solutions does’t seem to work , is there any other thing do I have to change to enable the permalink options ?
If it is a fresh install of web server it is possible that .htaccess rules are not allowed by default. To fix that, edit you httpd.conf (usually it is in /etc/apache2), find
and change
to
Then restart your web server and try again.
Reset your desired permalink from wordpress admin area and add this code in htaccess:
Now, check with blog posts and pages.
Thanks,
You can go to preferences -> services & ports and you need to check enabled ssl for Apache
It’s working for me
You are receiving this error because your webserver cannot find the file, and it’s not passing the request to WordPress.
You need to add rewrite rules for your WordPress, and instructions for that depend on your webserver software (Apache, nginx, etc).
Example with nginx:
Which literally means: try to open “/2015/03/16/post-5-problem/” in filesystem first, if it doesn’t exist try to add a slash, if that doesn’t help pass the request to index.php (which is WordPress main file) with the arguments.
Enabling rewrite module is not enough, you have to add rewrite rule(s).