Practice Sites
Set Up A WordPress And WooCommerce Testing Site
Learn how to set up a WordPress and WooCommerce testing site step by step for QA automation, API testing, SQL practice, and frontend testing.

This guide shows how to create a local WordPress and WooCommerce site for API, SQL, and frontend testing practice.
A realistic practice site is one of the best ways to learn automation. WooCommerce gives you product pages, cart behavior, checkout flows, user accounts, admin screens, emails, and database state to validate.
Table Of Contents
- Why Set Up A Local WordPress Testing Environment?
- Step 1: Install A Server Stack
- Step 2: Install WordPress
- Option: Installing WordPress With Docker
- Step 3: Configure WordPress For E-Commerce
- Testing Ideas
Why Set Up A Local WordPress Testing Environment?
A local WordPress testing environment is useful for practicing automation testing safely and efficiently. It gives you a controlled space where you can experiment without affecting a live site.
Testing benefits:
- API testing with WordPress and WooCommerce REST API endpoints.
- SQL practice with direct database access.
- UI testing with a stable local frontend.
- Data control so you can create, modify, reset, and inspect test data.
Local setup advantages:
- No hosting cost.
- Full admin control.
- Fast response time.
- No risk to production data.
Step 1: Install A Server Stack
A server stack provides the web server, database, and PHP runtime needed to run WordPress locally.
Choose one option:
| Option | Best For | Notes |
|---|---|---|
| MAMP | Beginners | Recommended in the source tutorial. Works on Mac and Windows. |
| XAMPP | Beginners or users familiar with XAMPP | Similar to MAMP. Works on Mac and Windows. |
| Docker Desktop | Advanced users | Best if you already know Docker or want disposable environments. |
Option 1: MAMP
Download MAMP from the official website:
https://www.mamp.info/en/downloads/
During installation:
- Windows users should unselect MAMP PRO and MAMP Viewer if prompted.
- Mac users should use MAMP, not MAMP PRO, from the Applications folder.


Starting MAMP Servers
MAMP needs two servers running:
- Apache, the web server.
- MySQL, the database server.
Mac users:
- Look for the power icon in MAMP.
- Click it to start both servers.
- When running, the icon is green and the button says Stop.
Windows users:
- Look for server indicators in the control panel.
- Click Start Servers.
- Apache and MySQL should turn green.
Troubleshooting:
- If servers do not start, make sure no other applications are using ports
8888or8889. - On Windows, try running MAMP as administrator if there are permission issues.
Configuring MAMP Ports
Use these MAMP port settings:
| Service | Port |
|---|---|
| Apache | 8888 |
| MySQL | 8889 |
Your local site will be accessible at:
http://localhost:8888
MySQL connection will use:
127.0.0.1:8889


Option 2: XAMPP
XAMPP is another local server stack option.


For XAMPP, the common defaults are:
| Service | Default |
|---|---|
| Apache | http://localhost |
| MySQL host | localhost or 127.0.0.1 |
| MySQL user | root |
| MySQL password | empty |
Step 2: Install WordPress
Once the local server environment is running, install WordPress.
There are two common methods:
- Manual install on MAMP/XAMPP.
- Docker Compose install.
Installing WordPress On MAMP Or XAMPP
High-level steps:
- Download WordPress from https://wordpress.org/download/.
- Extract the WordPress files.
- Rename the extracted folder to your site name, such as
mysite1. - Move that folder into the local server document root.
- Create a database.
- Run the WordPress installer.

Verify WordPress Files
Visit your local WordPress folder in the browser.
For MAMP:
http://localhost:8888/mysite1
For XAMPP:
http://localhost/mysite1
You should see the WordPress installation welcome screen.

Create The WordPress Database
Before running the WordPress installer, create a database in phpMyAdmin.
From MAMP:
- Click Go to Application on Mac or Open WebStart page on Windows.
- Open the phpMyAdmin link from the dashboard.
From XAMPP:
- Click Admin next to MySQL, or open the XAMPP dashboard.
- Open phpMyAdmin.


In phpMyAdmin:
- Click New.
- Enter the same name as your site folder, such as
mysite1. - Click Create.


Save these database details:
| Field | MAMP | XAMPP |
|---|---|---|
| Database Name | Your site folder name | Your site folder name |
| Username | root | root |
| Password | root | empty |
| Database Host | 127.0.0.1:8889 | 127.0.0.1 |
Run The WordPress Installer
On the WordPress installer database screen, enter the database connection values.
For MAMP, include the port number in the database host:
127.0.0.1:8889
For XAMPP, use:
127.0.0.1

