PHP Tutorial 1 – setup PHP on your computer

Share on:

What is PHP?

PHP is a widely-used general-purpose scripting language that is widely used by web developers. PHP offers to develop static or dynamic websites and web applications. That’s why if you want to be a web developer then PHP is a must-learn language for you.  

Why Learn PHP?

PHP( Hypertext Pre-Processor) is a server-side programming language, which can be used to create web pages written in HTML. It’s used on most web pages we see around, like Facebook, WordPress.  Worldwide around 7% of software jobs are for PHP developers.

PHP is ranked 6th in the TIOBE programming community index and has grown by 43% on GitHub. To know more about it, check here. In this tutorial, I will share some tutorials which will help you to learn PHP effectively. Those tutorials are designed, to teach you how different features of web pages work. Before starting development with PHP. You have to configure our system. To do this we need the following-

  1. Web Server
  2. Database(optional)
  3. Editor

#1. Web Server

Our web browsers can’t run PHP code like HTML or CSS. PHP is an interpreted language that needs an ‘interpreter’. It’s designed to work on the server-side where the server works as an interpreter that’s the reason why we need a Web Server to learn PHP. There are various free web servers are there which are as –

You just download any one of those web servers and install them. You just need to follow the traditional next method. If you face any problem tell me in the comments. There is also a portable version of that software are present, you can download them from here-

When using a portable version, before starting the server first time click on  “setup_xampp.bat”. This will configure everything locally.  

#2. Database:

If you use XAMPP or WAMP both of them come with a MySql database.  

#3. Editor:

You can write PHP code in any text editor but I suggest some editors like

Those editors have features like color-coding, intelligent code completion, and source code formatting. Those features can save you lots of time, in case of error finding. After you have installed a web server either XAMPP or WAMP follow as described. 

XAMPP: depending on where you have installed, you will need to look through the XAMPP directory and look for the folder ‘htdocs'(e.g. your location can be C:\xampp\htdocs). Here you have to create a new folder for every project.

WAMP: depending on where you have installed WAMP, you will need to look through the WAMP directory and look for the folder ‘www'(e.g. your location can be C:\wamp\www). Here you have to create a new folder for every project.  

If everything goes well then your system should be ready to execute PHP code. If you have any suggestions or you are facing any problem tell me in the comments.

You can check my next tutorial to learn how to create a login page using PHP.

Anup-Das-Anuptechtips

Anup Das

I'm obsessed with python and write articles about python tutorials for Django, Data Science, and Automation.

24 thoughts on “PHP Tutorial 1 – setup PHP on your computer”

  1. Great post with such a helpful tutorial! I am but just a beginner in the world for web designing and developing and love how you have explained everything in simpler terms. Thanks for sharing 🙂

    Reply

Leave a Comment