In this tutorial we will learn how we can install WordPress on Localhost using XAMPP server step by step.
There will be total 5 steps.
At first we will install XAMPP server & then will install WordPress.
Before starting let’s learn some benefits why we need to install WordPress on localhost using XAMPP server.
Why We Should Install WordPress on Localhost using XAMPP Server?
- For practicing WordPress, localhost is the best place to start
- As a beginner we don’t need to buy any domain, hosting. So we can start using localhost
- It takes more time to develop site on live server rather than localhost, because every time we need to upload files to live server after changes done. We can work on live server directly but that’s not good practice
- So when you work for some real projects for clients, then it’s better to work in localhost first & after all done need to upload it on live server
- Only you can see the site on localhost
- XAMPP is compatible for Windows, Linux & Mac
How to Install WordPress on Localhost XAMPP Step by Step [Total Steps: 5]
We have created total 5 steps to install WordPress & XAMPP.
Let’s we start our steps.
Step 1: Download XAMPP
Go to XAMPP website download it based on your computer operating system.
To show you the process we are using XAMPP for Windows.
After clicking link, it will download automatically & if not then click on “click here” link as showing below screenshot.
Wait some time to download it completely.
Step 2: Install & Run XAMPP on Your PC
After completely downloaded file, you can cut that file & save it in a place in your computer so that you can use it later if needed rather downloading it again 🙂
Now double click on that installation file & it will start the installation process.
Click on Next button & you will see Select Components screen with all options selected.
But we will keep selected Apache, MySQL, PHP, phpMyAdmin only & other options will deselect.
After clicking Next button Installation Folder screen will appear.
By default it will show folder location C:\xampp.
Our suggestion will be not to install in C drive because if you need to setup your PC then all the files & folders will be gone from C drive. So you can select any other drive except C drive.
So we will select E:\wampp for our installation.
After clicking Next button Language Selection screen will appear.
So you can select your preferred language from English & Deutsch.
We will select English & click Next button.
Then you will get Bitnami for XAMPP screen & click Next.
Ready to Install screen will appear. After clicking Next button installation will start.
After installation done you will get Completing the XAMPP Setup Wizard screen.
Click Finish button & XAMPP Control Panel screen will appear.
From this screen select Start for Apache.
You may get windows security alert for firewall.
Click Allow access & then click Start for MySQL from XAMPP Control Panel screen.
You may get another windows security alert for firewall & click Allow access for that as well.
Now you will see green sign for both Apache & MySQL, that means both are running.
So XAMPP is ready for our work.
If you see any other color like yellow then Quit XAMPP first.
Then start it again from programs & start Apache & MySQL from XAMPP Control Panel screen.
Hope you will get green sign for both Apache & MySQL.
If you have Skype running already then there can be a conflict within Skype & XAMPP. Conflict is caused by both Apache and Skype using the same port 80. To fix this problem you can Quit both Skype & XAMPP. Then at first run XAMPP & then Skype. Problem should be fixed, if not then you can check Tools » Options for Skype if any options there.
Hope you now successfully installed & started XAMPP on your computer.
Now type localhost in your browser & it should redirect to http://localhost/dashboard/ & below page will appear.
This means everything is working properly.
Now we will do one thing.
We don’t want that redirect from localhost to dashboard.
We want, for localhost it will show list of files & folders, so that we can choose our required files or folders from there.
To remove that redirection let’s check htdocs folder from E:\xampp & you will find index.php file.
Let’s rename that file something like index1.php or anything else you prefer.
Now if you go to localhost from browser then you will see a list of files & folders.
So we are all set now, XAMPP is installed & working properly.
Congratulations for successfully installing & running XAMPP 🙂
Step 3: Create a Database in XAMP
So in this step we will create database & that will be needed for installing WordPress.
From your browser go to localhost/phpmyadmin & you will get phpMyAdmin screen.
If you see any login screen after entering http://localhost/phpmyadmin then Username will be root & Password will be blank (without any password). Then click Go. If no login screen then that’s ok as well.
From phpMyAdmin screen click on Databases from top.
Under Create database type Database name for example wp_test & then click Create.
Normally we will create database name based on project name. So will be easy to find it if needed.
wp_test should be listed in left side of the screen.
So we have created our database successfully.
Step 4: Download WordPress
Go to WordPress.org website & click Get WordPress from top right.
Then you will get wordpress.org/download page & from there download WordPress & that’s the latest version.
It will be zip file. Now cut or copy that zip file to E:\xampp\htdocs folder.
Then unzip or extract here. Now all files under wordpress folder.
We can rename this folder based on our project name. As this is our test project & database name we have created wp_test so let’s rename folder name as same name wp_test.
Now all files ready to install & database created.
In next step we will install WordPress.
Step 5: Install WordPress on Localhost XAMPP
Let’s go to http://localhost from browser & you will see wp_test folder is listed there.
Click on it & WordPress installation process will start.
English language is selected by default. Click Continue button.
You will get below screen:
In screen showing we need below information:
- Database name
- Database username
- Database password
- Database host
- Table prefix
& no worries we have all these information.
Just click on Let’s go! button.
From this page let’s change fields values like this:
- Database name will be wp_test
- Database username will be root (it’s default for localhost)
- Database password will be blank (without any password & that’s by default value)
- Database host will be as it is now localhost
- Table prefix can keep as it’s now wp_
Now click Submit button.
From this page click Run the installation button to move next.
We can set information like this:
- Site Title can be WP Test
- Username can keep as admin
- Password we need to use strong always when will work with clients real project but here we can use admin123
- For Confirm Password tick this checkbox Confirm use of weak password (when strong password will be used then this checkbox will disappear)
- For Your Email you can use your email address. Here we are using firstname.lastname@example.org
- For Search Engine Visibility tick this checkbox Discourage search engines from indexing this site (we don’t want Google to index this test site, also as it’s localhost Google will not index as well & when site will be fully ready we will uncheck this later from WordPress admin panel)
After all set then click on Install WordPress.
Yes! We have installed WordPress successfully.
Now let’s check how WordPress dashboard or backend or admin panel look like.
Click on Log In & login screen will appear.
Do you remember Username & Password?
Yeah it’s admin & admin123 & after clicking Log In we will get WordPress admin panel.
So finally we have landed to our newly installed WordPress admin panel 🙂
Do you want to visit WordPress frontend?
From top left mouse hover on WP Test & it will show Visit Site as dropdown.
Click on it or you can directly go to http://localhost/wp_test/ from browser.
So this is our first installed WordPress site.
We will learn more about WordPress in out next tutorial WordPress Dashboard Tutorial