404 not found after changing permalinks to post name in wordpress

Clean default wordpress installation, all fine, just when I change permalinks in wordpress settings to post name, the default wordpress post is given 404 not found. Any help would be appreciated.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Ok, found the solution,

<Directory /path/to/site>
     #add the following setting to allow .htaccess in your web dir to work
     AllowOverride All

     #other settings ---


and thats in the /etc/apache2/apache2.conf file

be sure to add mod_rewrite and restart apache after that

sudo a2enmod rewrite

sudo service apache2 restart

same her how to solve this problem