Getting Started with PHP (No Framework)

If you're new to PHP and want to get a basic page up and running, follow these simple steps:

✅ Step 1: Install PHP

Make sure PHP is installed on your computer. You can download it from php.net/downloads or install it using your system's package manager (like Homebrew on macOS or apt on Ubuntu).

✅ Step 2: Create a File

Make a folder called myproject and in that folder make a new file named index.php and add the following:

<h1>hello</h1>

✅ Step 3: Run a Local Server

Open your terminal, go to the folder where index.php is saved, and run:

php -S localhost:8000

Then open your browser and go to:

<http://localhost:8000>

You should see the word “hello” on the page.

If you are using Windows, you can try WSL. It should work.