Access remote files Openshift

I am new to openshift world. I have wordpress installed openshift application. I have configured and connected to application via putty ssh in windows. Now I don’t know how to access files inside my app. Help me.

Welcome to OpenShift shell

This shell will assist you in managing OpenShift applications.

!!! IMPORTANT !!! IMPORTANT !!! IMPORTANT !!!
Shell access is quite powerful and it is possible for you to
accidentally damage your application.  Proceed with care!
If worse comes to worst, destroy your application with 'rhc app delete'
and recreate it
!!! IMPORTANT !!! IMPORTANT !!! IMPORTANT !!!

Type "help" for more info.

Note: Your application supports version 2 cartridges.

[xxxx-cloudrun.rhcloud.com xxxxxxxxxxxxxx]> 

Here I want know how to get access xxxx/wp-content/

Related posts

Leave a Reply

3 comments

  1. Openshift applications are designed to be changed and deployed primarily using git, see https://www.openshift.com/developers/deploying-and-building-applications

    Edit:
    Creating the project should have given you a git url. Since you’re using windows, you could use tortoisegit to fetch this and make changes. wp-content is in the php directory of the git repository.

    Alternatively:
    The ssh login you have is a standard linux shell, you can add plugins/themes in the app-root/data directory, using standard linux shell tools.

    [ ... ]> cd app-root/data
    [ ... data ]> ls
    blogs.dir  plugins  themes  uploads
    

    You could even use a program like WinSCP to upload files to these directories using the SSH url you already have.

  2. Use scp for linux or pscp for windows
    Add the application to system path or use cd to go to that directory, then–

    pscp -i pvtkey.ppk source destination
    

    For example

    pscp -i pvtkey.ppk my_file_to_upload xxxx-cloudrun.rhcloud.com:/the_path_to_upload_in_openshift_server
    

    To upload a directory, use -r parameter

    pscp -i pvtkey.ppk -r my_folder_to_upload xxxx-cloudrun.rhcloud.com:/the_path_to_upload_in_openshift_server
    

    To Download, reverse the direction example

    pscp -i pvtkey.ppk -r xxxx-cloudrun.rhcloud.com:/dir_to_download Path_of_my_pc
    

    pvtkey.ppk is the private key in case of putty
    in linux, pvt key can be found on ~/.ssh

    To download a single file, remove -r paramater.

    Link to download pscp http://the.earth.li/~sgtatham/putty/latest/x86/pscp.exe