PHP Lesson 1 - Getting Setup

May 28, 2008

This is the first of a series of PHP tutorials. This first lesson explains how to setup your computer to begin programming PHP.



Prepare Development Workspace

  1. Setup your development workspace by downloadig and installing XAMPPLite. (This installs the Apache webserver, MySQL, and PHP.)

  2. Open the folder where you installed XAMPPLite and run the file called xampp-control.exe.

  3. Click "Start" next to "Apache".

  4. Get a good text editor like NotePad++.


Create a New Empty Website

  1. Open the folder where you intalled xampplite. (Example: c:program filesxampplite)

  2. Open the "htdocs" folder.

  3. Create a folder for your new website. (Example: "mywebsite")


Creating Your First PHP Page

  1. Create a file called "index.php" in your new website folder.

  2. Using a text editor, type the following in the index.php file: <?php echo "Hello World" ?>

  3. Save the file.


Viewing Your First PHP Page

  1. Open your browser and navigate to http://localhost/mywesite (where "mywebsite" is the name of the folder you created earlier.

  2. You should now see the words "Hello World" displayed in your browser.


Lesson Index
Anthony Tietjen

About the Author

Anthony Tietjen is a software engineer with experience across desktop, mobile, and web development. Husband and father, with a passion for music and the outdoors. Connect with Anthony on LinkedIn and X/Twitter