How to Install WordPress on Localhost Xampp? Step-by-Step

You are currently viewing How to Install WordPress on Localhost Xampp? Step-by-Step
  • Post author:
  • Post published:August 28, 2021
  • Post category:WordPress
  • Reading time:13 mins read

If you are a beginner and want to learn WordPress. In that case, you can start learning WordPress by installing it on your localhost or local computer. If you do so you can save your money that you were going to spend for purchasing a server to set up WordPress.

It is always a good practice, first, you install WordPress on localhost. You learn it, then make your website live on the internet.

So in this article, I am going to teach you how to install WordPress on localhost? I will be using Xampp as a local server to set up a WordPress site on my local computer. Keep reading.

Note, this article will be focusing on setting up WordPress site on localhost on windows PC.

What is Xampp? your local server

WordPress is developed using PHP and PHP is a server-side scripting language. That means you can’t run PHP like an HTML file directly inside the browser. In order to run the PHP files, you need a server.

It is the same with WordPress also, you need a server and database to, to run WordPress. The server can be anywhere, it may be live or local.

wordpress on localhost

So, to run WordPress inside our local computer. We need our computer to behave as a server. In order to make our computer a server, we install a local server inside our computer.

Xampp is a local server inside the computer. We can use Xampp to develop server-based applications and for database purposes. You can download Xampp from its official website

Instead of Xampp, there are also other local servers available such as wamp, instant WordPress, desktop server, etc. But in this article, I am going to use Xampp as a local server to set up a WordPress site..

Why Xampp?

Because Xampp is a local server that plays a significant role when it comes to web development. When working on localhost, It is the first choice of web developers that makes it so popular.

How To Install WordPress on localhost xampp?

After downloading and installing Xampp, now it’s time to set up WordPress inside localhost. If you haven’t downloaded WordPress yet, you can download it here.

First step, open the drive in which you have installed Xampp. By default Xampp is installed inside the “C” drive until you change it.

After opening the drive you can see Xampp has created a folder inside the drive with name “xampp“.

how to install wordpress on xampp

Open the Xampp folder.

Second Step, now inside the Xampp folder find out the “htdocs” folder.

setup wordpress on localhost

Open htdocs folder.

Now inside the htdocs folder, you will be seeing some folders and files and probably wondering what they are? Well, these are the files and folders which was created during Xampp installation.

install wordpress on xampp

You can delete all the files and folder if you wish to empty your htdocs folder.

htdocs folder is the root directory of your local server. When you will try to fetch your site using the browser, the browser will first look inside htdocs folder and will try to find an index page if there any it will serve you that page.

Third step, now, paste all the WordPress files and folders inside htdocs folder which you have downloaded from wordpress.org. If your WordPress files are still in the .zip format, unzip it and paste all the files in htdocs folder.

Keep In Mind, you can put all of your WordPress files and folder directly inside htdocs folder. Or if you wish to run multiple sites, you can create separate folders inside htdocs folder.

Runing The Xampp Local Server inside Computer

After putting your WordPress inside the htdocs folder, it’s time to start the server to configure WordPress.

Fourth Step, as you have installed the Xampp inside your computer, you can see “Xampp Control Panel” in your applications. If you don’t see search it on your computer.

wordpress on localhost

Tap to open it.

As you will start Xampp control panel, you can see things like that.

WordPress on Localhost

Fifth Step, now from the Xampp control panel you need to start apache and MySQL that you can see at the top. in order to access your WordPress site.

As you will start Apache and MYSQL, if everything will be all right you will see things like that in the control panel.

How to run xampp server

You will be able to see the running status and PID and Port number for both apache, and MYSQL.

Configuring WordPress Settings

After running the Xampp server now it’s time to configure WordPress, it’s your final step and you are ready to go.

Sixth Step, open your browser and type “localhost” in the search bar. This will redirect you to the htdocs folder of Xampp and it will show you the index page inside the folder. If there is no index page, it will show you all the directories and folders available inside the htdocs folder.

However, If you put your WordPress site inside a separate folder then, you may try typing localhost/foldername. to enter the wordPress setup configuration page.

Seventh Step, now choose your language from the setup-config.php page and click on continue button.

Eighth Step, now it’s time to configure your database settings.

WordPress setup

Now at this step you will need Database name, Database username, Database password. and Database host to establish a connection between MYSQL database and WordPress.

You can always created a new entries from phpmyadmin to fill them up on the next configuration step.

Note, after starting your Xampp server you can access your MYSQL database by typing localhost/phpmyadmin inside your browser or click the admin button for MYSQL from Xampp control panel.

Now click on let’s go button.

Now at the next step you will need

  • Database Name
  • Username
  • Password
  • Database Host

Remember you can always create those credentials from the Xampp server.

wp config

Now enter all the details (db name, username, password, host(localhost), table prefix(leave it as it is) and click on submit button.

If you will enter all correct info of database, WordPress will redirect you to run the installation page, otherwise you will face errors. If you face issues that simply means you need to reconfigure your DB settings from the xampp.

install wp

Now hit the run the installation button.

wordpress on localhost -Installation

Now at this step, you need to configure the basic settings such as site Title, WordPress-Username, Wp login password, admin email. see the screenshot below.

how to install wp on xampp

Note, If you are using the weak password such as admin@123, or test@123,check the confirm using weak password checkbox. Other wise wordPress will never allow you to use weak password. It is not recommended to use weak password, it is always best practice to use strong password.

After filling all the necessary details, hit the install WordPress button. hooray you are ready to rock…!

After a few moment installation process will be end up, now you can login to your WordPress site using “localhost/wp-admin” (to login type this url in the browser)

wp on xampp

Now after redirecting the localhost/wp-admin or localhost/login, enter your username and password and hit on login. Hooray now you are at the wp-admin-dashboard where you can make changes to your site, write blog posts, and create landing pages and so on.

Related Articles