How to create localhost wordpress website using XAMPP | Install XAMPP wordpress locally

Do you want to create a localhost wordpress website using XAMPP? If you are a beginner who wants to learn wordpress or wants to create your own website in wordpress then you must need a hosting. However, it costly and difficult to maintain a hosting as a beginner.

Sometimes we cannot buy hosting only for learning wordpress. If you are facing these kinds of problems then this article will help you to solve your problems. In this article, you will learn how to install wordpress locally and How to create localhost wordpress website using XAMPP.

We have already discussed why wordpress is best for any types of website like business or blog, so it is time to get started with wordpress.

So without much further ado, let’s start the step by step process to create a localhost wordpress website using XAMPP or install wordpress locally on your computer.


Why you should create localhost wordpress website using XAMPP?

Localhost wordpress website means you can create and run your website on your own computer. You don’t need any domain name and hosting for that. We have already have discussed some points why you may need localhost wordpress website.

Creating a localhost wordpress website is a common practice among website owners and developers. Because it allows you to test wordpress without creating a real website on the internet spending your money.

You can install all types of wordpress themes and plugins in this localhost wordpress. This will help you to test their features and learn wordpress as a beginner.

No matter you want to a wordpress developer or run your own website. You should know how to use localhost wordpress website using XAMMP. We will know about XAMMP in later part what is it and why should you choose this one.

You can easily learn the wordpress basics to become a developer. Because the local website is only visible on your computer. You can learn wordpress theme customization and plugins free. You don’t need any money for managing a localhost wordpress website using XAMPP.

However, let’s check out what actually XAMMP is that we are going to use to create a local environment on your computer.


What is XAMPP?

According to Wikipedia, XAMPP is a free and open-source cross-platform web server solution stack package developed by Apache Friends,[2] consisting mainly of the Apache HTTP Server, MariaDB database, and interpreters for scripts written in the PHP and Perl programming languages.

The full form of XAMPP is X stands for Cross-platform, (A) Apache server, (M)MariaDB, (P)PHP and (P)Perl. The Cross-platform usually means that it can work on any computer with any operating system like Windows, Mac, and Linux.

You can not install and run wordpress without a web server because wordpress is powered by PHP. That is why; XAMPP is the best, lightweight and simple software that you can install on your computer. It allows you to create a localhost wordpress website without buying an actual hosting.


Installing XAMPP for localhost wordpress website

We have discussed why you should use localhost wordpress website using XAMPP and what is XAMPP? Now, it is time to install this XAMPP on our computer. You can do this with me.

download xampp for localhost wordpress

Therefore, you have to download XAMPP first. You can do this by clicking the link below. This like will take you to the official website of XAMPP. You will see download buttons for Windows, Linux and OS X.

Download XAMPP 

You have to download it according to the operating system that you are using. Click the download button then it will start downloading. File size is around 123MB. Therefore, it may take some time according to your internet speed.

After downloading the file, you have to go to the folder where you have downloaded that. In that folder, you will see a file “xampp-win32-7.2.8-0-VC15-installer.exe”. Click on this file then it will show you a warning. Don’t worry, it will not harm your computer. So press OK.

start instaling xampp

It will bring you to XAMPP Setup Wizard. To start the installation process press the “Next” button. Now you can select the necessary components here. You don’t have to do anything leave them as it is by default. Moreover, click “Next”.

basic setup of xampp for localhost wordpress


Now you can select a folder where you want to install XAMPP on your computer. However, I will suggest you take the default one. It will create a folder in your C: drive “xampp”. You will store all the information in that folder.

select folder to install xampp for localhost wordpress


If you really want to change the path then you can do that. Otherwise, stay with the default one and click “Next”. You have to click Next few more times then it will start installing. After completing this process, click the “Finish” button to close installation.

xampp control panel


After that, the XAMPP Control Panel will show up. Now start Apache and MySQL modules by clicking the “Start” button beside them.

Note: You have to start Apache and MySQL every time when you will work with this wordpress. Otherwise, you will not get access to the wordpress account.


If this control panel does not show up then you can find it by searching it in your windows search bar at the bottom. Just type “XAMPP Control Panel” then it will come up.

Congratulations, you have successfully installed XAMPP on your computer. Now go to your C: drive and you will see a folder “xampp”. If it appears in your computer then everything is ok.

Now I will show you how you can install wordpress and create localhost wordpress website using XAMPP.


Creating your localhost wordpress website using XAMPP

First, you have to install wordpress in your localhost. For that, you need a wordpress file. You can download the wordpress file by clicking the link below. Go to the website and click on the Download button it will start downloading.

Download WordPress


download wordpress

Now, copy the downloaded zip file and go to your C: drive. You will see a folder called xampp, go inside that folder. Inside this folder, you will find another one named “htdocs”.

Note: you also can open XAMPP Control Panel for this folder. You will find a file “xampp-control.exe” double-click on that file. Control Panel will appear.


xampp htdocs file

Go inside this htdocs folder. This is the place where you have to paste the copied zip file. After pasting the file, you have to extract that. You will find a folder named wordpress. Now you can delete the zip file.

Now you can change the name according to your website. You can give any name you want. In my case, I am giving “localhostWordpress” for my account.

set wordpress file in xampp


Create Database in phpMyAdmin

