'Configure PhpStorm to use Prettier for *.php files

I've installed globally prettier and @prettier/plugin-php packages, and added php extention to Prettier preferences: enter image description here

When I press Cmd+Opt+Shift+P in a *.php file editor, I've got this error:

"Prettier: File *.php has unsupported type"

enter image description here

How to configure my PhpStorm to use Prettier for *.php files in my Wordpress project?



Solution 1:[1]

You need to restart phpstorm in order to have prettier able to run for php after you installed the plugin

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mike