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.
- Download XAMPP: Visit the official XAMPP website and download the latest 64-bit version of XAMPP for Windows 10.
- Install XAMPP: After downloading, run the installer. Keep the default settings by clicking "Next" on every screen.
- 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.
- Go to the folder where XAMPP is installed (usually in
C:\xampp
). - Inside the
xampp
folder, open the folder namedhtdocs
. - 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.
- Open the XAMPP Control Panel (you can find it in your Start menu after installation).
- 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.
- Open your browser and type
localhost/phpmyadmin
in the address bar, then press Enter. - You’ll be taken to the phpMyAdmin dashboard.
- On the left-hand side, click New to create a new database.
- Enter a name for your database (for example, “wordpress_db” or any name you prefer).
- 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.
- Go to WordPress.org and download the latest version of WordPress.
- Move the downloaded WordPress zip file into your website folder inside
htdocs
(for example, C:\xampp\htdocs\xyz). - 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.
- Go back to your website folder (
C:\xampp\htdocs\xyz
) and delete the WordPress zip file. - 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.
- Open your browser again and type
localhost/your-website-folder-name
(e.g.,localhost/xyz
if your folder is named "xyz"). - 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.
- Database Name: Enter the name of the database you created in phpMyAdmin (e.g., “wordpress_db”).
- Username: Type
root
. - Password: Leave the password field blank.
- Database Host: Leave this as
localhost
. - 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.
- Site Title: This is the name of your website (e.g., “My Awesome Website”).
- Username: Choose a username for your WordPress admin account. You’ll use this to log in to your website.
- Password: Create a strong password for your admin account.
- Email: Enter your email address (for password recovery and notifications).
- 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.
0 Comments