PhpStorm not recognizing a php file

I came across this problem multiple times as I made a new PHP file but the Phpstorm couldn’t recognize it. I searched the solution on the internet and came upon many but the best solution I found was to override the file type.

To do this Right click on the file -> Override file type -> Set as PHP

I hope this simple solution helps you as well.

86 thoughts on “PhpStorm not recognizing a php file”

Leave a Comment

Your email address will not be published. Required fields are marked *