Reputation: 1503
I'm having a little trouble with PHPStorm and Remote Servers. The great thing about this IDE is that I can specify some settings for global enviroment, or per Project. But I guess it does not include settings for Remote Servers.
For example, consider this scenario.
I have a remote server on example.com
. On that server I have 2 folders: example.com/project1
and example.com/project2
.
In PHPStorm I created 2 projects with the name of Project One
and Project Two
. But I had to create 2 Remote servers with specific root folders.
For example for Project One
's remote server's root folder is specified to example.com/project
and for Project Two
the folder example.com/project2
.
So my questions is, how can I set the one remote server globally, so I could use it for different projects with specific root folders for each one?
Upvotes: 0
Views: 703
Reputation: 93728
The main server settings - id, name, type, host, root path, credentials, i.e. all content of Connection tab of server's settings - are stored globally. To be more precise, in //config/options/webServers.xml. So it's available for all projects. Contents of two other tabs of server settings - Mappings and Excluded Paths - is saved per project in .idea/workspace.xml
So, to share 1 server between several projects, make sure to set the server doc root/root URL in Connection tab and specify projects-specific stuff on Mappings tab
Upvotes: 2