PhpStorm 2025.2 Help

Configure include paths

Include paths are used for holding PHP libraries, that is, third-party code that is used for completion and reference resolution in some functions/methods that use file paths as arguments, for example, require() or include().

By default, all folders under the vendor directory are considered to be library roots by PhpStorm. Such folders are added to Settings | PHP | Include Path automatically.

The files added via include paths are not meant to be edited within the scope of your project. If you have the existing code that you need to access and modify from within several projects, consider adding it via an additional content root.

Configure include paths

  1. In the Settings dialog (Ctrl+Alt+S) , click PHP.

  2. On the PHP page that opens, configure the list of library folders on the Include path tab:

    • Use Add and Remove to add and remove folder paths.

    • Use Speed Search to search the list: start typing the item name right away or press Ctrl+F to display the search field.

    • Exclude the contents of a folder from indexing. To do so, select the folder, click Exclude Under This Path on the toolbar, and in the file finder dialog that opens, select the path to the nested folder to exclude.

    Configure include paths dialog

Configure include paths for all newly created projects

To configure include paths that will be applied to all newly created projects, use the default new project settings:

  1. In the main menu, go to File | New Projects Setup | Settings for New Projects.

  2. On the Settings dialog that opens, go to Languages and Frameworks | PHP and click Add in the Include Path tab to add paths to the required folders.

    Configure include paths for new projects dialog
11 July 2025