2.7 KiB
title |
---|
PHP Install |
What Do I Need for Installation?
Any computer! PHP is very versatile and can run in many different environments.
Manual Install:
Windows
- Download the zip from windows.php.net/download and unzip it (ex
C:\PHP
) - Add php to the windows PATH (for example append
;C:\PHP
) - Copy and rename either
php.ini - development
orphp.ini - production
tophp.ini
If you are using IIS for your webserver, this is a good resource:
MacOS
Type the commands in a terminal
- Install homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Install php
brew install php
Linux
This varies a bit with each distribution
- debian/ubuntu
sudo apt-get install php -y
- fedora/rhl/centos
dnf install php php-common
There are many good resources for this, like:
Install Bundles
There are also several popular install bundles for PHP technology stacks which are multi-platform.
- XAMPP Installer - Apache Server, MariaDB, PHP, and Perl window, linux, macOS
- MAMP Webserver windows, macOS
- WAMP Server windows
Find a webhost with free PHP services.
It is common for free webhosting services to offer support for PHP.
Once PHP is installed:
If you installed PHP with a webserver, often a default route is set for localhost/info.php
or 127.0.0.1/info.php
. If PHP has been integrated properly, it should display a description of the current PHP installation. If your server will be public, you should delete info.php
as it contains private details about your installation, system.
If you did not install PHP with a webserver, several tools integrate well with the library for the ability to locally run, debug, host your PHP scripts and applications. VS Code's extension PHP Server allows your to develop and host locally.
Resources
- The official PHP website (PHP.net) has installation instructions for PHP: http://php.net/manual/en/install.php