Monday, November 18, 2013

Running a custom PHP application on the Bitnami Wordpress stack

Being an embedded software engineer, I usually go a bit spaced out when reading about things like wordpress, bitnami stacks etc.. I have dabbled on making small intranet sites with Ruby on Rails but have never looked at PHP.

Today, I downloaded a wordpress installer from bitnami and 10 minutes later I had a small site running on my laptop. I had a look at the various plugins and installed a couple as well.

Intrigued, I wanted to spend a little time learning PHP. So, I created a custom app by following the instructions from Bitnami's Wiki topic and started reading the tutorial from w3cschools. So far PHP doesn't seem very complex and I'm being to understand why it's so popular.

Steps to create a custom app


  1. Create a new folder in the apps directory, say 'test'.
  2. Copy over the conf folder from the wordpress directory into the apps/test folder. We will need to edit the configurations inside them
  3. Search and replace 'wordpress' with 'test'. Typically, these are directory paths
  4. Create a htdocs folder in apps/test. This will hold our application. For now create an index.php and echo a 'Hello World'.
  5. Now, we need to edit the apache server configuration files so that they can find the app. Bitnami makes it quite simple by keeping a configuration file in apache2/conf/bitnami with the name bitnami-apps-prefix.conf. Edit this file and copy the line pointing to wordpress directory to a new line and change from 'wordpress' to 'test'.
  6. Restart Apache and that's it!

No comments: