How to Install PHP 8.3 on Windows 10/11

How to Install PHP 8.3 on Windows 10/11

ยท

3 min read

What is PHP?

PHP (Hypertext Preprocessors) is an open-source server-side scripting language that many devs use for web development. It is also a general-purpose language that you can use to make lots of projects, including Graphical User Interfaces (GUIs).
So, PHP is a Back-End Programming.

PHP was created by Rasmus Lerdorf in 1993 and released in 1995.
Now the latest version is PHP 8.3.1, I recommend you use the latest version of PHP, because so many versions of PHP are EOL.

PHP runs on Zend Engine, like NodeJS run on V8 JavaScript Engine.
If you're want to use PHP as Server-side, there are many the Databases and Webservers recommended for PHP.

In this article I only install PHP as a command line scripting ๐Ÿ—ฟ.

Retrieved from https://www.php.net/manual/en/refs.database.vendors.php, these are the databases that recommend for PHP:

  1. MySQL

  2. PostgreSQL

  3. Oracle

  4. SQLite, etc.

Best Webservers for PHP

Retrieved from Best Web Servers for PHP Development - RedAlkemi, these are the best webservers for PHP:

  1. Apache is a popular web server that supports the use of PHP. It can be installed on a variety of operating systems, including Linux, macOS, and Windows.

  2. NGINX is another popular web server that supports the use of PHP. It is known for its high performance and low resource usage, which makes it a good choice for high-traffic websites.

  3. Microsoft IIS (Internet Information Services) is a web server that is included with the Windows operating system. It supports the use of PHP and is a good choice for applications that are hosted on a Windows server.

  4. LiteSpeed is a commercial web server that supports the use of PHP. High-traffic environments often use it because of its high performance.

How to Install PHP on Windows 10/11

First, visit https://www.php.net/downloads.php and select Windows downloads with version 8.3.0.

Since I'm running PHP only on the command line, I'll use the Non Thread Safe type, and choose the .zip format.

You might be wondering why there are Thread Safe and Non Thread Safe options, what-is-thread-safe-or-non-thread-safe-in-php. Most communities use Non Thread Safe, because its fast, less bugs, and more secure.

Open file explorer and extract .zip file.

If you open the terminal right now and type php --version, there must be an error ๐Ÿ˜….

Because we have not set the PATH Environment Variable of this PHP folder.
What is it? the PATH Environment Variable is a set of directories where executable programs are located. For simple, it allows the execution of commands.

Now copy the address of the folder.

Then click on Windows start menu and search "edit the system environment variables" or just "env" and click it.

Click "Environment Variables...".

Go to the "System variables", then select "path" option and double-click it.

Select "New" and paste it from the PHP folder that I'm explained above. Then click OK three times ๐Ÿ—ฟ.

Okay, now open your favourite terminal, type php --version

You have successfully installed PHP on your Windows 10/11 machine.


Because I'm still new to blogging, please advise and criticize if there are mistakes in words, thank you.

ย