How to pull all data from openshift via git

I created an wordpress application on openshift.com, after installing I downloaded and installed plugins and themes from admin panel.
Now when I try to clone the app on my local machine it only fetches default wordpress site.
Plugins and themes are not being clone.

Related posts

Leave a Reply

2 comments

  1. Changes to the gear itself bypasses git. Ideally you would upload your themes and plugins on your local copy of the repository and then push it to your openshift app. Alternatively you can keep your regular workflow and just do the following:

    1. Make sure what is live on the website is what you want to keep/backup.
    2. Open the command line and take a snapshot of your app by typing in:

      rhc snapshot save -a {appName}
      
    3. You should now have a file named appName.tar.gz (this will be exported to a location depending on where you are in the command line)
    4. Unzip this file and look under app-root/repo/php/wp-content to see your themes and plugins. Your uploads(media) will be under app-root/data/uploads.
    5. Put these theme and plugin files in your local repository. Git add, commit and push them to stay in sync.

    Note: If you used the openshift wordpress application then you’ll notice that the uploads folder is excluded from git entirely. This means you can add media as usual from the wordpress dashboard but keep your code under git versioning.

    Source: https://openshift.redhat.com/community/kb/kb-e1065-what-is-application-crud-and-how-should-i-handle-it-in-openshift

  2. That is because the plugins and themes are not stored in your git repo on the gear. If you want to have them in your git repo you need to put there source there. I think by default pulling down plugins and themes puts them in your ~//data dir. You can scp or sftp those files down and then put them in your git repo.

    In short, changes made outside of git will not be tracked by git.