"WordPress on Localhost"


If you’re looking to create a WordPress website on your local computer using XAMPP, you’ve come to the right place! In this step-by-step guide, I’ll walk you through the entire process. By the end of this post, you’ll have a fully functional WordPress site running locally on your Windows 10 machine.

What You’ll Need:

  • A computer running Windows 10.
  • XAMPP installed on your computer.
  • WordPress files, which we’ll download in the steps below.

Let’s get started!

Step 1: Download and Install XAMPP

First, we need to install XAMPP, which allows us to create a local server on your machine.

  1. Download XAMPP: Visit the official XAMPP website and download the latest 64-bit version of XAMPP for Windows 10.
  2. Install XAMPP: After downloading, run the installer. Keep the default settings by clicking "Next" on every screen.
  3. Choose Installation Folder: XAMPP will ask you where you want to install it. Select the C drive (C:\xampp) to keep things simple.

Once installed, you now have a local server environment to work with WordPress!

Step 2: Locate the htdocs Folder

Now that XAMPP is installed, let’s locate the htdocs folder. This is where your website files will be stored.

  1. Go to the folder where XAMPP is installed (usually in C:\xampp).
  2. Inside the xampp folder, open the folder named htdocs.
  3. Create a new folder: In htdocs, create a folder for your website. You can name this folder anything you like (for example, "xyz" or "mywebsite"). This folder will hold your WordPress files.

Step 3: Start XAMPP Server

We’re now ready to start XAMPP and run the local server.

  1. Open the XAMPP Control Panel (you can find it in your Start menu after installation).
  2. In the Control Panel, you’ll see two modules that we need to start: Apache and MySQL.
    • Click the Start button next to both of these modules. The buttons should turn green, which means the server is running.

Step 4: Create a Database

WordPress needs a database to store all of your website’s information, so we’ll create one in phpMyAdmin.

  1. Open your browser and type localhost/phpmyadmin in the address bar, then press Enter.
  2. You’ll be taken to the phpMyAdmin dashboard.
  3. On the left-hand side, click New to create a new database.
  4. Enter a name for your database (for example, “wordpress_db” or any name you prefer).
  5. Click Create. You should see a success message that confirms the database was created.

Step 5: Download and Extract WordPress

Next, we’ll download WordPress and place it in the folder we created earlier.

  1. Go to WordPress.org and download the latest version of WordPress.
  2. Move the downloaded WordPress zip file into your website folder inside htdocs (for example, C:\xampp\htdocs\xyz).
  3. Extract the WordPress zip file in the same folder. After extracting, you’ll see many files and folders.

Step 6: Remove the WordPress Zip File

After extracting the WordPress files, you can delete the original zip file to clean up the folder.

  1. Go back to your website folder (C:\xampp\htdocs\xyz) and delete the WordPress zip file.
  2. You should now only see the extracted WordPress files and folders.

Step 7: Launch WordPress Installation

Now it’s time to install WordPress and set up your website.

  1. Open your browser again and type localhost/your-website-folder-name (e.g., localhost/xyz if your folder is named "xyz").
  2. You’ll see the WordPress setup page. It will ask you for some information about the database and your website.

Step 8: Enter Database Information

This is where you’ll connect WordPress to the database you created earlier.

  1. Database Name: Enter the name of the database you created in phpMyAdmin (e.g., “wordpress_db”).
  2. Username: Type root.
  3. Password: Leave the password field blank.
  4. Database Host: Leave this as localhost.
  5. Table Prefix: You can leave this as the default wp_ unless you want to run multiple WordPress sites in one database.

After entering these details, click Submit and move to the next step.

Step 9: Complete WordPress Installation

Now that your database is connected, you’ll be asked for some final information to finish the WordPress installation.

  1. Site Title: This is the name of your website (e.g., “My Awesome Website”).
  2. Username: Choose a username for your WordPress admin account. You’ll use this to log in to your website.
  3. Password: Create a strong password for your admin account.
  4. Email: Enter your email address (for password recovery and notifications).
  5. Click Install WordPress.

Step 10: Success!

Once the installation is complete, WordPress will display a success message, and you’ll be able to log in to your new website by visiting localhost/your-website-folder-name/wp-admin.

Congratulations! You’ve successfully set up a WordPress website on your local XAMPP server.


Setting up a local WordPress site on Windows 10 using XAMPP is a great way to build and test websites before going live. By following the steps above, you can easily create a local development environment and start working with WordPress.

Read all blog articles