TRENDING
How to change Netflix download location in Windows 10 or 11
Where does Windows 10/11 store device drivers?
Restoring 7-Zip to your right-click menu in Windows 11/10
Windows 11 maintenance: How to delete log files effectively
How to record your Windows screen using VLC Media Player
How to install Microsoft Edge on Windows 7 or 8
How to make VLC media player to resume video at the stopped position
How to update Google Chrome on Windows 10/11
How to install and update VLC media player on Windows
5 ways to convert HEIC to PNG or JPG in Windows 10/11
Windows Pixel
  • How-To
  • Tips ‘N Tricks
  • Downloads
  • Windows OS
  • Gaming
Downloads

How to install PHP on Windows 10

by Moses N April 16, 2021
written by Moses N Published: April 16, 2021Updated: September 17, 2022
install php Windows 10
1.5K

Table of Contents

  • Why do we need PHP?
  • Installing PHP on Windows 10
  • Use an All-in-One package
  • Docker Desktop
  • Install Apache
  • Install PHP manually
  • Step by step procedure
  • Step 1: Downloading the PHP files
  • Step 2: Extracting the files
  • Step 3: Configuring  the php.ini file
  • Step 4: Adding Path Environment Variable
  • Conclusion

Before we dig in on installing PHP on Windows 10, let’s first briefly describe what PHP is. PHP is an acronym for Hypertext Preprocessor. It’s an open-source scripting language that is executed on the server and is free to download and also to use. PHP files have an extension php.

Why do we need PHP?

PHP is the biggest and most popular blogging system on the web. With it, you can output other contents since it a server-side language rather than HTML output only. The best advantage of PHP is that it runs efficiently and is easy to learn. It is also compatible with very many servers and supports a wide range of databases.

With PHP, you can add, modify and delete your database data. It’s easy to control user access and also encrypt data. With PHP, you can send and receive cookies and generate dynamic web content. You can download PHP from their official website here.

Installing PHP on Windows 10

To begin with, try to note down the operating system version and the architecture of your CPU. You can do this by right-clicking on ‘This PC’ in explorer and select ‘properties’. You should see details similar to mine below, and you are good to go.

There are several methods you can use to install PHP on Windows 10. We will list them and give you a brief step-by-step on them, but we will mainly focus on the manual method and give a detailed step-by-step.

SUGGESTED READ
  • Fitbit app for Windows 10
  • Top 15 Halloween wallpapers for your Windows desktop
  1. Use an All-in-One package install.
  2. Using Docker desktop.
  3. Install Apache.
  4. Manually installing PHP
  5. Using Web Platform Installer

Use an All-in-One package

With this method, you will be installing Apache, PHP, MySQL, and other dependencies at once. Let’s call it a single click install where you get all the above-mentioned packages at once.

This includes  XAMPP, WampServer, and Web.Developer. These are usually very simple and easy to install, but using them will not allow learning and understanding of all the configurations of the systems as most of it is done automatically. They can be downloaded from the internet, and the installation can be self-taught.

Docker Desktop

This method tops the list of the best setups for PHP environment development. What Docker does is to create a wrapper, also called a container, around pre-configured application dependencies like Apache, PHP, MySQL, and most web software.

This container resembles a full Linux virtual machine but lighter. You need to install Docker Desktop on Windows 10 and then easily download, configure, and run Apache and PHP.

Let’s discuss briefly how this can be achieved using the Docker desktop. You can download Docker Desktop from here. Download the .exe file and run on it your machine. It is just like any other application.

SUGGESTED READ
  • Audible app for Windows 10
  • Top 10 Meme creating tools for Windows 10

Install Apache

This is not mandatory, and you can skip it if you choose to. You can download the latest version of Apache from https://www.apachelounge.com/download/ extract its Apache24 folder to the root of your Disk C drive. You will need to install Visual C++ Redistributable for the Visual Studio version between 2015 to 2019.

Open the command prompt and start Apache with cd C:\Apache24\binHttpd
Accept the firewall exception before the server starts to run.
To change or configure Apache, go to C:\Apache24\conf\httpd.conf
The web server root folder is located at C:\Apache24\htdocs. Initially, it contains a single index.html file with the “It works!” message.

