Question about project setup/mappings in EAP 98.458

Today I tried to add a new project, and would like to know if there is a difference between 'open directory' and 'New Project from existing files.'

The reason I ask is that I tried 'open directory' and then manually set the 'Deployment' Settings for the project.
As far as I can tell, I have set them correctly, based on another project that works.

But, no matter how I've set that, I do not get the 'Open in Browser" option.

So I gave up and created the project using Menu->File->New Project From existing files.

Is there something special that gets set by doing that? (Aside from the Project's deployment settings?)




Hello Jack,

New project from existing files does not do anything tricky, it just helps you to configure server/mappings/settings with kind of simpler UI. Maybe you've forgot to mark your server as default?



Hi Jack,

I have not found any essential differences myself. Maybe you forgot to select proper Deployment configuration as default?

Can you post the Deployment settings here for problematic setup (screenshots would be perfect), as well as some info about which file you are trying to open in browser?

The reason I'm asking -- maybe you are trying to open in browser some file which is outside of the website root folder (this may also apply to symlinks as well, not sure).

For example: Lets assume you have your project in D:\projects\ (I'm using Windows, but I'm sure you can figure out what paths may be for your OS). If you are using some common framework (or just following common/recommended practice) you will put your web accessible files in httpdocs (or public) subfolder (so your webroot is D:\projects\\httpdocs). So your folder structure may look something like this:

    \app -- your application code
    \httpdocs -- your web root
        \media -- writable, your product images etc
    \library -- 3rd party libraries
    \var -- temp/writable folders

Now, if you are using Local as Deployment access type (when you have webserver on the same computer .. or in VM for example) for such site, you have to configure your Deployment like this (at least that is what I did):
Local Path: D:\projects\\httpdocs

If you try to open D:\projects\\httpdocs\index.php from PhpStorm in browser -- it will work. If you will try to do the same for D:\projects\\app\bootstrap.php it will not.


Dah, I was so slow in writing my reply :| ... Kirill already mentioned most likely reason.


Thanks everyone, I will have a look again.
it is good to know there is no 'magic' happening choosing one route vs the other.

Dumb question, that set default server, I did not set that, I left it as it was (my old project server) I assumed it mean the default for new projects?

if that needs to be set differently per project that might very well be what I missed.


Hello Jack,

Yes, current version of PhpStorm needs you to mark one of your servers as 'default'. Actually, it is useful in case of project files mapped to multiple servers (e.g. development and production). In this case upload will happen to 'default' server by default. If your project files mapped to single server there's no much sense in this 'default' setting, but still it's currently required. We're going to rework configuration settings and provide more consistent UI in future versions.



Thanks Kirill as well!


Please sign in to leave a comment.