I have encountered this interesting issue with WordPress permalinks when I was installing WordPress locally. Everything was fine until I changed WordPress Permalinks Settings to Post Name. The
.htaccess file was created, it had correct permissions, but the page still didn’t load!
In console open the file
sudo nano /etc/apache2/sites-available/000-default.conf
DocumentRoot /var/www/html place the following code that will enable overrides. You may need to change the link!
<Directory /var/www/html> AllowOverride All </Directory>
Then enable apache module rewrite.
sudo a2enmod rewrite
And restart the server.
sudo service apache2 restart
Yay, now pages load with post name permalinks!