Can't make sense of PhpStorm project configuration

I have an Apache 2.4 server running my website in a virtualbox Ubuntu guest OS. This setup is used exclusively for testing changes to the real website. Apache is configured to serve files from a specific directory called the "DocumentRoot" in Apache terminology. The host is Mac OS Catalina ver 10.15.3, and phpstorm is running on the Mac OS host.

I am trying to create a phpstorm project as follows:

1. Create New Project From existing Files
this brings up the new project wizard which invites me to choose a scenario. The scenario that I chose is "Web server is on remote host, files are accessible via SFTP.

2. Next is the specify local path dialog. I go ahead a pick a project directory on the Mac, and choose default deployment options.

3. Next, I specify an sftp and http url to the virtualbox guest. I am fairly comfortable with virtualbox networking so I had no trouble with this.

4. Next is the specify root folder on remote server dialog, and this is where I'm lost.

The puzzle only seems to have a few pieces to my understanding, and here they are:

* I have a remote web server and a URL to my test website on that remote server
* I have SSH credentials to a user that owns all the files and directories in the file system of the remote web server.
* I have a local directory on the Mac where I want to store project files that must be kept locally.

How do I map these pieces onto the language of PhpStorm to configure a project?

Comment actions Permalink

I use vagrant which is just a wrapper for virtual box, so probably very similar to your setup.

In phpstorm, all my local files are stored at /User/me/PhpstormProjects/(the project name).

I open phpstorm and in the DEPLOYMENTS side panel on the right hand side open the ... box to configure the connection details to the server.  You will be able to navigate the server by browsing folders until you find your 'public_html' directory of the site on your server.

Under MAPPINGS dialogue it will be empty, add /

That will have your local system mapped to your remote system.

From there right click a file in your PROJECT panel on the left and choose "sync with ..." and choose your server location to see if one file goes into the right location before trying to put them all there.

Once that's set up, you can use the sync with from either panel to move files around

Comment actions Permalink

Ok, thanks, that is starting to make a little more sense. Also, from Mappings page I can see that the "Web path" refers to URL space while the "deployment path" refers to the remote server filesystem.


Please sign in to leave a comment.