PHP is a general-purpose programming language. However in most cases it is used to create websites. And you are probably going to learn it for the same reason.

PHP is a very simple programming language. And that's very good. You don't have to spend years mastering the skill to start creating websites. You'll be able to create your very first PHP website within a day of learning.

There are several other things you should know, at least at a basic level, to create a website, like basics of Linux command line, how to install a software on Linux or deal with its services. However it's not really necessary to do it right away. You could start with renting a simplest PHP web hosting where everything is managed in a browser. Or even find a free one

The name of this tutorial set is “PHP for beginners” which means that I'm going to start from the very beginning. You should do fine even if it's the first programming language you're learning. Still if you're going to create a website, you should at least know some of HTML, CSS and JavaScript.

If you're good at Linux and know how to setup everything you need — that's fine. If not — just pick some free PHP hosting and find out how to upload a .php file into the root of your website. Also you'll be given some free 3rd-level domain. That's also OK for learning purposes. Let's say your free domain is You should learn then how to create a file index.php and upload it into the root directory of your website, so it could be reachable in web browser via URL

However there's even easier way if you've just started and going to learn the very basics of PHP. You can use any of online PHP sandboxes which allow you to run simple PHP scripts right in your web browser. Just try them out

So pick a way that you're comfortable with and let's begin.

P.S. The very first PHP function you should learn to make your learning easier is var_dump function. It prints a type and a value (or a whole structure) of whatever is passed as an argument. It helps you to understand what's going on inside of a given entity.

Rate this post:
Lesson 2
Share this page:

Learning plan

1. Introduction
Choose the best way to start, and let's start!
Embedding PHP script into HTML
The very basics of PHP variables
4. Arrays
The very basics of PHP arrays