Solution:
I’ve got it.
For anyone looking for a solution to the same problem, here’s guide:
- Change permalink settings in wp-admin to pretty permalinks
- Install mod_rewrite module in apache
- The most important part, in etc/apache/apache2.conf (NOTE THAT YOU MUST CHANGE THE NAME OF FOLDER):
<Directory /> Options FollowSymLinks AllowOverride All Require all denied </Directory> <Directory /usr/share> AllowOverride None Require all granted </Directory> <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> #<Directory /srv/> # Options Indexes FollowSymLinks # AllowOverride None # Require all granted #</Directory> <Directory "/var/www/html/NAME_OF_YOUR_PROJECT_FOLDER"> Options FollowSymLinks AllowOverride All </Directory>*
- Restart apache