Reading time : 6 mins

How to install WordPress on localhost – Complete Guide

Are you looking for a solution to install WordPress on your computer device locally?

You can start learning about WordPress by trying it on your computer device as localhost.

Here are 5 steps given to install the localhost WordPress website on your computer device.

For testing environment and developing purpose, Localhost is very popular among developers and learning beginners.

Localhost allows the admin to host a database on his/her computer device. It reads the user’s device as a server. If someone uses localhost with WordPress then the website will be visible to only that computer device.

Web hosting is a must if you want to publish your website on the internet, Localhost is only for testing and learning purposes.

  • Developers use localhost for testing out plugins, themes, and functions of the website.
  • beginners and learners can use it for learning purposes.

Core files of a localhost WordPress and web-hosted WordPress are the same. So there is no difference in the functions of websites.

You can install localhost in Windows, Linux, and Mac. Click on the bottom option of your preferences to follow the guide.

  • Install Localhost for Windows Device
  • Install Localhost for MAC Device.
  • Install Localhost on a Linux device.

There are some software available that provide localhost services, which are

  1. LAMP = It stands for Linux-Apache-MySQL-PHP
  2. MAMP = It stands for Mac OS X-Apache-MySQL-PHP
  3. WAMP = It stands for Windows-Apache-MySQL-PHP
  4. XAMPP = It stands for Cross-Platform (ALL) X-Apache-MySQL-PHP

All of them are open-source software. The main problem is that MAMP is only for MAC devices. LAMP is only for Linux devices & WAMP can be only used for Windows Devices.

On the other hand, XAMPP is the best among all because of the support staff and community.

You can use any software according to your preferences. In this guide, we have shown the complete process.

Install Localhost For using XAMPP

 

Step 1  – Download XAMPP

go to XAMPP’s official website. Select your operating system and download the file.

There are different versions available, Choose the right option for your requirements.

after downloading the appropriate file according to your requirements, Wait for some minutes. The download size will be around 157 MB.

 

Step 2- Install & Run the XAMPP on Your PC

After the download completes, You will have a zip file in your downloads.

Unzip the folder.

Run the .exe file.

The installer will be started after some seconds.

Click on the next button in the installer. there will be packages available to choose from.

For WordPress, MySQL Database and PHPmyadmin will be required.

After some minutes, All the packages will start downloading.

Windows will ask for administrator permission to run this software,

Accept the request as shown.

The software will work on English (USA) as the default language. You can change languages if required.

XAMPP is installed, Now we need to install WordPress.

 

Step 3- Install WordPress

Visit the WordPress official website, click on the Get WordPress button from the top right side. 

Get the latest version of WordPress.

The zip file of WordPress will be downloaded.

Unzip the folder and follow the next step.

 

Step 4- Create a Database

First open the C Drive > xampp > htdocs

Paste the unzipped WordPress folder inside the htdocs folder.

Suppose your unzipped WordPress folder is having a name as ‘WordPress’.

then paste the WordPress folder inside the htdocs.

the locations should be like

C:\xampp\htdocs\WordPress

all the WordPress files should be inside the WordPress folder.

 

Now we have to decide on a name for the database.

We will decide name as “mytest”.

Now rename the folder inside the htdocs from “WordPress” to “mytest”.

Note: We have shown the detailed process so that you don’t get confused about folder locations.

Now location will be: C:\xampp\htdocs\mytest

Now we have to run the XAMPP to create the data tables and install WordPress.

Run the XAMPP software now and it should look like this.

In XAMPP, run Apache and MySQL.

after activating them both,

Go to your browser and search for localhost in your URL.

Not in the search bar, In your browsers URls

You will find your XAMPP homepage there.

Click on the Phpmyadmin panel.

After that, you will be redirected to your PHPMyAdmin. created in your computer device.

On the main menu bar, there will be the first option named Database.

Choose database.

In databases. you will find the create database section.

Type in the name of the database that you have decided on.

As we decided “mytest”.

Do not change the collations.

click on create after checking the proper name.

Now the database is created.

 

Step 5- Install WordPress in Localhost

open a new tab in the browser and search for the database name with localhost.

search for localhost/mytest.

You will be redirected to the WordPress installation page.

after that, you have to follow the basic steps that WordPress requires.

  1. Select Language

Click on let’s go on the information notification.

give database name as decided “mytest”.

username as “root”. (Do not change this)

password as “admin” (if you want to)

Host as localhost

Do not change the database prefix. it should be wp_. Database prefix is used to indicate whether it is going to be a single site or multisite.

Click on submit.

On the next screen, WordPress will ask you to provide your website information, choose a username and password, and enter an email address. Go ahead and fill in the form and then click on Install WordPress button.

WordPress will be installed on your computer Now.

to access the dashboard, Search for admin location in your browser.

Location: localhost/mytest/wp-admin

login with username and password to access the dashboard.

You can start the guide from the menu bar on the left side, From Introduction to End.

or You can follow the below next-previous links.