Categories: Wordpress Tutorials

How to Install WordPress on XAMPP and Open localhost wp admin

localhost wordpress wp admin is the address you use to manage a WordPress site installed on your own Windows computer with XAMPP. This guide takes you from a fresh XAMPP installation to a working local dashboard, then fixes the common port, folder and database errors that stop wp-admin from loading.

What you need

This walkthrough is for Windows and a standard XAMPP installation. XAMPP provides Apache, PHP, MariaDB and phpMyAdmin in one local development package; its Control Panel is used to start and stop the services. The XAMPP download page and Windows FAQ are the best places to get the current installer and check platform-specific details.

Before starting, keep these items ready:

  1. A Windows user account that can install software.
  2. The current XAMPP installer for Windows.
  3. The current WordPress ZIP package from WordPress.org.
  4. A browser such as Chrome, Edge or Firefox.
  5. About 15 minutes and enough free disk space for the local files.

For a simple local test, use the default folder C:\xampp. Avoid putting the installation inside Program Files, where Windows permissions can make it harder to edit files. Your WordPress files will go inside C:\xampp\htdocs, which is Apache’s local web root.

The database details used in this guide are for a normal, local XAMPP setup:

WordPress fieldValue for this guide
Database namewordpress
Usernameroot
PasswordLeave blank if you have not set one in XAMPP
Database hostlocalhost
Table prefixwp_

Do not reuse a blank database password on a public server. XAMPP is a development environment for your computer, not a production hosting setup.

Step 1: Install XAMPP on Windows

Why this matters: WordPress needs a web server, PHP and a MySQL-compatible database; XAMPP supplies the local pieces together.

  1. Download the Windows installer from the official Apache Friends XAMPP page.
  2. Run the installer. Keep Apache, PHP, MariaDB and phpMyAdmin selected. You do not need every optional component for this tutorial.
  3. Install XAMPP in C:\xampp unless you have a specific reason to use another folder.
  4. Open XAMPP Control Panel from the Start menu.
  5. If Windows Firewall asks for access, allow Apache and MariaDB on your private network. Do not expose the local services to public networks unnecessarily.

Success looks like this: the XAMPP Control Panel opens, and the folder C:\xampp\htdocs exists in File Explorer.

Step 2: Start Apache and MySQL in XAMPP

Why this matters: Apache serves the WordPress PHP files, while the XAMPP button labelled MySQL starts the bundled MariaDB database service.

  1. In XAMPP Control Panel, click Start beside Apache.
  2. Click Start beside MySQL. Depending on the XAMPP release, the underlying database is MariaDB even though the button still says MySQL.
  3. Open http://localhost/ in your browser.
  4. Open http://localhost/phpmyadmin/ in a second tab.

Success looks like this: Apache and MySQL show as running in the Control Panel, http://localhost/ shows the XAMPP start page, and phpMyAdmin opens.

The Apache Friends Windows FAQ also documents C:\xampp\xampp-control.exe and the basic http://localhost/ check. You must start both services again after a Windows restart unless you deliberately installed them as Windows services.

Step 3: Create a WordPress database in phpMyAdmin

Why this matters: WordPress stores posts, pages, settings and user accounts in a database; the files alone cannot run the site.

  1. In phpMyAdmin, select the Databases tab.
  2. Under Create database, enter wordpress.
  3. Choose a Unicode collation such as utf8mb4_general_ci if the option is shown, then click Create.
  4. Confirm that wordpress appears in the left-hand database list.

You do not need to create a separate database user for the default local XAMPP walkthrough. WordPress can connect with the local root account and a blank password when that is how your XAMPP installation is configured.

Success looks like this: phpMyAdmin shows an empty database named wordpress. An empty database is correct; WordPress will create its own tables during installation.

If you use a different database name, username or password, write those values down. You must enter the same values in Step 4. The official WordPress installation guide explains the same database-first process and the role of wp-config.php.

Step 4: Download WordPress and place it in htdocs

Why this matters: Apache maps folders inside htdocs to local URLs, so the folder name becomes part of the address you open in the browser.

  1. Download the WordPress ZIP file from WordPress.org.
  2. Open the downloaded ZIP and extract its contents.
  3. You will usually get a folder named wordpress. Copy that folder to C:\xampp\htdocs\wordpress.
  4. Check the final path. The file index.php should be at C:\xampp\htdocs\wordpress\index.php.

