How to Install WordPress on XAMPP Localhost
If you want to create a WordPress website without buying hosting or a domain, installing WordPress on XAMPP localhost is the best option. It lets you build, test, and customize your site offline—completely free.
Step 1: Download and Install XAMPP
- Go to the XAMPP website
- Download the version for your OS
Choose Windows / Linux / macOS.
- Install XAMPP
- Open the installer
- Accept the default components (Apache, MySQL, PHP)
- Complete the installation
- Start XAMPP
- Open XAMPP Control Panel and click:
- Start Apache
- Start MySQL
Both should turn green.
Step 2: Create a Database for WordPress
- Open your browser
- Visit: http://localhost/phpmyadmin
- Click Databases tab
- Enter a database name (example: wordpress_db)
- Click Create
Your database is ready!
Step 3: Download WordPress
- Go to: wordpress.org/download
- Download the latest WordPress ZIP file
- Extract the ZIP file
- Rename the folder to your project name (example: mywebsite)
Step 4: Move WordPress to XAMPP
- Copy the extracted WordPress folder
- Paste it inside:
- \xampp\htdocs\
Your local WordPress URL will now be:
Step 5: Install WordPress in Localhost
- Open browser and visit:
http://localhost/mywebsite - Select your preferred language → Continue
- You’ll see the setup page
Click Let’s Go!
- Enter database details:
- Database Name
- Username
- Password
- Database Host
- Table Prefix
- Click Submit → Run the Installation
Step 6: Create WordPress Admin Login
Enter:
- Site Title
- Username
- Password
- Your Email
Click Install WordPress
You’re done!
Login URL:
http://localhost/mywebsite/wp-admin
Enter your Username and Password.