Permalinks on WordPress (amazon EC2)

less than 1 minute read

Published:

Motivation: in my particular case I moved a WordPress site from Bluehost to amazon’s EC2. Permalinks were not working.
Solution: I had to modify the override option from my httpd service.

  1. Go to /etc/httpd/conf and edit httpd.conf```

     Options FollowSymLinks
     AllowOverride All
    

    ```

  2. Change also AllowOverride if it is set to None. ```

    # AllowOverride controls what directives may be placed in .htaccess files. # It can be “All”, “None”, or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride All ```

  3. I you haven’t created it yet, place in the root directory of your wordpress installation a .htaccess file with the following contents: ```

    # BEGIN WordPress

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

    # END WordPress

    ```

Source: this post.