How to Install WordPress Locally Using XAMPP (Step by Step)

XAMPP control panel

Installing WordPress on your own computer (called a local install) gives you a free, private place to learn WordPress, test themes and plugins, and try changes before touching your live site. No hosting or domain needed.

This guide shows how to do it with XAMPP, a free tool that runs a web server on Windows, Mac, or Linux. At the end, you will also find easier one-click alternatives.

ToolDifficultyBest for
XAMPPMediumLearning how WordPress works behind the scenes
Local (by WP Engine)EasyMost beginners, one-click sites
WordPress PlaygroundEasiestQuick tests in your browser, nothing to install

Step 1: Install XAMPP

Download XAMPP from apachefriends.org and run the installer. The default options are fine. On Windows, it installs to C:\xampp.

Step 2: Start Apache and MySQL

Open the XAMPP Control Panel and click Start next to Apache and MySQL. Both should turn green. If Apache does not start, another program (like Skype or IIS) may be using port 80. Close it or change Apache’s port in the config.

Step 3: Create a Database

  1. In your browser, go to http://localhost/phpmyadmin.
  2. Click Databases.
  3. Enter a name, for example wordpress, and click Create.
Create a database in phpMyAdmin

Step 4: Download WordPress

Download the latest version from WordPress.org and unzip it. Copy the wordpress folder into C:\xampp\htdocs (on Mac: /Applications/XAMPP/htdocs). You can rename the folder, for example to mysite.

Step 5: Run the WordPress Installer

  1. Go to http://localhost/wordpress (or your folder name).
  2. Choose your language and click Let’s go.
  3. Enter Database Name: wordpress, Username: root, Password: leave blank, Database Host: localhost, Table Prefix: wp_.
  4. Click Submit, then Run the installation.
  5. Enter your site title, a username (do not use admin), a password, and your email.
  6. Click Install WordPress, then log in.
WordPress database configuration screen

That is it. WordPress is now running on your computer at http://localhost/wordpress.

Easier Alternatives to XAMPP

  • Local: a free app that creates a WordPress site in one click, with no database setup. The best choice for most beginners.
  • WordPress Playground: runs WordPress right in your browser. Great for quick tests, but changes are temporary unless you export them.

Tips for Local WordPress Sites

  • Your local site is private. Only you can see it.
  • XAMPP’s root user has no password, so never use this setup on a public server.
  • To move a finished local site online, use a migration plugin like Duplicator or All-in-One WP Migration.

Frequently Asked Questions

Is installing WordPress locally free?

Yes. XAMPP, Local, and WordPress itself are all free.

Can other people see my local WordPress site?

No. It only runs on your computer, unless you use a sharing feature like Local’s Live Links.

Why does Apache not start in XAMPP?

Usually another program is using port 80 or 443. Close that program or change Apache’s port in XAMPP’s settings.

How do I move a local WordPress site to a live host?

Use a migration plugin like Duplicator or All-in-One WP Migration to export your local site and import it on your host.

Comments

One response to “How to Install WordPress Locally Using XAMPP (Step by Step)”

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. sadath Avatar
    sadath

    wow its really great article …now i have understood about installation using XAMPP……