WordPress in localhost: permalinks

There could be some problems to fix setting wp in localhost.

One is to get permalink working: there are at least two steps:

  • a working .htaccess (in the root of wp installation) with a code that wp itself will provide,
  • and a corrert apache configuration (in apache configuration file, such as apache2.conf or httpd.conf), that is you should set something like the following:
<Directory /var/www/html>
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
</Directory>

<Directory /var/www/html/your-path/to-local-wp>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>
  • furthermore you should do this command: sudo a2enmod rewrite
  • and then sudo systemctl restart apache2

Lascia un commento

Il tuo indirizzo email non sarĂ  pubblicato. I campi obbligatori sono contrassegnati *