Install on Ubuntu Print Friendly Version of this pagePrint Get a PDF version of this webpagePDF permalinks_on_ubuntu.html — rev 17 October 2014 ➽ back to dir

How to get permalinks working in Ubuntu:

 Step 1. apache: Enable the rewrite module 

    You an see which modules are loaded:
    $ sudo apache2ctl -M
    If mod_rewrite isn't in the list do this:

      Make a symlink from the rewrite module in the directory
      mods-available to mods-enabled (details coming up)

      OR even easier, enable by a command:
        $ sudo a2enmod rewrite

  Step 2. apache: tell apache to read .htaccess file
     Find this code:
     <Directory /var/www/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All 
            Order allow,deny
            allow from all 

     In /etc/apache2/sites-available/000-default.conf

     If it's not there:
     Look in /etc/apache2/apache2.conf

     If you are using virtual hosts, you may have to change it in that file as well.

     Change AllowOverride None to AllowOverride All

  Step 3. restart apache:
      $ sudo apache2ctl restart

  Step 4. wordpress install: .htaccess file - need to make it, wp can't write it.
      Copy the code that WordPress gives you when you enable PermaLinks.