How to Install WordPress on XAMPP (Step-by-Step Guide)

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

  1. Go to the XAMPP website
  2. Download the version for your OS

         Choose Windows / Linux / macOS.

  1. Install XAMPP
  • Open the installer
  • Accept the default components (Apache, MySQL, PHP)
  • Complete the installation
  1. Start XAMPP
  2. Open XAMPP Control Panel and click:
  • Start Apache
  • Start MySQL

Both should turn green.

 

Step 2: Create a Database for WordPress

  1. Open your browser
  2. Visit: http://localhost/phpmyadmin
  3. Click Databases tab
  4. Enter a database name (example: wordpress_db)
  5. Click Create

Your database is ready!

 

Step 3: Download WordPress

  1. Go to: wordpress.org/download
  2. Download the latest WordPress ZIP file
  3. Extract the ZIP file
  4. Rename the folder to your project name (example: mywebsite)

 

Step 4: Move WordPress to XAMPP

  1. Copy the extracted WordPress folder
  2. Paste it inside:
  • \xampp\htdocs\

 Your local WordPress URL will now be:

http://localhost/mywebsite

 

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:
  1. Database Name
  2. Username
  3. Password
  4. Database Host
  5. 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.