HOME HTML EDITOR C JAVA PHP

How to Install PHP (Using XAMPP)

To run PHP on your computer, you need a local server environment. The easiest way is using XAMPP, which includes Apache, MySQL, and PHP in one package.

1 Download XAMPP

Visit the official Apache Friends website and download the installer for your operating system (Windows, Linux, or macOS).

2 Run the Installer

Open the downloaded file. During installation, make sure the following components are selected:

3 Start the Control Panel

After installation, open the XAMPP Control Panel and click the "Start" button next to Apache and MySQL. When they turn green, your server is live!

4 Test Your Installation

Go to the C:\xampp\htdocs folder and create a new file named test.php. Paste the following code inside:

<?php
  phpinfo();
?>
Final Step: Open your browser and type localhost/test.php. If you see a page with PHP version details, you have successfully installed PHP!