The most common folder mistake is an extra level, such as C:\xampp\htdocs\wordpress\wordpress\index.php. If that is your layout, move the inner wordpress folder up one level or use the matching longer URL.

Success looks like this: visiting http://localhost/wordpress/ opens the WordPress setup screen, or shows a prompt asking you to create wp-config.php. If you see a directory listing or a 404 page, check the folder path and the Apache status first.

Step 5: Run the WordPress installer

Why this matters: the installer writes the database connection settings, creates the WordPress tables and creates your first administrator account.

  1. Open http://localhost/wordpress/.
  2. Select your language and continue.
  3. When WordPress asks for database details, enter:
  • Database Name: wordpress
  • Username: root
  • Password: leave blank for the default XAMPP setup, unless you configured a password
  • Database Host: localhost
  • Table Prefix: wp_
  1. Click Submit, then click Run the installation when the connection test succeeds.
  2. Enter a site title, an administrator username that is not easy to guess, a strong password and an email address you can access.
  3. Leave search-engine visibility disabled for a private local build. This setting can be changed later when the site is public.
  4. Click Install WordPress.

Use a real strong administrator password even on localhost. A local site is often copied to a public host later, and weak credentials are easy to carry into that move by mistake.

Success looks like a confirmation that WordPress has been installed, followed by a Log In button. The installer creates a wp-config.php file in C:\xampp\htdocs\wordpress and adds the WordPress tables to the wordpress database.

Step 6: Open localhost/wordpress/wp-admin

Why this matters: wp-admin is the WordPress administration area where you manage pages, themes, plugins and settings.

Open this address:

http://localhost/wordpress/wp-admin/

Enter the administrator username and password you created in Step 5. You can also use the direct login URL:

http://localhost/wordpress/wp-login.php

If the installation is not complete, use this setup URL instead:

http://localhost/wordpress/wp-admin/install.php

The wordpress part must match the folder inside C:\xampp\htdocs. For example, if you renamed the folder to tuition-site, use http://localhost/tuition-site/wp-admin/.

Success looks like the WordPress Dashboard with the admin menu on the left. Bookmark the URL after you confirm it works, but remember that the address only works while Apache and the database service are running.

Step 7: Verify the local site

Why this matters: a login page can appear even when the database or site URL is not configured correctly, so test both the front end and the dashboard.

Run through this short check:

  1. Open http://localhost/wordpress/ and confirm the site loads.
  2. Open http://localhost/wordpress/wp-admin/ and confirm you can log in.
  3. In the dashboard, open Settings → Permalinks and click Save Changes once.
  4. Create a temporary page called “Test page”, publish it and open its preview.
  5. Stop Apache and MySQL in XAMPP, start both again, and repeat the front-end and dashboard checks.

If all five checks pass, your local WordPress installation is ready for theme and plugin work. You can use WordPress hosting from HostKarle when you are ready to move the finished site online.

Fixes for localhost WordPress wp-admin errors

Apache will not start: port 80 is busy

Apache normally uses port 80 for HTTP. Another Windows service, such as IIS’s World Wide Web Publishing Service, may already be using it.

First, click Logs beside Apache in XAMPP and look for a message about the port being in use. You have two practical options:

  1. Stop the service that owns port 80, then restart Apache. In Windows, open Services, find World Wide Web Publishing Service, stop it if you do not need IIS, and try Apache again.
  2. Change Apache to another port. In XAMPP, open Config → Service and Port Settings, set the Apache main port to 8080, save, and restart Apache. Your local URLs then become:
http://localhost:8080/
http://localhost:8080/wordpress/
http://localhost:8080/wordpress/wp-admin/

Do not add :8080 to the database host just because Apache uses port 8080. The web-server port and database port are separate. Only add a database port when you actually changed the MariaDB port.

localhost/wordpress/wp-admin shows 404 or the wrong page

Check that Apache is running, then confirm the exact folder path:

C:\xampp\htdocs\wordpress\index.php
C:\xampp\htdocs\wordpress\wp-admin\index.php

