Create a new project with the same Project Settings as the current project?

Hello! In PhpStorm, what is the best procedure to create a new project with the same Project Settings as the current project? (Except project files and directories, of course).


Or is it possible to save the current Project Settings as Default Project Settings? It would be cumbersome to manually create Default Project Settings by manually comparing each Default Project Settings options with current Project Settings options.


Hi there,

You could copy-paste whole existing project (or just .idea subfolder) into new place, open it there and alter any settings as required (i.e. Content Root: "Settings | Directories" etc). Usually all paths should be saved relative to the project folder and not absolute, which makes it easier to move project to another computer/folder etc.


At least in "misc.xml" there is an absolute path:

<option name="OUTPUT_DIRECTORY" value="D:\MyDir\exportToHTML" />


Sorry -- no clue. None of my 14 recent projects have such entry in misc.xml


Also, in "workspace.xml" there are many references to project files - which of course are not valid in a different project with different files. For example inside the <leaf> tag.


Found another absolute path in "workspace.xml":

<server deployment_server="dfd4dd3e-8785-4013-8859-c3a521d66b4f" host="" name="1und1" use_path_mappings="true" validation_dir="D:\MyDir" />


The only "leaf" elements I have found in 3 projects of mine that I have checked are related to currently opened files in Editor. Most (if not all) that info (file references) will be ignored on project open / removed on project close (file is not part of the project / cannot be referenced -- remove). That file also contains search history .. or command execution history ... or toolwindows size/locations which may not be valid/good for new project as well.

It would be stupid to expect that simple copy-paste existing working project would provide clean config with no references to original project (otherwise how would do you except IDE to remember project opened files .. or recent files list etc).

If you want such "template" to be as clean as possible -- do that on empty project (where you have not performed any edit/open/etc operations yet). Otherwise you have to invest a bit of time and clean up existing one as desired and use it as base for your future projects.

I personally see no problems with configuring new project from scratch -- at all (doing it rarely -- only 1-2 times a month, excluding "test" projects). It takes only few minutes for me. And if I really need to reuse something heavily configured from another project (inspection profiles/dictionaries etc) -- such stuff would be stored in separate config file.


I'm not using "verify" functionality .. so cannot say if this is will be ignored/removed (as with other references) or will stay. But considering that it is part of deployment enrty .. I believe it will stay (since all deployment enrties are global and workspace only referencing it with project-specific details).

As I understand you are using v7. In v8 deployment settings are stored in separate config file.


Please sign in to leave a comment.