Importing Project from Existing Source Code
You can set up a project around the existing source code created externally, in other words, in another IDE or in a dedicated editor. PhpStorm analyzes the code base and adds the .idea directory with settings.
When the files to work with are already on your machine, you can set up your development environment in three main ways:
You have a Web server on your machine, the sources are under the server document root (for example, /htdocs), and you do your development right on the server.
The Web server is installed on your computer but the sources are stored in another folder or on a mounted drive. You do your development, then synchronize with the server.
You do not have a Web server on your machine or you are not going to use it right now. The sources are on your machine, you just do your development, possibly using the console to view the output.
Finally, you may need to update an application on a remote host. In this case, you also have to download the application sources and arrange them in a project, because PhpStorm does not support direct editing files on remote hosts. PhpStorm assumes that all development, debugging, and testing is done on your computer and then the code is deployed to a production environment. For more details, see the sections Working with Web Servers and Creating a Project from Downloaded Files.