Revamping Church Website
I attend church services at the Kirkwood Church of Christ, and have for almost my whole life. In around 2005 I helped create the church website and have maintained it ever since. It is extremely basic, made entirely of static file content. It uses frames. Boilerplate HTML (the header for example) is copied into almost every HTML file. This is a website that would have been unimpressive back in 1997. It is extremely mundane and time-consuming to make almost any changes or addition to the content, and I have very little time to spare.
So I am redoing it from scratch, in the hope that some much-needed work this month will make future changes much easier. The main catalyst is that we want to be able to post the audio from every sermon, basically a podcast. A slightly less high priority would be to set up a blog for the preacher (L.A. Stauffer) and fold the existing “bulletin articles” into that. While I’m at it, I’d like to do a proper CSS layer, and if time permits I’d definitely like to add some jQuery goodness.
I decided it would be a good idea to blog my progress, for my own information if nothing else. So here goes.
Settling on a stack
(I stole that phrase from Alex’s blog entry, about the reference web app we implemented for Terracotta.)
LAMP will be the stack, basically. We are using ipower for web hosting. The server environment they have us hosted on, in a nutshell, is Debian, MySQL 5.0.45, Perl 5.8.8, PHP 4.4.7. Which is great, because I was thinking I wanted to use Wordpress for the sermon podcast. I decided I would do the work on my work MacBook Pro, I would use git for version control, and I would try to set everything up to run locally on the MBP before promoting to production.
By the way, I’ve never programmed in PHP before.
Day One
I spent about eight hours on Tuesday the 23rd getting started. By the end of the night I had installed PHP and Wordpress on my MBP, set it up with mysql, and had a running empty Wordpress blog running on my localhost. Here’re are some notes.
Apache 2.2.11 wouldn’t build on my box for some reason, so I reverted back to 2.0.63. (The whole make process for that project is amazing, how it auto-detects various things about the environment it’s being built with.) I decided I wanted to keep my project in a directory separate from the web server install, so I had to edit the httpd.conf file and add an Alias for that directory.
Wordpress has a nice famouse 5 minute install that walked me through creating the mysql user/password and database, then editing the wp-config.php file to use it. During this installation I realized I hadn’t installed PHP yet, so I did that (required more edits to httpd.conf). Then the next gotcha – apparently the way mysql hashes passwords is incompatible with PHP 4.4.x (or something), so the password has to be created in mysql like this:
mysql> SET PASSWORD FOR 'username'@'localhost' = OLD_PASSWORD('supersecretpassword');
Day Two
Tonight was my second night of working on things. My two accomplishments were to install git and get the initial project structure into version control, and to install the Eclipse PDT plugin for PHP development, and create an initial project out of the directory I’m working in. I have yet to open a single PHP file or program a line of code, but it feels good getting this much of my development environment squared away.
I got some help from Kyle Cordes’ blog about git, as well as the handout I kept from his talk at the St. Louis Java User’s Group.
Still a lot of unanswered questions. In particular, I’m not sure if Wordpress will be a good enough fit for what I want to do. I like the way Wordpress can do both blogs and static pages, so I’m hoping I can use a single installation of Wordpress to handle the main web site and also the podcasts, and I’m wondering if it’s possible (and easy enough) to modify Wordpress to be able to handle a separate blog (the preacher’s articles). So, two (or more) blogs but just one site, one theme, one mysql database. I’m guessing all the php can be modified to do this but I don’t really know.