Creating your first "Hello World" Script in PHP

Hello dear 000webhosters,

I’m going to explain how to run your first “Hello World” PHP script at 000webhost.

Login and Getting Started

  • First, login into your 000webhost account. If you don’t have a 000webhost account, please sign up.

  • Then, you will go to your 000webhost dashboard.

  • Choose your website and click manage website.
    If you don’t have any websites created, create one first.

  • Choose build website from the left panel

  • Then, click upload now.

It will open the file manager. Now, you have accessed the awesome 000webhost file manager.

Creating the PHP File

Your file manager would look like this. By default it will select the public_html folder, if it don’t please select it.

  • Now, click the create new file button in the top panel.

  • Name the file as hello-world.php and save it

  • Double-click on the file name to open it. Then, you will see the file editor opened in your browser. It’s time to write your Hello World Script.

  • Copy and paste this code into the editor

    echo 'Hello World';
  • Click save

  • Visit Make sure you replace yourwebsite with your website’s short name.

If you see the message “Hello World” you are successful!

Hello world is the first ever script most of beginners write to start their PHP career. If you like to continue learning PHP follow a PHP tutorial step-by-step. Then, you will learn how this hello world actually work based on a client-server modal.


1 Like