PhpStorm
 
Get PhpStorm
You are viewing the documentation for an earlier version of PhpStorm.

Excluding files from projects

Last modified: 21 July 2022

Sometimes you might need to exclude a single file from your project, so that it will be ignored by inspections, code completion, and so on. This is done using the Override File Type action.

When a file is marked as plain text, PhpStorm does not use it anymore for code completion and navigation. Such file is shown as plain text in the editor, and is marked with a special icon Plain text file in the Project tool window.

The reverse action is also available: you can return a file to its original type by using the Mark as <file type> action.

In the context of a PHP project, you can also exclude entire PHP archives (phar files) to prevent multiple declaration conflicts between classes in a phar archive and the corresponding classes in the installed vendors directory.