In my case, firstly, I had to update the .htaccess file inside the website root folder:
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
WordPress does this automatically if it has write permission. Otherwise, he will complain that he cannot write to him and give the above code example so you can manually update .htaccess .
After that I edited the apache2.conf file. On Linux, it is located in /etc/apache2/apache2.conf , there will be such a section:
<Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory>
Change AllowOverride None to AllowOverride FileInfo .
Finally, run the following commands:
sudo a2enmod rewrite service apache2 restart
All these steps are necessary for work.
source share