How to Install PHP on Windows, server, Linux and macOS

How to Install PHP on Windows, server, Linux and macOS

This article explains how to install PHP  and Apache on Windows 7, 8, 10 (32, 64-bit).

Linux and macOS users often have Apache and PHP pre-installed or available via package managers. Windows 10 requires a little more effort. The steps below may work with other editions of Windows, PHP, and Apache, but check the documentation of each dependency for specific instructions.

 

What Do I Need?

To start using PHP, you can:

  • Find a web host with PHP and MySQL support
  • Install a web server on your own PC, and then install PHP and MySQL

You may like

Use a Web Host With PHP Support

If your server has activated support for PHP you do not need to do anything.

Just create some .phpfiles, place them in your web directory, and the server will automatically parse them for you.

You do not need to compile anything or install any extra tools.

Because PHP is free, most web hosts offer PHP support.

 

Set Up PHP on Your Own PC

However, if your server does not support PHP, you must:

  • install a web server
  • install PHP
  • install a database, such as MySQL

 

The official PHP website (PHP.net) has installation instructions for PHP: http://php.net/manual/en/install.php

 

Why PHP?

PHP remains the most widespread and popular server-side programming language on the Web. It’s installed by most web hosts, and has a simple learning curve, close ties with the MySQL database, superb documentation, and an excellent collection of libraries to cut your development time. PHP may not be perfect, but it should be considered as an option for your next web application. It’s the language of choice for Facebook, Slack, Wikipedia, MailChimp, Etsy, and WordPress — the Content Management System which powers 40% of the web.

 

Why Install PHP Locally?

Installing PHP on your development PC allows you to safely create and test websites and applications without affecting the data or systems on your live server.

 

Alternative Installation Options

Before you jump in, there may be a simpler installation options…

 

Use an All-in-One package

All-in-one packages are available for Windows which contain Apache, PHP, MySQL, and many other dependencies in a single installation file.

These packages are easy to use, but they may not exactly match your live server. Installing Apache and PHP manually will help you learn more about the system and configuration options.

 

Other information php :

The official PHP website (PHP.net) has installation instructions for PHP: http://php.net/manual/en/install.php

You may like

Leave a Comment