PHP TUTORIALPHP TutorialPHP InstallationPHP Hello WorldPHP Basic SyntaxPHP CommentsPHP VariablesPHP Variable ScopePHP ConstantsPHP StringsPHP OutputPHP Data TypesPHP Type CastingPHP OperatorsPHP ConditionalsPHP Shorthand ConditionalsPHP LoopsPHP Loop Control StructuresPHP FunctionsPHP String FunctionsPHP ArraysPHP Superglobal VariablesPHP in HTMLPHP AdvancedPHP Include and RequirePHP HTTP & HTTPSPHP RegexRegex IntroductionRegex PCRE SyntaxPHP PREG FunctionsPHP FormsPHP Forms IntroductionPHP Forms CreatingPHP Forms SecurityPHP Forms ValidationPHP Forms Required InputsPHP Forms StickyPHP Forms Advanced ValidationPHP Forms FinishingPHP OOPPHP OOP IntroductionPHP OOP ClassesPHP OOP PropertiesPHP OOP ObjectsPHP OOP MethodsPHP OOP $this KeywordPHP OOP Constructors and DestructorsPHP OOP VisibilityPHP OOP InheritancePHP OOP Abstract Classes and MethodsPHP OOP InterfacesPHP OOP TraitsPHP OOP ConstantsPHP OOP StaticPHP OOP NamespacesPHP OOP Autoloading

PHP Installation

How to Install?

The first step is installing PHP on your computer. But, before that, you will need to understand this simple procedure about how we going to install PHP.

PHP can run by itself, but, here we will let it run on a web server. (That's how PHP is used as a server-side language)

What is a Web Server?

A web server is a software or hardware (or both working together) which processes and serves a response for incoming network requests. In simple words, you type hyvor.com in your web browser. Then, the server of hyvor.com will process the request and server the response to you.

PHP cannot do this without a web server. Therefore, we will install a web server, then PHP.

Let's Install

Here are the steps.

  • Installing Web Server (Here we will use Apache)
  • Installing PHP

However, you can do both of the above steps at once by installing one of the following web development environments.

We recommend you to install an all-in-one development environment like WAMP in your computer to get started easily. For installation guides, please follow the links we have given above.

Note: Those all-in-one packages come with a database like MYSQL. It is better to have a database already installed in your computer as databases are usually used with PHP. If you manually install Apache and PHP, don't worry about a database. We will install it in our databse chapters.

For manual installation on Linux, please see this.

In this tutorial, we will use the Apache Web Server and PHP.

Searching for Solutions

At the beginning, we told you that we will make you a real programmer. To be that, one of the must learn things is searching for solutions. In this installation guide, we will teach you how to search for a solution.

When installing PHP in your computer, those official website (Ex: WAMP website) may not give all the details you need to install it in your computer. The best way is searching for a tutorial.

  • Go to Google (The most used search engine).
  • Search "How to install PHP on" + your operating system. (Ex: How to install PHP on Windows)
  • Now you will get some results. Choose one of the first few websites and read its content. See if it solves your problem.

Installing a text editor

You need a good text editor to write and edit PHP files. The following are some of recommended text editors. Go to those websites and choose any editor you like.

There are some Intergrated Development Environments (IDE) for PHP to make programming easier. But, for now, a text editor is enough for you to learn PHP.

IDE is a text editor but with more advanced features like build automation tools, debugger, etc.
Visit PHP Help group to get some help from experts.
Profile Picture
Supun Kavinda
I'm the Founder of Hyvor, Web Developer, Physics Lover, Flutist, and a Table Tennis Player.
My Websites