I've just recently setup a new Wordpress site on a Debian based VPS. I've managed to get everything working fine except for the permalinks. None of the options work except for the default one.

My .htaccess file currently looks like this -

# 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

Any idea how to fix this?


  • If the default works, then try reading <a href="codex.wordpress.org/Using_Permalinks">Using_Permalinks </a> before setting a custom permalink structure again. If clearing your Permalinks does not alleviate the issue, this could be attributed to anything from a web server configuration to a bad WordPress install.
    – Tara
    Nov 4, 2014 at 23:48
  • 2
    make sure mod_rewrite is installed and enabled.
    – Milo
    Nov 5, 2014 at 0:52

3 Answers 3


Have you tried something simple to ensure it is actually rewriting? Something like...

RewriteEngine On
RewriteRule ^.*$ verified.php

Then create a verified.php page...

print 'mod_rewrite works!';

Now you should hit that page no matter where you try to go on the site. If you don't mod_rewrite isn't working.

You can also turn on mod_rewrite logging. You cannot do it in .htaccess but you can in the VirtualHost directive or directly in your server's conf file.

RewriteEngine On
RewriteLog "/var/log/httpd/rewrite.log"
# From 0 (no logging) to 9 (OMFG make it stop)
RewriteLogLevel 3

Once it is on you can see what is, or isn't happening.

Oh and don't forget to turn it off. It can have a serious impact on the server if it is set 3+.


I know this is not the greatest answer by i had a similar issue only the other day and I recommend is to download Wordpress again and upload the .htaccess file and save permalinks also make sure your uploading in binary mode

  • "not the greatest answer" — well, sometimes files become corrupt during a read/write process, or an update will not fully complete, so there are good reasons why this might fix the issue. If permissions are correct and mod_rewrite is enabled, and this approach works, it's a good answer! Apr 30, 2017 at 3:13

As @milo said in the comment, the most usual cause of such a behaviour is not have mod_rewrite active. How to activate it might vary between OS (or apach distributions on windows and macOS) so best to consult the documentation relating to activating apach modules on your specific OS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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