How to set PHP development environment in windows ? Last Updated : 03 Jun, 2024 Comments Improve Suggest changes Like Article Like Report What is PHP ? PHP (Hypertext PreProcessor) is a general-purpose programming language developed by Rasmus Lerdorf in 1994 for web development. This is one of the most popular programming language for beginners in web development because of its simplicity, large community and accessibility.Steps to setup PHP environment on a local machine: There are basically two ways to set up PHP on a local machine which are: Using all in one package (XAMPP & WAMP). (recommended)Manually install all the required packages (MySQL, PHP & Apache) and configure them.We are going to cover an easy and almost error-free method to install PHP on a local machine which is by using all in one package called XAMPP.Steps to Installing XAMPP: Downloading XAMPP: You can download the XAMPP software from the official website here with the latest windows version and latest PHP version.Open the downloaded .exe file: After opening the downloaded file you will see a popup from windows, click yes and proceed further.Click on 'next': You'll see a welcome window of XAMPP like below, click next. Select the components: Select the components you want to install. Please select the MySQL and phpMyAdmin components, all other components are optional for this tutorial. Select the installation location: Select the location you want to install the XAMPP, the default is C:\xampp. Click next: Your clicking next, your installation will begin. Open XAMPP control panel: After successfully installing the XAMPP in your local machine open the control panel by searching in the windows search bar for 'XAMPP control panel' or by going to the installation directory of XAMPP. You'll see a window like below. Configuring Apache*: This step is optional i.e. if you are having some issues on windows 10 related to blocked port. Open the configuration file for Apache as shown in the image below. Press CTRL + F and search for LISTEN 80. Replace the port 80 with something like 81 and save the file and restart control panel. Start the Apache server: Start the Apache server by clicking the start button you'll see a port number just in front of the Apache column. You can stop the service whenever you want and start any service by just clicking the start button. Checking the installation: Go to your browser and type localhost:81 (or simply localhost in case you haven't changed the port). You'll see a page like below. Checking PHP installation: Create a php file in htdocs folder in your installation directory. (C:/XAMPP/htdocs) and add the following code in it. php <?php echo phpinfo(); ?> Save the file as demo.php and go to your browser and type localhost:81/demo.php (or simply localhost/demo.php in case you haven't changed the port). If the installation goes fine you'll see a result like below. If all the above things have gone fine then Congratulations! you have successfully set up a PHP development environment in your local machine. Comment More infoAdvertise with us Next Article How to set up a PHP Console ? F frikishaan Follow Improve Article Tags : Technical Scripter Web Technologies PHP PHP Programs PHP-basics +1 More Similar Reads How to install XAMPP on Windows ? XAMPP is the most popular software package which is used to set up a PHP development environment for web services by providing all the required software components. During the process of software deployment, most of the web servers use almost similar components, so use of XAMPP provides easy transit 4 min read How to Install and Set up a WAMP Server ? Windows, Apache, MySQL and PHP is commonly abbreviated as WAMP. Some people may confuse with LAMP but the only difference between the two is their operating systems. In case of LAMP, L stands for Linux. Setting up a server included the installation of all the software listed in the abbreviation. Ano 3 min read How to install PHP in Windows 10? PHP is a general-purpose scripting language geared towards web development. It is an open-source software (OSS), which is free to download and use. PHP stands for "Hypertext Preprocessor". PHP files are saved with an extension called .php. It supports many databases MySQL, Oracle, etc.Installation o 2 min read How to Install PHP on Linux? PHP is a popular server-side scripting language that is especially used in web development. If you're working on a Linux environment, whether it's a personal development setup or a production server, you will likely need PHP installed. In this article, we will see the step-by-step guide to install P 2 min read How to Install PHP on MacOS? PHP (Hypertext Preprocessor) is known as a general-purpose scripting language that can be used to develop dynamic and interactive websites. It was among the first server-side languages that could be embedded into HTML, making it easier to add functionality to web pages without needing to call extern 3 min read How to set PHP development environment in windows ? What is PHP ? PHP (Hypertext PreProcessor) is a general-purpose programming language developed by Rasmus Lerdorf in 1994 for web development. This is one of the most popular programming language for beginners in web development because of its simplicity, large community and accessibility.Steps to se 3 min read How to set up a PHP Console ? PHP is a backend server-side language of web development. In general, we don't need to take input from the console but sometimes we need to run a small function or block of code, for which we need to take input from the console. Requirements: Server: xampp or WampServer How to set up PHP Console ? S 1 min read How to Install IMAP Extension in PHP on MacOS? Imap stands for Internet Message Access Protocol, It is a protocol used by email clients to retrieve email messages from mail servers, It is an application layer protocol in the OSI model. Imap allows us to store our messages on servers so that they can be accessed from multiple devices, whereas POP 4 min read How to Install PHP GD-library on CentOS? GD is an open-source code library that helps to create and manipulate PNG, JPEG, and GIF images in PHP. GD is commonly used for the development of websites. Image resizing, cropping, drawing, and adding effects to dynamic rendering can easily be done with its help. Picture handling and GD capacities 2 min read How to Install PHP Extensions on Windows? PHP is a general-purpose server scripting language. It is a powerful and important tool for developing dynamic and interactive Web pages. It is widely used, free, fast, flexible, and pragmatic. After installing PHP and a web server on Windows, extensions are also needed because they provide added fu 2 min read Like