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
- Go to OpenShift application page.
- Copy ssh connection string (like this ssh firstname.lastname@example.org)
- Run command:
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.
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