Now, you have to create a database for your localhost wordpress website. It is very easy to create. It will take two minutes. Open your browser, type “http://localhost/phpmyadmin/”, and click on the “Databases” tab.

create database in xampp

You can give any name to your database. It is better to give a relevant name according to your website. I am giving “local_wordpress” as my database name and click “Create” button.

Your database is ready to use in wordpress. You can also create your own custom username for your localhost wordpress website. I will show you how you can do this is the later part or you can use the default username.


Setup Localhost WordPress Website

Now go to your web browser and type, “localhost/your folder name”. The folder name is the name that you have given inside the “htdocs” folder. I gave “localhostWordpress” so I will type “localhost/localhostWordpress”. You will type according to your name.

You will be asked to choose language that you want to use in wordpress. Select your language then you will see a welcome page. You have to click “Let’s go!” button.

start wordpress installation in xampp

In this page, you have to fill up a form. Here it will ask for your database name that we have created earlier. My database name was “local_wordpress”. You will give your database name.

In the username box, we are going to use the default username “root”. If you want to use your custom username and password then at the bottom of this article. I have shown how you can create your custom username for your localhost wordpress website.

In default username, there is no password. Therefore, you don’t need to give any password in the password box. In addition, leave Database Host and Table Prefix boxes as it is by default. After completing all this, click the “Submit” button.

connect database with wrodpress

Now, you have to fill up another form. Here you have to give Site Title, Username, Password and Email. You can give any site name for your website.

This username and password are used to login your wordpress website. So choose your username and password carefully. And don’t forget to save those because you will need those later to log in.

Then give your email in the email box. At last, you should not check Search Engine Visibility. Finally, click on “Install WordPress” button.

install wordpress locally

It will install wordpress then you will get a success message. Congratulations, you have installed wordpress. Therefore, you can log in to your wordpress account.

To login to your account, click on “Log In” button. It will take you to another page with the login form.

localhost wordpress install success

After going to the login page, put your username and password that you have saved earlier. Now click on Log In. If your username and password are correct then you will be redirected to your wordpress dashboard.

You can find this login page by typing “http://localhost/localhostWordpress/wp-admin” in your browser. Here I am giving localhostWordpress in the URL because this is my folder name in the htdocs folder. You have to give your folder name instead of localhostWordpress. This will bring your login form.

Finally, I want to congratulate you. You have successfully completed setup localhost wordpress website using XAMPP. Now you can create your website on your computer. There is no hosting is necessary.

As I have said, I will show you how you can create a custom username and password for your website.

17 login localhost wordpress website.jpg


Create Custom Username for Database

If you want to create your custom user for your website, you can do this very easily. You can do that for your localhost wordpress website using XAMPP and phpMyAdmin. First, start Apache and MySQL Module from XAMPP control panel.

Then open your browser and type “localhost/phpmyadmin” in your search bar. It will take you phpMyAdmin website. We already have created a database for our website.

You will find that database in the sidebar. So select that database then you will see the “Privileges” tab. Click on that tab.

add user account in phpmyadmin

At the very bottom of that tab, you will find a link “Add user account”. Click on that link, it will redirect you to another page. You will create your own user from that page.

In this page, there is form where you will give user information. First, the username you can give any username. I am giving as Test_user. Now select your host name. As we are creating our localhost wordpress so select Local as Host name.

19 fill up user form in phpmyadmin.jpg

Now put your Password in the password field. You also have to Re-type the same password again.

You can also Generate password for your user by clicking Generate button. It will show you a strong password. Copy that and paste in password fields.

set privileges for users

Now go at the bottom. There is a section for “Global privileges”. You can select all privileges by clicking “Check all” that your user will get in your website. On the other hand, you can select manually if you want.

After setting the privileges, go at the very bottom of this page where you will find a button “Go”. Don’t forget to check all information again before clicking that button. After all this, click the Go button.

This is how you can create your custom user for localhost wordpress website using XAMPP and phpMyAdmin.



Once you learn how to install XAMPP and WordPress in localhost, you can start testing website whenever you need. You can use this to learn wordpress for working as a freelancer without buying any hosting.

If you want to create your custom website, then first create localhost wordpress website using XAMPP and test your theme and plugins. This will help you to know how to work in wordpress with those plugins.

How did you like this article? Did I miss any steps to create localhost wordpress website using XAMPP? So if you need any assistance with XAMPP and WordPress, leave a comment below and I will try to help out!! I will look forward to your opinion in the comments section below.

If you liked this post, then you can subscribe to our newsletter. I always provide the latest update about my new contents that may help you. Please share this post with your friend if it is helpful for you. So that they can also learn how to create localhost wordpress website using XAMPP.


You may also like:

Why wordpress is best for any website and blog

⇒ How to Submit Sitemap to Google Search Console Today

⇒ 27+ Best Free WordPress Themes [For All Websites]

⇒ 21 best wordpress plugins – Must use to customize your website


I am Robin. Founder of "WorldTechis" community. It is the Largest online learning platform, here you can learn Web development, programming and advance Wordpress tips and tricks. As a professional developer, here I provide all necessary tips related to Programming & Wordpress. Like my Facebook page WorldTechis for the latest update or contact me - [email protected]

Leave a Reply

Your email address will not be published. Required fields are marked *