WordPress and permalinks and Mac OS X.
Im playing around with a WordPress
installation on my laptop for a project, and had a hell of a time
getting permalinks to work properly. I figured that my experience might
be worth documenting for anyone else whos playing around with Mac OS X.
I
should note that I had to start from the beginning for this
installationI had to install MySQL using Fink, futz around with it
until I got it starting reliably and was able to create a database for
WordPress, then I had to enable PHP in the Apache httpd.conf file. At
that point I was able to run the WordPress installation script and
start tweaking options. But permalinks werent working.
I started
digging deeper and found out why. While on Manila a permalink consists
of an anchor on a page generated dynamically by Manilas custom HTTP
server for which the content is assembled in Frontier, WordPress uses Apaches mod_rewrite
to parse the incoming URL, figure out which content is being requested,
then get that out of the database and return it in the standard
template. Manilas approach allows the blogging engine to control the
whole process from start to finish, while WordPresss has a series of
dependencies: on Apache, on mod_rewrite, and, it turns out, on the file
system.
So here, skipping all the tried-and-failed steps, is what I had to do to get permalinks enabled:
- Verify that .htaccess actually exists.
- Chmod change the file permissions on the .htaccess file so that WordPress can rewrite it.
- With help from a posting on the WordPress support site,
figure out that I need to insert some specific language in the
httpd.conf file, to wit, some directives for the specific directory
where WordPress lives:- Options Indexes MultiViews SymLinksIfOwnerMatch
- AllowOverride Options FileInfo
- And, just for kicks and giggles, update the httpd.conf to add
index.html.var
to theDirectoryIndex
line.
And some combination of those enabled mod_rewrite to work. (This posting on the old Textpattern site provided some insight as well.)
Ive
long admired the flexible navigation that WordPress providedthe
ability to have monthly archive pages as well as a calendar, for
instanceand its apparent to me now that the use of mod_rewrite is
what makes that possible. I do wonder about the scalability of that
solutionwould it survive a Slashdotting?but its interesting, having
used Manila for so long, to see how another platform handles the same
issues. [Jarrett House North]