How To Install WordPress Locally using XAMPP

Installing Apache and MySQL locally for WordPress using XAMPP on windows

1. Introduction

Installing WordPress on your computer helps you try out WordPress, test themes and plugins, and learn WordPress development.  It lets you operate a website within your own computer. The website isn’t visible to other people. So, you can make an experiment with the design components, plugins, settings, etc. there.

However, WordPress is not something that can be installed on your computer on its own. For installing you would need a web server and database. That is where XAMPP comes into the picture.

2. What is XAMPP?

XAMPP is a local server that you can install on your laptop/desktop to mimic an actual web server.

It’s a completely free, open-source Apache server distribution with MariaDB (formerly MySQL), PHP, and Perl. XAMPP is available for all major operating systems and is extremely easy to install and use. Here is what XAMPP stands for:

  • X — cross-platform (X), as it supports multiple operating systems
  • A — Apache HTTP Server
  • M — MariaDB (formerly MySQL)
  • P — PHP
  • P — PERL

Apart from the core components mentioned above, XAMPP usually comes with other useful tools such as Mercury mail server, phpMyAdmin for database administration, Webalizer for web server log analysis, OpenSSL, Apache Tomcat for running Java code, and FileZilla FTP server.

3. Installing XAMPP on Windows

NOTE : The procedure mentioned in this article would result in latest version of WordPress. If you are looking for installing any older version of WordPress (but not latest) then you should refer to article, Why WordPress Installation Ends Up with latest version

3.1. Download XAMPP installer for windows

Download the latest XAMPP installer for windows from Apache Friends Website

blank

3.2. Plan location of XAMPP binaries (Root)

Before running the installer. Carefully plan/choose the location for XAMPP binaries or root folders. Make a note of the following while choosing the location –

Your Website and Project files would reside inside the XAMPP folder. Best to choose data drive or partition with Admin access. Prefer not to install in ‘Program Files’ due to UAC and Windows security restrictions may potentially cause problems.

blank

3.3. Run Installer and complete installation

Run the XAMPP installer as ‘Administrator’ and complete the installation process.

blank
blank
blank
blank
blank

3.4. Start Apache and MySQL Servers

Launch the XAMPP Control Panel as ‘Administrator’ and start the Apache Server as well as MySQL Server. You can do that by clicking on “Start” next to the modules.

blank

3.5. Verify your server installations

Launch browser and type in localhost to check if Apache service is running fine. If you see the above webpage loading properly that means our installation has been successful.

blank

4. Creating Database using XAMPP

Next, let us create a database for WordPress using PHPMyAdmin.

4.1. Launch PHPMyAdmin

Open a new browser tab and type the following URL to launch PHPMyAdmin, http://localhost/phpmyadmin/ . This should launch the following web interface

blank

4.2. Create Database for your WordPress

Navigate to the Databases tab at the top of the page of phpMyAdmin. Provide a name for your new database. After that, click on the ‘Create’ button to continue.

blank

This step concludes your database creation for the WordPress website. Now let us move on to install and configure the WordPress site.

5. Installing WordPress Locally with XAMPP

5.1. Download the latest version of WordPress

First, you need to go to wordpress.org and download the latest version of WordPress. Download the zip folder on your local system.

blank

5.2. Create Project Folder to Host WordPress

Create your project folder inside XAMPP’s htdocs to host your WordPress files. Proceed with creating a new folder into XAMPP’s htdocs folder for your site and provide a name of your choice. For example, I am going to name it as ‘mywebsite’.

blank

5.3. Extract WordPress Files into Project Folder

To install WordPress locally, you need to extract WordPress files (unzip) into the newly created folder inside ‘htdocs’, in our case we will copy it into ‘mywebsite’ folder which we created.

blank

5.4. Start WordPress Setup & Install Process

Launch your web browser and enter the following URL in your browser –

http://localhost/[Name of Your project folder created inside htdocs]

In my case, this is – http://localhost/mywebsite/

This will load the WordPress installation wizard and you’ll be asked to select a language. After selecting a language, click on the ‘Continue’ button.

blank

5.5. Enter database details

When you get to the database details, enter the following:

  • Database Name = Name of the database you created in PHPMyAdmin
  • Username = “root”
  • Password = leave blank
blank

5.6. Confirm the installation start

Once everything is done, click on “Submit” and you’ll be taken to the WordPress installation page. Just run the installation

blank

5.7. Setup your Site and Admin Credentials

Continue onto the next screen and fill in all of the details — including your admin username and password — and complete the installation.

