Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

How to Install PHP 8, 8.1, 8.2 in WINDOWS PC

Administrator

Administrator
Joined
May 18, 2016
Messages
80

Manual Installation:​

  1. Download the Zip: Visit the PHP for Windows download page and download the ZIP file for PHP 8.1.
  2. Extract the Zip: Extract the Zip file to a directory of your choice, commonly C:\php.
  3. 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).
system variables.png

Path Location Image.png

Adding Php Info to the PATH.png



  1. 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.
  2. 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.

  1. Download XAMPP: Visit the XAMPP download page and download the version that comes with PHP 8.1.
  2. Run the Installer: Open the installer and follow the steps to install XAMPP.
  3. Start the Services: Open the XAMPP Control Panel and start the Apache and MySQL services.
  4. 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.
 
Top Bottom