Summary: in this tutorial, you’ll learn how to install PHP on your computer locally to start learning PHP.
Installing PHP on your computer allows you to safely develop and test a web application without affecting the live system.
To work with PHP locally, you need to have the following software:
- PHP
- A web server that supports PHP. We’ll use the Apache webserver.
- A database server. We’ll use the MySQL database server.
Typically, you won’t install all this software separately because connecting them is tricky and not intended for beginners.
Therefore, it is easier to find an all-in-one software package that includes PHP, a web server, and a database server. One of the most popular PHP development environments is XAMPP.
XAMPP is an easy-to-install Apache distribution that contains PHP, MariaDB, and an Apache webserver. It supports Windows, Linux, and MacOS.
Note that MariaDB is a fork of the most popular relational database management system, MySQL.
Download XAMPP #
To install XAMPP on Windows, go to the XAMPP official website and download the appropriate version for your platform.
Install XAMPP on Windows #
To install XAMPP on Windows, you can follow these steps:
Step 1. Start the installation #
Double-click the downloaded file to start setting up XAMPP: