oscartheduckin’ around

April 15, 2007

FreeBSD and WordPress live in harmony together, along with apache 2.2

Filed under: apache, freebsd, wordpress — oscartheduck @ 1:10 am

This’ll get at least a good portion of the way there.

First, create your mysql database for wordpress, as detailed here: http://codex.wordpress.org/Installing_WordPress#Using_the_MySQL_Client

To install wordpress, simple cd into /usr/ports/www/wordpress and do a make install clean.

Now cd into /usr/local/etc/apache22/ and edit httpd.conf such that index.php is before index.html on line 212 or so. NOTE that we’re dealing with apache 2.2 in this guide. NOTE IT AGAIN. If you are using OpenBSD, this won’t be accurate for you. I imagine that the freebsd handbook information for Apache1.3 would help, but I can’t guarantee it. —- edit: It just crossed my mind to say that if you don’t have an apache22 directory,you don’t have apache installed. do “cd /usr/ports/www/apache22 && make install clean”

Also, make sure that the following two lines are in there:

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

They’re on 355 and 356 for me. Just make sure they’re in there.

Now cd into /usr/local/www/ and do an ls. Note that there’s the regular old apache22 directory AND ALSO a data directory. If you’ve used apache before, you’ll know that this is the name of the directory that apache uses to serve web pages. If you haven’t, now you know. HOwever, it’s in the wrong place. There’s a reason for this. cd into apache22 and ls. You’ll see another data directory! This is the correct one for apache’s default web page, the IT WORKS! page.

So what’s in the other data directory? Well cd ../data and take a look. There’s a wordpress directory in there. Thatwordpress directory is your wordpress setup; it needs to be moved to the apache22/data folder. The thing to do is this:

mv /usr/local/www/apache22/data /usr/local/www/apache22/data.old

mv /usr/local/www/data/wordpress /usr/local/www/apache22/data


cd /usr/local/www/apache22/

cp wp-config-sample.php wp-config.php && vi wp-config.php

It tells you what edits to make to the file. There’s only a few, make sure they replicate the stuff you made in the mysql database.

Now visit your apache URL and see what’s what. If everything goes according to plan, it’ll present you with an install screen with a choice of automagic or manual or something. Do the manual. The automagic ain’t worth it and you ain’t using freebsd for ease.


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Blog at WordPress.com.

%d bloggers like this: