PhpStorm 2022.2 Help

Opening, reopening, and closing projects

Opening projects

Open a project

  1. Click Open on the Welcome screen or select File | Open from the main menu.

  2. In the Select Path dialog, select the directory that contains the project to open.

  3. Specify whether you want to open the project in a new window, close the current project and reuse the existing window, or open the new project in the same window with the current one. Refer to the Opening multiple projects section for details.

Open a project from the command line

Reopening recent projects

PhpStorm keeps the history list of the recent projects, from which you can select the desired one.

When PhpStorm starts, the most recent project reopens by default (unless this option is disabled on the System Settings page of the Settings/Preferences dialog (Ctrl+Alt+S).

Reopen a recent project

  • Call File | Open Recent from the main menu and select the desired project from the list.

    Specify whether you want to open the project in a new window, reuse the current window, or attach it to the currently opened project.

  • On the Welcome screen, click Projects in the left-hand pane and then select the project of interest in the right-hand pane where the list of your recent projects is shown. Start typing in the Search projects field to filter the list of recent projects.

Remove a project from the list of recent projects

  • From the main menu, select File | Open Recent and click Manage Projects at the very bottom of the recent projects list. From the list of recent projects, select the project to remove and then click the closing icon for the project to remove.

    The selected project will be removed from the list of the recent project in the Project window and on the Welcome screen.

  • To remove a project only from the list on the Welcome Screen, right-click the target project and select Remove Selected from Welcome Screen.

Organizing projects into groups

PhpStorm allows you to organize projects into specified groups. You can create a new group by right-clicking the list of recent projects and selecting New Project Group.

To move a project into a group, right-click this project, select Move To Group, and choose the required group to place the project in.

Closing projects

When you have only one open project and you close it, PhpStorm displays the Welcome screen. In case of multiple projects, each one is closed with its window.

Close a project

  • From the main menu, select File | Close Project.

Close all projects

  • From the main menu, select File | Close All Projects.

    This action closes all projects that are currently opened in PhpStorm.

Close all but the current project

  • From the main menu, select File | Close Other Projects.

    This action closes all opened projects except the current one.

Opening multiple projects

PhpStorm suggests the following options to work with several projects simultaneously:

  • Each project is opened in its own window. The projects are independent and cannot share information, except for the Clipboard operations. All the projects run in the same instance of PhpStorm and use the same memory space.

  • A newly opened project shares the window with the already opened project, which is considered the main project and is always shown first in the Project tool window. All the newly opened projects are attached to this main project. Some settings (such as content roots) can be configured separately for each project.

    Symbols from multiple opened projects can be accessed from each project. To resolve a symbol, PhpStorm applies the following logic:

    1. If possible, find and use the resolve target from the same project. If no target is found, search for it in the attached projects. If multiple resolve targets are found, proceed to the next step.

    2. For Composer-based projects, if a symbol is inside the vendor folder, find and use the resolve target only from the same vendor folder and ignore the ones from the nested vendor folders.

    3. If a symbol is outside the vendor folder, find and use the resolve target from outside the vendor folder. If none are found, find and use the resolve targets only from the topmost vendor folder.

Open multiple projects

  1. Select File | Open from the main menu and then in the Select Path dialog, select the directory that contains the project to open.

  2. By default, PhpStorm displays a dialog prompting you to select whether you want to attach the new project to the currently opened one (Attach), open the project in a new window (New Window), or replace the currently opened project with the new one in the existing window (This Window).

    Open the project in the current window, new window, or attach it to the existing project

    You can change or restore this behavior on the System Settings page of the Settings dialog as described in Change the project opening policy.

Change the project opening policy

  1. In the Settings/Preferences dialog (Ctrl+Alt+S), go to Appearance & Behavior | System Settings.

  2. In the Open project in area, select the project opening policy:

    • Ask: This option is selected by default. PhpStorm displays a dialog where you can choose to open the project in a new window, reuse the existing window, or attach the new project to the currently opened one.

    • New window: Select this option to silently open each new project in a new window.

      With this option selected, use the File | Attach project main menu command to attach a new project to the currently opened one.

    • Current window: Select this option to silently close the project opened in the current window and open a new project in it.

      With this option selected, use the File | Attach project main menu command to attach a new project to the currently opened one.

Detach projects from a shared window

  • In the Project tool window, select the project to detach and click Remove from Project View in its context menu.

    Remove from the project view

Merge project windows (macOS)

On macOS, you can merge all opened project windows into one, turning them into tabs.

  1. Make sure that there are several PhpStorm projects opened in separate windows.

  2. From the main menu, select Window | Merge All Project Windows.

    Drag a project's tab to work with the project in a separate window again.

Last modified: 21 July 2022