I am getting problem of permalink in WordPress not works at localhost but perfectly work at server.I am also word press developer and get these problem many times.Can you please
If you are using ubuntu system then you need to enable apache2 mod_rewrite for your setup. Try this command
sudo a2enmod rewrite
You will get message like below:
Enabling module rewrite.
To activate the new configuration, you need to run:
service apache2 restart
Now enter this command to restart your apache web-server.
sudo service apache2 restart
This should solve your problem. If the problem persist then you need to change apache config file (apache2.conf
):
$ sudo gedit /etc/apache2/apache2.conf
Search for
model for your localhost root directory path. Web-server root path may very based on your apache installed version. It might be
or
. Its mostly like following:
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
Change AllowOverride None
to AllowOverride All
. Save and close the file. Restart your apache web-server
sudo service apache2 restart