Extract the Zip: Extract the Zip file to a directory of your choice, commonly C:\php.
Update the Environment Variables:
Right-click on "This PC" or "Computer" on the desktop or in File Explorer.
Choose "Properties."
Click on "Advanced system settings."
Click "Environment Variables."
In the "System Variables" section, find the "Path" variable, select it, and click "Edit."
Add the path of your PHP installation (e.g., C:\php).
Configure php.ini:
Navigate to your PHP installation directory and find the php.ini-development file.
Copy it and rename the copy to php.ini.
Edit this new php.ini file in a text editor like Notepad and customize your PHP settings as needed.
Test the Installation: Open a new Command Prompt window and run php -v to see if PHP is installed correctly. You should see the PHP 8.1 version number in the output.
Using XAMPP:
Another easy way to install PHP 8.1 along with other necessary software like Apache and MySQL is to use XAMPP.
Download XAMPP: Visit the XAMPP download page and download the version that comes with PHP 8.1.
Run the Installer: Open the installer and follow the steps to install XAMPP.
Start the Services: Open the XAMPP Control Panel and start the Apache and MySQL services.
Test the Installation: Open your browser and navigate to http://localhost, or run php -v in the Command Prompt to verify PHP 8.1 is installed.
By following any of these methods, you should have PHP 8.1 up and running on your Windows PC.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.