Where to save plugins for openshift wordpress install Where to save plugins for openshift wordpress install wordpress wordpress

Where to save plugins for openshift wordpress install


Short answer: store your plugins and themes in .openshift.

Longer answer:Every Openshift account has what can be thought of as a username - a long number like this:53f1a90f500446c42053423083

Each directory structure features this number so yours:

/var/lib/openshift/53f1a90f500446c42053423083/app-root/runtime/repo/.openshift

will be different to mine:

/var/lib/openshift/12345678901234567890123456/app-root/runtime/repo/.openshift

The number gets incorporated into environment variables so that scripts will work on yours and mine equally. One of these is OPENSHIFT_REPO_DIR. On your install it will point to:

/var/lib/openshift/53f1a90f500446c42053423083/app-root/runtime/repo

on mine:

/var/lib/openshift/12345678901234567890123456/app-root/runtime/repo

Another is OPENSHIFT_DATA_DIR.

When you push changes from your local directory via git, the deploy script is run and it assembles all the wp files it needs into a directory it names:

OPENSHIFT_DATA_DIR/current

Openshift moves the 'original' wp plugins and themes folders that are created during a wp install into the OPENSHIFT_DATA_DIR/current/wp-content. It looks in OPENSHIFT_REPO_DIR/.openshift for your code and copies in any plugins and themes folders it finds there.

Net effect is to assemble the plugins and themes directories by adding yours to those that came with wp. So, your fully-assembled OPENSHIFT_DATA_DIR/current will have these in it:

OPENSHIFT_DATA_DIR/current/wp-content

                                 /themes                                 /plugins                                 /uploads

So, anything you put in .openshift will be copied to the right place, but not altered.https://github.com/openshift/wordpress-example