Enabling SEO-friendly titles for Wordpress on Ubuntu Lucid Lynx
Been experimenting with some Wordpress setups and ran into trouble implementing pretty permalinks, like:
http://localhost/myblog/this-is-a-single-post/
Turned out to be an Apache configuration problem. Here’s the solution that worked for my dev environment (Ubuntu Lucid Lynx):
First, make sure mod_rewrite is enabled:
sudo a2enmod rewrite
which adds the module. Checking with:
ls /etc/apache2/mods-enabled/rewrite*
you should get a single rewrite.load file.
Next, edit either /etc/apache2/httpd.conf or /etc/apache2/sites-enabled/mysite and change the option:
AllowOverride None
into:
AllowOverride All
Now, going back to Wordpress admin, go to Settings > Permalinks and set Custom Structure to /%postname%/. This should write to the .htaccess file automatically, or you could write it yourself. However, if you wish to have Wordpress do the editing of the .htaccess file for you because you’re a lazy irresponsible chump that runs his car into flooded streets, simply allow the webserver to write to the file:
chmod 755 .htaccess chown www-data:www-data .htaccess
Afterwards, this should enable SEO-friendly URLs for your posts. Be ready with some champagne and chips for the ensuing site choke due to increased traffic.







