(100% worked) How to fix PHP is not recognized as an internal or external command for Xampp Or Wamp

5 steps for fixing PHP is not recognized as an internal or external command for Xampp rr Wamp.

You can follow the tips below.

Go to My Computer->properties -> Advanced system setting-> Environment Variables->path (click on Edit)

Step 1 : First, you need to right click on This PC -> Properties

Step 2 : next Go to Advanced System Settings

Step 3 : Go to environment variables -> system variables , modify the path and click edit.

Step 4 : add new button and insert your php file path like given below.

  • for user that use Xampp: insert D:\xampp\php\ and D:\xampp\php\php.exe (xampp location is on drive D and if you installed on drive C, you need to use drive c instead of drive D.) to variable Path.
  • for user that use Wamp: insert D:\wamp\bin\php and D:\wamp\bin\php\your php version\php.exe (wamp location is on drive D and if you installed on drive C, you need to use drive c instead of drive D.) to variable Path.

Step 5 : Finally, you can test by opening Terminal (CMD) and checking your php version

by typing php -v

Share this Article !

You may like this