Wordpress permalinks problem on Ubuntu

Posted March 15, 2014 6.6k views
I install wordpress and all works fine, only i can't change my permalinks. When i try to do that i get 404 error. I create .htaccess file in worpdress root folder, below folders wp-admin, wp-content, wp-include.. I paste this in .htaccess # BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # END WordPress and set permisions to 666. Also mod_rewrite is enable on my server and I restart server too. You can see my error on [try to open some post]. Do you have any idea what to do? Where i can do this? "Edit your VirtualHost config making sure AllowOverride is set to all." On my server i have 3 domain, 3 Virtual hosts but i don't can't find AllowOverride there.. :/

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
3 answers
Manuall add the 'AllowOverride all' line to the virtaul hosts

For more info
Thank you for your answer.

Do I need to put that 'AllowOverride all here? :

# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.


ServerAdmin webmaster@localhost
DocumentRoot /var/www/

# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
ok.. i done it... It works great.. For others i will weite here how to SOLVE permalinks problem on Ubuntu.

when you install wordpress, thne you need to create .htaccess file in root folder of wordpress [under the folder wp-admin, wp-content, wp-include],
In htacces file just paste this :

# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

and set permissions on that folder 664

after that go to etc/apache2/site-available/

And on the end of that file just paste this

Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all

That's all. I hope it will help you.
  • Using sudo apache2ctl graceful returns this:

    AH00526: Syntax error on line 38 of /etc/apache2/sites-enabled/
    AllowOverride not allowed here
    Action 'graceful' failed.
    The Apache error log may have more information.