Developing WordPress sites locally with AMPPS
There are plenty of ways to install WordPress on your local machine. I use a free software package called AMPPS.
It’s similar to packages like MAMP and XAMPP in that in includes all of the things you need to run WordPress: PHP (the programming language), MySQL (the database), and Apache (the web server).
While I use a Mac, note that AMPPS is also supported on Windows and Linux.
Step 1: Download and Install AMPPS
Download the latest version of AMPPS and install it like you would any other application.
Step 2: Start Apache and MySQL
Open the app and start both Apache and MySQL by clicking the green buttons. Type http://localhost/ into your browser’s address bar to verify it’s working.
Fun fact: http://127.0.0.1 will also work like http://localhost/ and can be used interchangeably. This is known as the loopback IP address.
Step 3: Choose a fake domain
There are four reserved domain extensions for testing:
- .test
- .example
- .invalid
- .localhost
For example purposes, we’ll use: wordpress.localhost
Step 4: Add the fake domain
On the “Add Domains” screen, type in your desired domain. The “Domain Path” field fills out to match. On a Mac: /Applications/AMPPS/www/wordpress.localhost
Step 5: Download WordPress and unzip in your directory path
Grab the latest WordPress core files from WordPress.org, and extract them in the directory path.
Step 6: Set up a database in phpMyAdmin
Access phpMyAdmin at http://localhost/phpmyadmin, click “New”, and create a database called “wordpress”.
Step 7: Connect to the database
Input the following information:
- Database Name: wordpress
- Username: root
- Password: mysql
- Database Host: localhost
- Table Prefix: wp_
Step 8: Finish installing WordPress
Fill out your choice of site title, username, password, and email address. Your locally-installed WordPress site is now fully functional!