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

Snymok

 

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 2ec34a5ef38343c4a1a37619cf4b51e5@druss-druss.rhcloud.com)
  3. Run command:
ssh 2ec34a5ef38343c4a1a37619cf4b51e5@druss-druss.rhcloud.com

Synchronize application

In ssh console run:

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

git add . -A

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

rm -r $OPENSHIFT_REPO_DIR/.git

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