R
Rishtaara
WordPress Fundamentals
Lesson 7 of 32Article18 min

Installation on a Local Web Server (Step-by-Step)

Regardless of whether you use XAMPP, WAMP, MAMP, or Local by Flywheel, every local WordPress install follows the same five steps: download WordPress, create a database, edit wp-config.php, run the installer, then log in.

The general local-install recipe

Regardless of whether you use XAMPP, WAMP, MAMP, or Local by Flywheel, every local WordPress install follows the same five steps: download WordPress, create a database, edit wp-config.php, run the installer, then log in.

Real-life example: Installing WordPress locally is like setting up a fish tank before adding fish — fill the tank (database), set the temperature (config), then release the fish (run the installer) only once conditions are ready.

Local install flow

Step 1–2: database and wp-config.php

Create an empty MySQL database (e.g. via phpMyAdmin) and note its name, along with a database username and password that has access to it.

Rename wp-config-sample.php to wp-config.php and fill in the four key constants: DB_NAME, DB_USER, DB_PASSWORD, DB_HOST.

Tip: Never commit a real wp-config.php with live database passwords to a public GitHub repo. Treat it like a password file.
wp-config.php — the four values you must set
<?php
define( 'DB_NAME', 'mywpsite_db' );
define( 'DB_USER', 'root' );
define( 'DB_PASSWORD', '' );      // often blank on local XAMPP setups
define( 'DB_HOST', 'localhost' );

// Below this, keep the unique keys and salts WordPress generates for you.
// You can fetch fresh ones from https://api.wordpress.org/secret-key/1.1/salt/

Step 3: the famous 5-minute install

Visit your local site URL in a browser (e.g. http://localhost/mywpsite). WordPress detects a valid wp-config.php and shows a setup screen asking for your site title, admin username, admin password, and admin email.

Click Install WordPress. Within seconds you get a success screen with a Log In button — this is why it is nicknamed the “famous 5-minute install.”

  • Site title — can be changed later in Settings
  • Admin username — avoid using “admin”, pick something less guessable
  • Admin password — use a strong, unique password (WordPress will suggest one)
  • Admin email — used for password resets and notifications

Step 4: log in and confirm it works

Go to http://localhost/mywpsite/wp-admin, enter your new admin username and password, and you should land on the WordPress dashboard.

Real-life example: Logging in for the first time is like turning the key on a car you just assembled — a smooth start confirms every part (database, config, files) was connected correctly.