View All Posts

So I have had the pleasure to use a Windows machine again recently. When I say pleasure, I mean I had multiple pain points so far, though some of them do not stem from Windows itself and come from a strict IT department. Anyways back to Windows, I am using it at a contract position currently and had to setup up some items so I could even use a PHP autocomplete extension in VS Code. Here is what I had to do to get up and running with PHP, Git and Node.js for compiling my Sass. I included Composer because it’s just a nice thing to have ūüėä.

  1. Use Chocolatey to install PHP, composer, node (LTS only), and git.
    1. Chocolatey is a command line Windows Package Manager.
    2. PHP is needed for linting purposes in an IDE/Editor
    3. Composer is a PHP Dependency Manager (it’s a nice to have, not needed, but preferable).
    4. Node is needed for processing Sass.
    5. Git is needed to track changes and to use for Gitlab.
      1. There are GUI Git solutions such as:
        1. GitKraken : Freemium Solution
        2. Source Tree : Free Solution
        3. Tower : Paid Solution
  2. PHP install script choco install php, keep hitting Y until install is finished.
  3. Composer install script choco install composer, hit Y to start install when asked.
  4. Node install script choco install nodejs-lts, hit Y to start install when asked.
  5. Git install script choco install git, hit Y to start install when asked.
  6. Setting up git
    1. git config --global "First Name Last Name"
    2. git config --global ""
  7. Point VS Code to your PHP version (version 7 should be on your machine).
    1. Open the command palette ctl shift p, type settings
    2. Select Open Settings (JSON), not Open Settings (UI)
    3. Inside the curly braces add "php.validate.executablePath": "c:/folder/php73/php.exe",.
      1. This path is dependent on where you have installed PHP.
      2. Make sure your slashes are Forward Slashes as VS Code will not interpret Backslashes correctly and will error.
  8. Right click on your Start Menu, select Settings.
  9. Type Advanced Settings in the search field.
  10. In Advanced Settings select Environment Variables.
  11. Select the Path variable (in your user or system list).
  12. Click Edit.
  13. Click New.
  14. Paste your PHP path.
  15. Click OK, three times.
  16. Close your System Window.
  17. Test in your command prompt with php -v to show what version of php is installed.

Leave a Reply

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