Installing and hosting a Joomla site on OpenShift

OpenShift have an example Joomla app ready to deploy on github, but it’s currently not working – once you’ve deployed it, it gives you a page with this error:

Infinite loop detected in JError

Given that it’s relatively simple to setup Joomla, I set up a new app on OpenShift, downloaded the latest install for Joomla, and then pushed it up to OpenShift. Using this approach you can walk through the admin screens to configure your site and point it to your hosted MySQL, and it’s just as easy as installing it locally.

Here’s the steps:

1. Create your PHP app on OpenShift:

rhc app create -a your_app_name -t php-5.3

2. Add the MySQL cartridge:

rhc app cartridge add -a your_app_name -c mysql-5.1

3. Download Joomla. Unzip the download into the php add inside your app dir that was created by ‘rhc app create’

4. Add, commit and push your changes to OpenShift:

git add .
git commit -m "Joomla initial commit"
git push

5. Now hit your URL for your hosted app, and then walk through the setup steps as normal. When prompted for your MySQL config, use the values given in step 2 above.

6 Replies to “Installing and hosting a Joomla site on OpenShift”

  1. I’ve tried this many times with the same result. After installing Joomla using the steps outlined above, if I ever run “git push” again, this will destroy the state of Joomla. From this point on, hitting my application URL will trigger Joomla’s initial configuration once again. I’ve tried removing the .openshift directory in order to prevent hooks from being run, but it doesn’t work.

    1. I´m getting the same problem, if you already solved this issue would you please teel me how did you do?
      Thank you

  2. When setting up the connetion to mySql i always get a error that it can’t connect. I’ve put in the details of the mySQL cartidge.

    What am i doing wrong?

    1. I was getting the same problem, then I realized it was because of the “hostname” parameter. The defualt value is “localhost” but you need to change it for the one of your openshift database. One easy way to see the real hostname is to install the phpmyadmin cartridge to you joomla app, launch it, and see the ip address in top of the window, that´s the one you should copy in the hostname parameter

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.