For this blog I am using OpenShift cloud (started plan).



After updating wordpress engine through admin panel, updated files are not available in application git repository because they were not commited to git on remote server. To synchronize your OpenShift application with git repository you should perform following steps:

Install and configure rhc command line tool as described here

Connect to your application through ssh

  1. Go to OpenShift application page.
  2. Copy ssh connection string (like this ssh
  3. Run command:

Synchronize application

In ssh console run:

cd `mktemp -d` \
  && git clone -ns ~/git/$OPENSHIFT_APP_NAME.git . \
  && mv .git $OPENSHIFT_REPO_DIR \
  && git reset HEAD

git add . -A

git commit -a -m "synchronized" && git push


Your application repository is now synchronized with runtime changes.

Possible errors:

If you have old version of your application you could have  "CARTRIDGE_VERSION_2: line 1: 2: command not found"  error. To fix this error read this article