Working with WordPress in OpenShift using NetBeans IDE

Recently i was trying to get this theme that i just made, and it was only available in one of my test site hosted by OpenShift. After going through a couple of search on how to get the files using the OpenShift rhc tool, i couldn’t get any satisfying results. but i realized that they have support for sftp.

So ill be taking you through the steps i went through in get the files with NetBeans IDE, Youl will need

  • A Computer( If you don’t then you should end here )
  • A decent internet connection
  • NetBeans IDE
  • Git with rhc( Read on how setup rhc )
  • A several cups of coffee( Depending on you Internet connection )

Open up your NetBeans IDE and select file -> new project. Select PHP Application from Remote Server and clickNext.

Give your Project a name to identify it. For this example, I am going to create a project called netbeans.

Select PHP 5.3 as your version and click on Next.

Specify the Project URL of your application. In this example, my project URL is the same as my publicly available application that I created on OpenShift:

Set the Upload Directory to:


We now need to configure our SFTP connection to OpenShift. On the dialog that is displayed above, click onManage to add a new remote connection. Give your connection a name of OpenShift and specify the type as SFTP.

On the next dialog is where we specify our connection and authentication details that will enable us to communicate with OpenShift via SFTP.

For the Host Name property, enter in the full URL for your application hosted on OpenShift. In this example, it would be:

The next property that we need to provide is the username of our server account that we created above. In order to find this information, switch back to the web browser which should have the application creation confirmation screen displayed. One piece of information provided is the git URL for your application. This URL contains your unique user id for your OpenShift application.

In the above example, the user id for my application server is:


Now that we have our user id, lets provide that information as our username for the SFTP connection.

In order to authenticate with OpenShift, we need to provide our SSH private key. My private key is located at:


The last piece of information that we need to provide is the Initial Directory value for our application. This takes the format of:


For example, for this particular application I would provide the following initial directory:


At this point, click Test Connection to ensure that everything is configured correctly.

Once you have verified that your test connection was successful, click Ok and then Next.

You will then be presented with a dialog that informs you that two source files already exists at that location. Make sure that both files are checked and click on Finish.

Step 5: Code

Now you are all set to do what you do best, code. From now on, anytime you add or save a file, the changes will automatically be synchronized with your server running on OpenShift.



There is one comment

Leave a Reply

%d bloggers like this: