Using PHP as CLI Interpreter in PhpStorm

Oh. Turns out it really was as simple as creating a symlink to the ini file where the php executable is located. Hahah!

Steps

  1. Open up the shell for the site
  2. Run which php
  3. Copy that URL and paste it into PhpStorm for the executable path
  4. Run php -i in the terminal
  5. At the top of the output, grab the ini configuration path
  6. In a separate terminal (not in the Local shell) cd to the directory where the php file is located
  7. Run ln -s /path/to/php.ini php.in — using the php.ini path from above
  8. :boom:
1 Like