OpenShift Empty WordPress Repo - wordpress

I signed up for OpenShift and created a new WordPress application. Went through the typical WP setup screens in the browser, and now have a fresh instance of WP. I need to start hacking away at WP, so I
git clone ssh://<my-app-repo-url> /path-to-my-project
in my shell, but the
/path-to-my-project/php
folder is empty!
I ssh'd into my application and the
/var/lib/openshift/<uid>/app-root/repo/php
folder contains all the WP source. Why is the clone operation not pulling down these files?

When you install WordPress using the quickstart, it downloads WordPress and installs it on your gear, not using git. Refer to the directions here (https://github.com/openshift/wordpress-example) in the readme for more information.

Related

Standard Wordpress installation migrate to Kubernetes bitnami/wordpress

I have stanard wordpress installation on my server with all plugins, themes and stuff. Now I want to migrate to kubernetes server where I have already installed bitnami/wordpress. I see a bit other structure of files in bitnami/Wordpress installation on kubernetes where is only wp-content and config file in main folder of wordpress.
Can I copy normal Wordpress installation to Kubernetes image bitnami/wordpress installation from image installed by helm? How will be to do it best? Should I do it like normal wordpress website or other technique and tools?
Bitnami Engineer here,
The app's files are now inside the /opt/bitnami/wordpress directory. We recently updated all our WordPress cloud solutions to have the same directory structure. However, it seems that you have a previous version of the solution deployed in the cloud our you used the Bitnami installer in your server.
The easiest way to migrate your data from your current server to the k8s deployment is by using the All in One WP Migration plugin. The plugin takes care of saving all the necessary data so you just need to recover that data in the new deployment. You won't need to copy any other file from the deployment when using this plugin.

Where to download Git in your local Wordpress directory?

Where would I download Git on my Local Wordpress Environment So then I can create a branch and use it as a type of test environment. and have access to the other themes?
If you are looking to test plugins and themes, it's most likely that your working directory should be established in /wp-content - it contains both /plugins and /themes. You'll want to make sure you have a .gitignore file that only tracks what you're working on.
If you are looking to work on changes to core, your working directory will almost always be the top-most WordPress root. That way, you can track WordPress/WordPress.
Actually I put my GitHub folder in my themes folder and then I could use the repos in my GitHub folder on my local host WordPress site

need help to find the installed theme in wordpress application #openshift

I am new to openshift. I have installed rhc on my local[ubuntu].
I have setup my first application in openshift which is of Wordpress. I choose the installation from the openshift console itself. It was not manual.
After installation I loaded my site in browser and logged into the admin panel; where I have installed one new theme.
Now to work on that theme I have cloned the repo into my local machine. But I am not able to find the newly installed theme to work on. So I tried to find that theme via ssh into my application but didn't find the theme there as well. path I am checking is- "/app-root/repo/.openshift/themes"
So where can I find the theme? Please help.
Thank you
The theme is saved in your data directory (~/app-root/data), you can see the specific locations of where the files are saved by reviewing this deploy action hook (https://github.com/openshift/wordpress-example/blob/master/.openshift/action_hooks/deploy).

Unable to git pull Wordpress' folders and sub folders from OpenShift repo using Git

I created a wordpress app hosted on Openshift from the CLI. I'm on a Win7 PC.
After that I made several changes to my Wordpress site from the Wordpress Admin Dashboard. Now I want to pull the whole app to my local machine. I did a git pull which fetched the only folders and files sans the actual wordpress app. When I tried to run it using a WAMP, there's no wordpress site to be started. When I again ran
git pull
The message I get is
Already up-to-date
I'm a rookie and I want to make changes to my wordpress site locally and then push them to the server. Please help me out here.
if you are installing plugins & themes via the wordpress admin, they are not in git, they are installed in your $OPENSHIFT_DATA_DIR, and are saved there outside of git, you can see in this script where it does the symlinks into your wordpress installation: https://github.com/openshift/wordpress-example/blob/master/.openshift/action_hooks/deploy
If you want those in git also, you would need to modify that script to remove the symlinks, and then put your plugins & themes in git and do a push.

Using git with a PHPFog Wordpress app

I have cloned a copy of my PHPFog Wordpress app to my local machine. I then have a few themes im working on with there own sperate repository. So I copy and paste a theme into my Wordpress repository and then sync it back up with PHPFog.
This works all well and good.
However If I update my Wordpress app in the admin panel, and later on sync up some changes I have made I lose the update, and go back to the version of Wordpress I started with.
How are you supposed to correctly work with git and PHPFOG if every change you make on your Wordpress admin panel gets overwritten with every sync from your local machine.
Am I supposed to update Wordpress and then do another clone in order to have the correct version on my local machine before making new changes, and if that is the case how do clone the updated Wordpress app to my local machine.
Thanks
Your right, file system changes, that are made from the Wordpress admin, do not get added to your PHP Fog repo, and can get blown away on the next push.
A better way to handle this issue is to run your Wordpress installation locally on your development system like you hintted to. I use mamp for mac or wamp or xampp for windows to make changes in the Wordpress admin locally then check in and push those changes. This will let you see the results of your changes without effecting your production site. I think the time invested setting this up is well worth it.
To get this running you should install either mamp or wamp and install a fresh copy of wordpress in order to make sure mysql is running locally and the wordpress installation is able to connect. Then in a new folder clone a fresh copy of your repo and load that up in the browser. The url will be something like localhost:8888. It should fail to find the database but that is expected. You will need to configure your local environment variables (listed below) to point to the locally running mysql server. Look in the wp-config.php file of the fresh install for the database settings. Do not use the wp-config.php settings of your cloned repo. You do not want to make changes to wp-config.php file because those changes will get checked into the repo and it will break your production site after the push.
MYSQL_DB_HOST
MYSQL_DB_NAME
MYSQL_USERNAME
MYSQL_PASSWORD
Here is a great link that explains this process in more detail: http://docs.phpfog.com/getting-started/development

Resources