Getting permalinks to work in WordPress

After installing WordPress I noticed the links weren’t working. To get permalinks (pretty links) to work with Apache you need to have mod_rewrite enabled and configured in a .htaccess file. WordPress can add the right lines but only if it has write access to the file. I did the following.

% cd blog
% touch .htaccess
% su
% chgrp webfiles .htaccess
% chmod 664 .htaccess

Then go back to the WordPress admin page, change and save the permalink options again. The .htaccess will be modified as required. This is all explained in the WordPress documentation.

This entry was posted on Wednesday, May 28th, 2008 at 07:51:40 Europe/London and is filed under WordPress. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a reply