WordPress.org

Ready to get started?Download WordPress

Forums

[SOLVED] Permalinks not working in Apache2 Ubuntu 10.10 (6 posts)

  1. specialk1st
    Member
    Posted 3 years ago #

    I had to search various sites to solve this problem so I figured I would pass on the knowledge in one succinct solution.

    How to get WordPress permalinks / pretty links to work in Ubuntu 10.10 with Apache2:

    By the way, this should be the same in Ubuntu 10.04 as well, but I haven't actually tested it there as well.

    1. Manually create a ".htaccess" file and save it in your main WordPress directory. (This is the one with the wp-admin, wp-includes, and wp-content folders.)

    2. Go to the Ubuntu terminal and type:
    sudo chown -v :www-data "/enterYourFilePathHere/.htaccess"
    You should see a line printed saying that the (group) file ownership has been changed to www-data (Apache2).

    3. Give Apache2 write access to the file:
    sudo chmod -v 664 "/enterYourFilePathHere/.htaccess"
    You should see a line printed saying that the mode of the file has been retained.

    4. Next, we have to allow WordPress to write to the .htaccess file by enabling mod_write in the Apache2 server. Type the following in the terminal:
    sudo a2enmod rewrite
    You should see a line printed saying that it is enabling mod rewrite and reminding you to restart the web server

    5. So let's do that. Restart the web server, Apache2, for the changes to take effect by typing:
    sudo /etc/init.d/apache2 restart
    We are all done with the command line prompt; you can close the command line window now.

    5. Go into your WordPress admin panel (i.e. http://yourDomain/wp-admin). Go to the Settings --> Permalinks and select the permalink format of your choice. Hit the "Save Changes" button.

    6. DONE! Go to your site and check any page (other than your homepage) to ascertain that everything is working as expected.

    Hope this helps someone. Leave me a comment below.

  2. wmsedgar
    Member
    Posted 3 years ago #

    Thanks for the post, worked for me too. I just wasn't sure where to put the .htaccess file. I'm using Ubuntu 10.04 and WordPress 3.1.1.

  3. Sulcalibur
    Member
    Posted 3 years ago #

    I tried this and no luck
    This is causing me great headaches :(

  4. demonboy
    Member
    Posted 3 years ago #

    Nope, doesn't work for me either.

    I can successfully change the chmod and the various permissions you suggest but restarting apache does nothing, and even logging off and restarting the computer does nothing either.

    I'm using Ubuntu 11.04 and 3.1.2.

  5. infamousmike
    Member
    Posted 3 years ago #

    Worked Perfectly, Thanks!

  6. ijonas
    Member
    Posted 2 years ago #

    I had the same problem of following the suggestions in the post and it not working on Ubuntu 10.04 running Apache2.

    The additional step I had to take was to edit /etc/apache2/sites-enabled/000-default.

    In that file you'll find an AllowOverride setting for /var/www, saying "None".

    Change the setting to say: AllowOverride All

Topic Closed

This topic has been closed to new replies.

About this Topic