Installation with XAMPP and Virtual Hosts

PHPStorm beginner here.

I currently have a setup (pre PHPStorm) with XAMPP and various clients under different folders, using Virtual Hosts. This works fine on browsers on the local machine.

I am totally confused by all the installation options available. I have added XAMPP to a test project fine.

But I can't figure out how to add an existing project - without damaging what I have there already!

My folders are like this:
C:\develop\client1\www (contains all the files for client1)
C:\develop\client1\work (contains all the notes for client1)

C:\develop\client2\www (contains all the files for client2)
C:\develop\client2\work (contains all the notes for client2)
etc.

XAMMP is in C:\xampp\

I have been trying to add the client1 project, but I am concerned that I may overwrite existing files. I think that I should be following instructions on
https://www.jetbrains.com/help/phpstorm/creating-a-project-from-existing-local-sources.html#d53312e405
in the section "Creating a Project from Sources Outside the Server Document Root"

I believe that PHPStorm will need another folder for it's own files, so perhaps that would be, for client1
C:\develop\client1\phpstorm

"Choose Remote Path" appears to refer to the live server, visible to the public - http://client1.com, and I understand it to mean, "this is where the files that you tested with XAMPP go, once you are satisfied that the local code is working correctly"

I understand that I will be able to debug http://client1.com later, but I am not looking at this at the moment.

Am I going in the correct direction?  And can I block anything from being uploaded accidentally?



Sorry for what sounds like a silly question, but I am overwhelmed with all the different options at the moment!

0

Hi there,

A bit chaotic description -- not super clear on what each folder does and what you want to have in the end.

But .. I say:

  • Just use "Open" or "Open Directory" and point to "C:\develop\client1\www" -- it will create a new project from those files (project settings will be stored in .idea subfolder). The rest (website URL etc) can be configured manually as needed (that's what New Project wizard from existing files does -- it simplifies it a bit once you know how it works in general; but for a new person it might be confusing indeed)
  • The project will be called "www" ... but you can give custom project name later (so you can differentiate with "www" for client2)

If you need an access to both "www" and "notes" at the same time, you have few options then:

  • Just add that other folder as Additional Content Root in "Settings | Directories" -- it will become part of the project and listed as additional node
  • Or just create project from "C:\develop\client1" folder in first place.

No changes to your files will be made -- only .idea subfolder will be added to the project root folder (that's where IDE keeps project-specific settings).

In general, have a look at these links in case if you have not seen them yet.

2

Actually, that helped a lot.

Thanks for your help, especially "No changes to your files will be made"

0

请先登录再写评论。