The installation of WordPress is simple and straightforward. Really. So I’m not going to detail the installation process, which is well documented here. However, the permalink feature does not work out of the box on a standard CentOs 5 distribution. Some changes have to be made in the apache configuration files to enable mod_rewrite in your WordPress directory.

Let’s say you installed WordPress in the root of your website. By default on your CentOs’s apache, the document root of your website is located in /var/www/html.

  1. create an empty a .htaccess file in this directory.
  2. WordPress should be able to read/write this file when updating your settings in the admin pages, so make sure the user running apache has the right to write this file. If not, chmod/chown it. Usually this should do the trick:
    chown apache:apache /var/www/html/.htaccess
  3. now edit the /etc/httpd/conf/httpd.conf file. Search the following:
  4. <Directory “/var/www/html”>

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

  5. Change this line to:

    AllowOverride All

  6. This allows apache to read and interpret the .htaccess located in you document root.

  7. Restart Apache

    [root@optusnet]# service httpd restart

  8. Now you can change your permalink settings in the admin pages of WordPress, which will modify the .htaccess file created above.

Pin It on Pinterest

Share This