If the folder is named WordPress, wordpress-6.x or my-site, use that exact folder name in the URL. Windows is usually forgiving about letter case, but spelling and nesting still matter. Also make sure you did not open a bookmark for an old folder after renaming the site.

The WordPress installer says it cannot connect to the database

Open XAMPP Control Panel and confirm MySQL is running. Then compare the values in the installer with the database you created in phpMyAdmin:

CheckDefault local value
Database namewordpress
Userroot
Passwordblank, only if unchanged in XAMPP
Hostlocalhost

If you set a root password, enter it rather than leaving the field blank. If MariaDB uses a non-default port, use the host format localhost:port, such as localhost:3307. Do not confuse that with Apache’s 8080 port.

wp-admin keeps redirecting or the site URL is wrong

This usually happens after changing the folder name, port or WordPress address. Try the exact URL that matches the current setup, including http:// and the port if needed. Clear only the local site’s browser cookies if the login keeps returning to an old address.

If you copied the site from another location instead of making a new installation, its old domain may still be stored in the database. That is a migration task, not a fresh XAMPP installation; follow a dedicated WordPress migration guide and keep a backup of the database and files before changing URLs.

Next: put the site live

localhost is useful for learning, design and testing, but it is not a public website. When your pages, theme and content are ready, you need to move the files and database to a web host, update the site URLs, test links and configure SSL and email for the live domain.

Use this guide next: move WordPress from localhost to a live server. For a new WordPress site, HostKarle’s plans include one-click WordPress installation through Softaculous, free SSL and a PHP version selector, with WordPress hosting from ₹99/mo billed yearly.

FAQ

What is the localhost WordPress admin URL in XAMPP?

For a folder named wordpress inside C:\xampp\htdocs, open http://localhost/wordpress/wp-admin/. If Apache uses port 8080, add it after localhost: http://localhost:8080/wordpress/wp-admin/.

Why is localhost/wordpress/wp-admin not opening?

Start both Apache and MySQL in XAMPP, then confirm that the WordPress files are directly inside C:\xampp\htdocs\wordpress. A wrong folder name, nested extraction such as wordpress\wordpress, or a busy Apache port are the usual causes.

What database should I use for WordPress on XAMPP?

Create an empty database such as wordpress in http://localhost/phpmyadmin/. In a default local XAMPP setup, use database user root, leave the password blank and use database host localhost; use your own values if you changed them.

Can I install WordPress on localhost without hosting?

Yes. XAMPP lets you run WordPress on your Windows computer for development and testing without a public domain. Other people cannot visit the site until you move it to a publicly reachable hosting account.

How do I move WordPress from XAMPP to a live server?

You need to copy the WordPress files, export and import the database, update the site URLs and test the live domain. Use a step-by-step localhost-to-live WordPress migration guide and keep the local copy until the live site works.

Samrat Ghosh

Samrat Ghosh writes hands-on guides about web hosting, WordPress, domains and email for Indian small businesses, students and freelancers - the practical documentation he wishes had existed when he set up his first website.

Share
Published by
Samrat Ghosh

Recent Posts

Zoho Mail Alternatives for Indian Businesses (2026)

Compare zoho mail alternatives for Indian businesses by rupee cost, IMAP access and mailbox limits,…

4 hours ago

Best Wix Alternatives in India for Small Businesses

Compare Wix alternatives for Indian small businesses: see 3-year rupee costs, WordPress hosting, migration limits,…

15 hours ago

Titan Email Price in India: Cost per Mailbox Explained

Titan email price in India explained with mailbox costs, features, team totals and a comparison…

21 hours ago

HostKarle vs Bluehost India: Price, Renewal and Panel

HostKarle vs Bluehost compares Indian shared hosting prices, renewal bills, email, SSL, backups, panels and…

1 day ago

Hindi Blog Kaise Banaye: WordPress Step-by-Step Guide

Learn how to write blog in hindi with WordPress, Hindi typing tools, domain and hosting…

2 days ago

Google Workspace Alternatives in India for Small Teams

Compare Google Workspace alternatives in India by yearly rupee cost, email features and migration effort…

2 days ago

This website uses cookies.