openshift + wordpress + git

I read the other related questions but do not find a satisfying answer for a good git + wordpress + openshift workflow with the official openshift wordpress example. The plugin and theme directory are not under git version control (or ar they, in the hidden .openshift/ folder?).

My main issue is that I want a local development environment (Mac), which I have already setup, where I make changes and that has a regular wordpress folder structure, that apache can easily read it without much trouble. Then I want to simply push the changes to openshift.

Read More

My questions:

1.Are there git-projects for openshift that maintain a wordpress-folder structure, for local development? How would I have to rewrite the action_hooks? Are there best-practices already?

2.I would of course need two seperate wp-config.php files, one for dev and one for production. What is the best way to achive that? How can I distinguish in code if its local or on openshift?

Help is very much appreciated, as I want to stick to the free openshift instead of moving to heroku where it is more expensive but also much simpler to have a fast wordpress dev workflow.

Related posts

Leave a Reply

1 comment

  1. Essentially, the new wordpress quickstart structure is geared towards people who want to use it, not develop for it. What you would need to do is to create a plain php-5.4/mysql-5.5 application, then do a git clone, load in your own WordPress installation, do the setup, then update your wp-config.php in your installation to connect to your OpenShift database using environment variables. You can get around the wp-config.php issue by using an if statement to control whether is uses one for openshift, or one for your local environment. I just created this developer version of the WordPress quickstart, give it a try and let me know how it goes: https://github.com/openshift-quickstart/openshift-wordpress-developer-quickstart