Step-by-Step Tutorial: Installing WordPress on XAMPP
Prerequisites
- XAMPP: Download and install from apachefriends.org for your OS (Windows, macOS, or Linux).
- WordPress: Download the latest version from wordpress.org.
- A web browser and a text editor (e.g., Notepad or VS Code).
Step 1: Install and Set Up XAMPP
- Download XAMPP:
- Visit apachefriends.org and download XAMPP for your OS.

- Install XAMPP:
- Run the installer, keeping the default directory (e.g., C:\xampp on Windows).
- Ensure Apache and MySQL are selected.
- Start XAMPP:
- Open the XAMPP Control Panel and click “Start” for Apache and MySQL.
- Test XAMPP:
- Open a browser and go to http://localhost. You should see the XAMPP dashboard.

Step 2: Download and Prepare WordPress
- Download WordPress:
- Go to wordpress.org and download the latest .zip file.

- Extract WordPress:
- Unzip the downloaded file (e.g., wordpress-6.x.x.zip) to a temporary location.
- Move WordPress to XAMPP:
- Navigate to C:\xampp\htdocs (or equivalent).
- Create a folder named wordpress in htdocs.
- Copy all files from the extracted WordPress folder to C:\xampp\htdocs\wordpress.
- renamed the copy folder name “mywebsite”

Step 3: Create a Database for WordPress
- Access phpMyAdmin:
- Go to http://localhost/phpmyadmin in your browser.

- Create a New Database:
- Click the “Databases” tab in phpMyAdmin.
- Enter mywebsite_db in the “Create database” field and click “Create.”

- Note the Database Details:
- Database name: mywebsite_db.
- Username: root (default for XAMPP).
- Password: (leave blank, as XAMPP’s default root user has no password).

Step 4: Configure WordPress
- Access WordPress Setup:
- Go to http://localhost/mywebsite in your browser.
- Select your preferred language and click “Continue.”
- Enter Database Details:
- Click “Let’s go!” on the next screen.
- Fill in:
- Database Name: mywebsite_db.
- Username: root.
- Password: Leave blank.
- Database Host: localhost.
- Table Prefix: wp_ (or your preference).
- Click “Submit,” then “Run the installation.”
- Complete Installation:
- Enter site details:
- Site Title: Your website’s name.
- Username: Admin username (e.g., admin).
- Password: Choose a strong password.
- Your Email: Enter a valid email.
- Search Engine Visibility: Uncheck for local testing.
- Click “Install WordPress.”
- Enter site details:
- Log In:
- After installation, click “Log In” and use your credentials..
Step 5: Test Your WordPress Site
- Access the Site:
- Visit http://localhost/wordpress to view your site’s front end.
- Access the Admin Dashboard:
- Go to http://localhost/wordpress/wp-admin and log in.
- Customize themes, plugins, or content as needed.
Troubleshooting Tips
- Apache/MySQL Won’t Start:
- Check for port conflicts (80 for Apache, 3306 for MySQL). Adjust ports in XAMPP if needed.
- Database Connection Error:
- Verify database name (mywebsite_db), username (root), and password (blank).
- Page Not Found:
- Ensure WordPress files are in htdocs/wordpress and Apache is running.
Optional: Configure Permalinks
- In the WordPress dashboard, go to Settings > Permalinks.
- Select “Post name” and save.
- If permalinks fail, enable mod_rewrite:
- Open C:\xampp\apache\conf\httpd.conf.
- Uncomment LoadModule rewrite_module modules/mod_rewrite.so by removing the #.
- Restart Apache.
Summary of Key URLs
- WordPress site: http://localhost/wordpress
- Admin dashboard: http://localhost/wordpress/wp-admin
- phpMyAdmin: http://localhost/phpmyadmin
Notes
- This is for local development only. For a live site, use a web host.
- Back up htdocs/wordpress and mywebsite_db before changes.
- Search for “XAMPP WordPress installation” on Google or YouTube for visual guides if needed.