Integrate PHPStorm and SFTP into OpenShift

PhpStorm in PaaS - How to SFTP to OpenShift

"PhpStorm is a lightweight and smart PHP IDE focused on developer productivity that deeply understands your code, provides smart code completion, quick navigation and on-the-fly error checking. It is always ready to help you shape your code, run unit-tests or provide visual debugging."

In this tutorial I will show you how to use build in functionality in PhpStorm to deploy PHP application to OpenShift. You can also check out a video where I show you the same steps outlined in this blog.

Create an application

Go to OpenShift website, click Create applicaiton, choose PHP 5.3, name it and create. Remember the SSH URL that we will need later.# PhpStorm in PaaS - How to SFTP to OpenShift

"PhpStorm is a lightweight and smart PHP IDE focused on developer productivity that deeply understands your code, provides smart code completion, quick navigation and on-the-fly error checking. It is always ready to help you shape your code, run unit-tests or provide visual debugging."

In this tutorial I will show you how to use build in functionality in PhpStorm to deploy PHP application to OpenShift. You can also check out a video where I show you the same steps outlined in this blog.

Create an application

Go to OpenShift website, click Create applicaiton, choose PHP 5.3, name it and create. Remember the SSH URL that we will need later. And application URL to be able to browse to the deployed application.

Create new project

Let's start with a new project from existing files

OpenShift PhpStorm Quickstart screen picture

and choose SFTP remote destination

OpenShift PhpStorm SSFT configuration screen picture

in the next step, let's define the project name

OpenShift PhpStorm project name screen picture

The next window defines server configuration parameters

OpenShift PhpStorm SFTP configuration screen picture

let's take your SSH URL

ssh://33b94e1587744543a76d83095afc9524@promos-mjelen.rhcloud.com/~/git/promos.git/

as it contains part of the information

ssh://<User name>@<SFTP Host>/~/git/promos.git/

change Auth type to "Key pair (OpenSSH)" and choose your private SSH key.

Connect to OpenShift using SSH

ssh <User name>@<SFTP Host>

go to app-root/repo direct and print the full path

cd app-root/repo
pwd

copy the path as Root path.

Use your application URL as Web server root URL.

OpenShift PhpStorm web server configuration screen picture

Use the top most directory as Project root.

OpenShift PhpStorm project root screen picture

Use "/" as Web path for project root.

OpenShift PhpStorm download indicator

Finish the wizard and you should see PhpStorm downloading files from OpenShift and setting up local project.

OpenShift PhpStorm Upload picture

When you are ready with updating a file locally. Right-click the file and use "Upload to <your server name>".

Conclusion

With PhpStorm and OpenShift's SFTP integration it is easy to deploy the project without using git.

But you should be aware that when you push new revision to the git repository, it will overwrite all the changes, that were done using SFTP.

Tags:

i use the latest version of phpstorm (7.0) .

it show me that /var -- have no permission . but others is accessable !

i use the latest version of phpstorm (7.0) .

it show me that /var -- have no permission . but others is accessable !