Projects and directories

I've just installed the 45-day demo of PhpStorm and I'm not fully sure about how to configure the project. All my sites have a silimar layout, e.g.:

  • E:\Sites
    • Foo
      • Documentation
      • Server
      • SQL
          • data
          • samples
          • structure


    When the "New project from existing files" assistant asked for the source directory, I got the impression that I should provide the web server document root (since the next step asked for the "Web path for project root") so I created the project on "E:\Sites\Foo\Server\htdocs". I finally got a "E:\Sites\Foo\Server\htdocs\.idea" directory in the root of the public folder tree (having all that room above!) and part of my project files basically unreachable. It feels wrong...

    How should I configure projects to match my layout?

    3 comments
    Comment actions Permalink

    Hello Alvaro,

    As of version 1.0.1 'New project from existing files' wizard can cover only simple setups (where 'htdocs' folder is project root), while you have somewhat more custom one, so you need a manual paths setup.

    1. Close the project that you have
    2. remove htdocs/.idea folder (you'll create another project instead)
    3. Click 'File | Open Directory' and choose the directory that holds all the files you need in the project (it's probably E:\Sites\Foo)
    -> project will open E:\Sites\Foo\Server\.idea will be created
    4. Click File | Settings | Deployment
    5. Add a new server with type 'Local', specify a root URL (probably http://foo.local)
    6. Make it default (click a button with green checkmark)
    7. Switch to Mappings tab
    8. Enter E:\Sites\Foo\Server\htdocs as a local path
    9. Enter / as web path
    10. Close the dialog

    This way you will get your htdocs folder mapped to the root of your server.

    Actually there are so many possible setups/layouts that we hardly can meet them all in the first version. We're evaluating users feedback and will improve the product accordingly.

    Hope this helps,
    Kirill

    0
    Comment actions Permalink

    Thank you, it feels way better now. I've changed a couple of settings (I can't believe that saving the file without user consent is the default!), esp. the font ("Lucida Console" is not listed as "monospaced" and at first I thought it wasn't supported) and I'll have a further look. The first impression is rather... impressive.

    Actually there are so many possible setups/layouts that we hardly can meet them all in the first version. We're evaluating users feedback and will improve the product accordingly.

    It's funny you say this because I've been trying out lots of IDEs and editors for PHP and PhpStorms is by far the one that offers the most complex project configuration regarding directories and URLs. I'm even tempted to read the "Basic Concepts" help chapter :)

    0
    Comment actions Permalink

    Hello Alvaro,

    It's funny you say this because I've been trying out lots of IDEs and editors for PHP and PhpStorms is by far the one that offers the most complex project configuration regarding directories and URLs.

    When I'm saying 'meet all the setups' I mean 'provide an easy and clear way to work with any setup'. To support different cases we've tried to provide an "universal" configuration settings, and we'll simplify it eventually when we better understand the most typical usecases.

    Regards,
    Kirill

    0

    Please sign in to leave a comment.