In order to enable permalinks in WordPress, custom htaccess files are created. Your server only reads these if “AllowOverride” is set to “All” in your Apache configuration.
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
If you host a single site within an “html” directory:
<Directory "/var/www/html">
AllowOverride All
Options Indexes FollowSymLinks
Require all granted
</Directory>
If you host multiple sites within the “www” directory:
<Directory "/var/www">
AllowOverride All
Options Indexes FollowSymLinks
Require all granted
</Directory>
Do not put “AllowOverride All” in