Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am running a backup of my website on Ubuntu 12.10 (apache+mysql). I can see properly admin and home page, but permalinks are not working (so urls like this are failing: localhost/page/.../).

What I did till now is:

1) Created file .htaccess via settings->permalinks with the content:

# 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]

# END WordPress

2) Added rewrite apache module with:

sudo a2enmod rewrite

3) Changed in the file sites-enabled/000-default the row:

AllowOverride None


AllowOverride All

4) Finally restarted apache with:

sudo service apache2 restart

Anyway I am still getting "not found" when I visit a permalink.

How can I make the permalinks work?

share|improve this question

2 Answers 2

Check in a phpinfo() that the mod_rewrite works. Also refresh the permalinks in the backend. Permalinks works fine, also on Ubuntu 12.10.

share|improve this answer
If you have already run sudo a2enmod rewrite command but your URL Rewrite is not working.
To make .htaccess files work as expected, you need to edit this file: 
Step1 : sudo vi /etc/apache2/sites-available/default

Step2 : Look for a section that looks like this: 
    <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
                # Uncomment this directive is you want to see apache2's
                # default start page (in /apache2-default) when you go to /
                #RedirectMatch ^/$ /apache2-default/
You need to modify the line containing AllowOverride None to read AllowOverride All.
step 3 : sudo /etc/init.d/apache2 reload
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.