Create The WordPress Admin User
On the setup screen, create your local admin user.
Suggested local-only values:
| Field | Value |
|---|---|
| Site Title | Any local testing title |
| Admin Username | admin |
| Password | password |
| Any local/testing email |
These credentials are for local development only. Never use admin/password on a real live site.

After installation, log in and confirm the WordPress dashboard loads.

Option: Installing WordPress With Docker
Docker provides a simple way to set up WordPress and MySQL with containers.
Create a project folder, such as:
mkdir mysite1
cd mysite1
Create a docker-compose.yml file:
version: "3"
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: somewordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
wordpress:
depends_on:
- db
image: wordpress:latest
ports:
- "8080:80"
restart: always
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_NAME: wordpress
volumes:
- wp_data:/var/www/html
volumes:
db_data: {}
wp_data: {}
Start the containers:
docker-compose up -d
Then open:
http://localhost:8080
Useful Docker commands:
docker-compose ps
docker-compose logs
docker-compose down
docker-compose down -v
Use docker-compose down -v only when you intentionally want to remove the database volume and reset the environment.
Step 3: Configure WordPress For E-Commerce
Once WordPress is working, convert it into an e-commerce testing site.
You can do this in two ways:
- Restore a preconfigured demo store backup.
- Configure WooCommerce manually from scratch.
Option 1: Restore A Preconfigured Store
This is faster when you want a ready-to-test e-commerce site.
General flow:
- Open the WordPress dashboard.
- Go to Plugins.
- Install the backup/restore plugin used by the course.
- Upload the provided backup file.
- Complete the restoration.
- Confirm the store frontend and admin dashboard work.




After restoration, create WooCommerce API credentials if you plan to practice API testing:
- Go to WooCommerce -> Settings.
- Open the API or Advanced settings area.
- Create REST API keys.
- Save the consumer key and consumer secret.
Option 2: Manual Store Configuration
Manual setup takes longer, but it helps you understand each component.
Essential Installation
Install and activate the Storefront theme:
- Go to Appearance -> Themes -> Add New.
- Search for Storefront.
- Click Install.
- Click Activate.
Install and activate WooCommerce:
- Go to Plugins -> Add New.
- Search for WooCommerce.
- Click Install.
- Click Activate.
Basic WordPress Settings
Configure permalinks:
- Go to Settings -> Permalinks.
- Select Post name.
- Save changes.
Set the homepage:
- Go to Settings -> Reading.
- Select A static page.
- Set Homepage to Shop.
- Save changes.
Enable user registration:
- Go to Settings -> General.
- Check Anyone can register.
- Save changes.
WooCommerce Configuration
Basic settings:
- Go to WooCommerce -> Settings.
- Make the site live if WooCommerce shows a site visibility setting.
- Go to WooCommerce -> Settings -> Accounts & Privacy.
- Enable account creation on the My account page.
- Disable sending password setup links if you want simple local test accounts.
- Save changes.
Import Sample Products
You can import WooCommerce sample products:
- Download WooCommerce from wordpress.org.
- Extract the ZIP file.
- Find the sample product CSV.
- Go to WooCommerce import tools.
- Follow WooCommerce's official sample data import instructions.
Add A Promotional Banner
For extra UI testing practice, add a notification banner:
- Install the WPFront Notification Bar plugin.
- Enable the banner.
- Set content such as:
<strong>Free shipping on orders over $50</strong>
- Exclude pages such as my account and sample page.
- Set colors and behavior for testing.
Ready For Testing
Whether you chose backup restoration or manual setup, you now have a functional WooCommerce site for testing.
Quick reference:
| Item | Value |
|---|---|
| MAMP site URL | http://localhost:8888/mysite1 |
| XAMPP site URL | http://localhost/mysite1 |
| Docker site URL | http://localhost:8080 |
| Admin dashboard | Add /wp-admin to your site URL |
| Local admin login | admin/password if you used the suggested local credentials |
Testing Ideas
Use this site to practice:
- Product search and filtering.
- Cart workflows.
- Checkout as a guest.
- Checkout as a registered user.
- Invalid coupon behavior.
- User registration and login.
- WooCommerce REST API calls.
- Database validation in MySQL.
- Admin order verification.
- End-to-end Selenium or Playwright flows.