blank

Once the installation is complete, you should see the following screen.

blank

5.8. Log on to your WordPress Dashboard

Next, enter your credentials and login to your WordPress site dashboard.

blank

Finally, you’ll reach your admin dashboard. It looks like this:

blank
Tushar Sharma
Tushar Sharmahttps://www.automationdojos.com
Hi! This is Tushar, the author of 'Automation Dojos'. A passionate IT professional with a big appetite for learning, I enjoy technical content creation and curation. Hope you are having a good time! Don't forget to subscribe and stay in touch. Wishing you happy learning!

3 COMMENTS

    • Hello KMP1867,
      As far as I am aware, there is no defined limit on the number of sites you can have in a XAMPP setup. Having said that, any such limitations should depend on the ‘resources’ available to your XAMPP servers and the ‘configuration’ of your apache/db servers. Examples of ‘resources’ could be, Storage, CPU, Memory, etc available to your XAMPP, and the ‘configuration’ examples could be limits on the max threads for apache, requests handled per thread, max concurrent connections allowed or if you are using ‘port-based’ site then the number of ports available on the host and many such configuration options or apache directives. In other words, the only limitation of XAMPP should be the limitation imposed by XAMPP host server and XAMPP configuration. I would recommend you check the XAMPP logs to find out why your setup is crashing?

  1. Hello. I used xampp for years on c drive in Windows XP Pro Sp3 and it worked like a charm. Seemingly unlimited wordpress web sites could be hosted. I could move xampp back and forth after an XP re-installation.

    Recently, I had to move to Windows 7. I resolved to start using xampp again. However, it has now konked out twice and been reinstalled 3 times, and I’m fed up. I have put about 15-20 wordpress web sites into xampp. Is there a limit to the number of sites the new xampp can handle? Because the ports are fine. I am not technical at all, but I am really fed up with dozens of hours re-installing my wordpress projects every time I have to reinstall xampp, which is once a week at this point. Thanks for your time.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts

RELATED POSTS

How To Install XAMPP on Windows

What is XAMPP The full form of XAMPP stands for Cross-platform, Apache, MariaDB (MySQL), PHP and Perl. It is one of the simplest and lightweight...

How To Set XAMPP To Run As-Admin By Default

Why run XAMPP as-admin The XAMPP is recommended to be executed as-admin as it requires running a couple of system services such as Apache, MySQL...

How To Configure Virtual Hosts in XAMPP

Apache has made it very easy to have multiple websites or web applications running on the same physical server, and access each using a...

How To Change Apache Http & SSL Ports in XAMPP

Why change Apache Port By Default, Apache runs HTTP on port 80 and SSL on port 443 in XAMPP. Generally, you may need to change...

Why WordPress Installation Ends Up with latest version?

1. Why You Need Older WordPress Versions Of course, running the latest version of WordPress is the best option for any website, but at times,...
- Advertisement -spot_img

RECENT 'HOW-TO'

How To Install Oh-My-Posh On Windows PowerShell

Oh-My-Posh is a powerful custom prompt engine for any shell that has the ability to adjust the prompt string with a function or variable. It does not...

Â

MORE ON CODEX

RECENT PROJECTS

Windows JDK Manager (win-jdk-Manager)

ADjo LABS PROJECT : Simple and lightweight desktop utility with Interactive cmd Interface for easy view, re-point and switching between JAVA versions on windows. Demonstrating the capability...

MORE IN THIS CATEGORY

How To Concatenate Strings in Java

Introduction In Java, a String is a sequence of characters. There are often programming situations where you will need to concatenate Strings. There are several...

How To Install Pacman For Git on Windows

The 'Git for Windows' by default does not come with MSYS2 package manager called 'Pacman' and hence it is a limited version or subset...

How To Do Database Testing with JMeter

Introduction In this 'How-To', You will be guided to perform a database load test using JMeter. We will be installing Apache JMeter to perform the...

How To Add SSH Private Keys to Eclipse

One of the common use cases for accessing Git repositories on Github is authentication via SSH keys. This offers a secure way of working...

How to View Java API Doc Hints within IntelliJ

IntelliJ Quick Documentation So how do you generally refer your Java API Doc? If you use Google or online Java API Doc or even a...

CHECKOUT TUTORIALS

VBS Part 2 – Fundamentals and Concepts

Having gone through the Introductory part, it is time to look at some crucial fundamentals and concepts. This article is to refresh some of...
- Advertisement -spot_img