Install PHP manually

This will be our main topic of discussion and will be more detailed compare to the ones above. By the end of it, you should be able to install, configure and use PHP without any problems easily.

The benefit of manual installation is that it offers backing up, and moving the webserver is quick and simple. By this method, you have full control.

Now you might have skipped the above methods or read them, but I want you to know that this is the easiest and quickest way to install PHP.

SUGGESTED READ
  • How to install and use Team Viewer on Windows
  • The 6 Best Free Video Editors for Windows in 2021

Step by step procedure

Step 1: Downloading the PHP files

First, you need to download the latest version of PHP that will be in zip form.  You can download it from here www.php.net/downloads.php

Step 2: Extracting the files

You will then create a PHP folder in the root of Disk C or your primary Disk where you want to install PHP. Extract the contents of the zip file into this folder. PHP can be installed on any Disk in your computer anywhere but referencing will have to be done for it to work. So unless you know how to do it, I advise you to follow the steps to the latter.

PHP Folder

PHP Folder

Step 3: Configuring  the php.ini file

Now we have to find a file name ‘php.ini-development’ and make a copy. Rename this copy ‘php.ini’.

Creating PhP.ini file

Creating PhP.ini file

Proceed to open php.ini on a notepad to make a few changes. On the notepad, find ‘extension_dir’ and remove the semicolon (;) on extension_dir=”ext” to remove the comment.

Remove comment

Remove comment

Once you are done with that, you are to enable some vital extensions by scrolling down. Locate the extensions which are listed and enable those that you will use. In my example below, the enabled ones are essential for performing most of the functions. But remember, my list may differ from yours.

PHP extensions

Step 4: Adding Path Environment Variable

Here is the final bit before you get back to building your project with PHP. Open the control panel on your computer and search for ‘variable’. Click on ‘Edit the system environment variables’ and then click ‘environment variables. Proceed to select ‘path’ from system variables and then click ‘Edit’. Because we want to add a path, click ‘new’ and then ‘C: php’.

Adding enviromment variable

Adding environment variable

To finalize, go to system variables and click new, add phprc as the name and C:\php as for the value, and click OK.

System variables

Adding the path and system variable basically marks the end of the installation process, but you have to finalize by restarting for the changes to take effect.

To see the version you have just installed on your computer, open the command prompt and type php-v. From here on, you are free to do with PHP any project you want with the ease and simplicity that comes with it.

You can also play around with php-i to get more information about the PHP you have just installed.

SUGGESTED READ
  • How to update Realtek Drivers on Windows 10
  • Avast Free vs. Windows Defender: Which is better for you

Conclusion

Hopefully, this article has persuaded you regarding the power of PHP. You have seen a portion of the significant highlights of the language and read contentions why PHP is superior to its numerous rivals. PHP is an awesome language and very famous for writing dynamic web pages, and remember, it is open source. Thus, there are communities of developers that can be hired or consulted for the best creations when it comes to the use of PHP. It is platform-independent, and the rate of loading is remarkable compared to other programming languages.

Share 0 FacebookTwitterPinterestRedditWhatsappTelegramEmail

You may also like

How to update Google Chrome on Windows 10/11

How to install and update VLC media player on Windows

5 ways to convert HEIC to PNG or JPG in...

How to open EPUB files on Windows 11

How to get rid of unwanted apps on your PC...

How to install Windows Mobile Device Center on Windows 11

Leave a Comment Cancel Reply

Save my name, email, and website in this browser for the next time I comment.

Footer Logo
  • About Us
  • Contact Us
  • Disclaimers
  • Privacy Policy

COPYRIGHT 2021-22 WINDOWSPIXEL.COM - A VIBRANT LEAF MEDIA VENTURE. ALL RIGHTS RESERVED.
Windows is a registered trademark of Microsoft Corporation.


Back To Top
Windows Pixel
  • How-To
  • Tips ‘N Tricks
  • Downloads
  • Windows OS
  • Gaming