Member-only story

Add XAMPP PHP to Environment Variables in Windows 10

Dino Cajic
3 min readApr 10, 2020

--

If you’re using XAMPP on your Windows 10 machine, and would like to add the php command so that it’s usable in command prompt, you’re in the right place.

Start by typing in Environment Variables in your Search and click on the Edit the system environment variables result.

In the System Properties window click Environment Variables. Make sure that you’re on the Advanced tab.

Scroll down to the Path variable and click Edit.

Click on the Browse button.

Navigate to C:/xampp/php and click OK.

You will now see the path to php inside the window. Click OK to exit.

Restart your Command Prompt window if it’s open and type in:

php -v

You should see the PHP version being displayed.

You can now use php from CMD.

Read this article and others on my website:

--

--

Dino Cajic
Dino Cajic

Written by Dino Cajic

Author of An Illustrative Introduction to Algorithms. IT Leader with a B.S. in Computer Science, a minor in Biology, and a passion for learning.

No responses yet

Write a response