For quite some time I have been bothered by the EP Studios website. Although created in 2004, it had an amateurish, out-dated, 90s-website appearance from the get-go. I was initially proud of it anyway, because I had to learn on my own how to set up an Apache server, write the HTML, set the file permissions, etc. It was my own site, on my own computer! Nevertheless there was little doubt that, aesthetically, it sucked. When I started blogging a few years back, I installed WordPress on my server and linked the blog page to my home page. Initially the default themes for WordPress were not much prettier than my website, but with WordPress 3 and themes like TwentyTen, suddenly the blog page looked a million times better than the rest of the site. I had read about hosting a whole website on WordPress, and so I decided to proceed.
The first issue, which turned out to be the most time-consuming issue of the project, was related to the fact that I had installed WordPress originally in a sub-directory of the root of my website. In other words, on my webserver Sluggo, www.epstudiossoftware.com was /srv/www/htdocs/, but all the blog stuff was at /srv/www/htdocs/blog/. My home page had to be at www.epstudiossoftware.com for people to find my site, but in actuality if I was using WordPress for my home page it would have to be at www.epstudiossoftware.com/blog/. I looked at the WordPress Codex for information on moving the WordPress files to a different directory. This is an intimidating process, with the possibility of having to edit the MySql database directly to fix broken links. I didn’t want to tackle that. The answer to my dilemma was redirection, i.e. when the user went to www.epstudiossoftware.com he or she would automatically be sent to www.epstudiossoftware.com/blog/. I tried to use a .htaccess file to do this, adding the mod_rewrite module to Apache, doing everything correctly, and I couldn’t get it to work. I’m not sure why. The solution I came up with was simple though. I replaced the index.html file in my root directory with the following index.php file:
<?php header("Location: /blog/index.php"); ?>
This smoothly redirects as desired. The rest was easy. I created static pages in WordPress, then cut and pasted HTML content from the original web pages. I updated some links, e.g. some images that were in the ./images directory compared to my original root had to be changed to ../images relative to the /blog directory. I used the Reading Settings of WordPress to set my new Home page, and created a blank page named “Blog” and set it as my blog page. The old posts automatically went to the Blog page, and that was pretty much it. Now my whole website uses the nice TwentyTen WordPress theme, and content is easy to add and edit from any computer. Thanks to Matt Mullenweg and the WordPress team for such great, free, open-source software!