Skip to content

Instantly share code, notes, and snippets.

@peterhurford
Last active April 9, 2023 15:22
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save peterhurford/8602d9fb334baa71d983 to your computer and use it in GitHub Desktop.
Save peterhurford/8602d9fb334baa71d983 to your computer and use it in GitHub Desktop.
How to use XAMPP to test PHP on your own computer

So this is a guide for how to use XAMPP to test any PHP website on your own computer. Well, actually, it's more a guide of guides than an actual guide. I personally didn't find the process to be bad, but it also wasn't straightforward, and it involved a lot of googling separate problems. There was no One Guide for the Entire Process, but a bunch of separate things.

So I decided to put everything together. Here are the steps:

Step 1: Install XAMPP. Download from here.

Step 2: Set up XAMPP. Follow instructions here.

Step 3: Go to PhpMyAdmin and create any relevant MySQL tables, if any.

Step 4: Change the password for PhpMyAdmin (login to PhpMyAdmin, and click “Users” at the top).

Step 5: Get unlocked out from PhpMyAdmin.

Step 6: Edit your database access script to reflect the new PhpMyAdmin credentials.

Step 7: Change the temp dir in the php.ini file to point to a directory that’s writable. (See: How to edit php.ini and some more ideas on tmp_dir.)

Step 8: If you're having users upload things, make sure your copies of folders where you want uploads to go are writable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment