How to install WordPress on Windows using XAMPP – WordPress Local setup in 2021
Want to set up XAMPP with WordPress on your computer or install WordPress locally? This is a perfect option if you need a development site for testing or other purposes.
Why use XAMPP?
XAMPP allows you to host a website on your computer. After you’ve set it up, you can create a new WordPress installation with a few clicks. However, installing XAMPP with WordPress might be difficult, so that you may want assistance.
Getting started with XAMPP and WordPress
The first thing you must do is download WordPress from the WordPress.org website. As seen in the image below, open the URL, scroll down the page, and click the download WordPress button.
Installing XAMPP
Moving further, you’ll need to use XAMPP to install WordPress on localhost. XAMPP is available for download from the Apachefriends.org website. When the configuration is complete, click the Next button.
Now, look at the image below; some components must be checked before they may be installed. We simply need Apache, MySQL, and PHP to set up WordPress. You may either uncheck everything except Apache, MySQL, and PHP or leave them checked.
Starting Apache using XAMPP
We’ll start apache by pressing the start button, and it should become green. It will also display ports 80 and 443, the default ports used by Apache. After that, MySQL may be started; the default port is 3306.
The Apache server is now up and running, including PHP and the MySQL database server. Now that the local host is up and running, we can install WordPress.
Creating the WordPress Database
Next, you need to create a MySQL database. To do that, launch PHPMyAdmin from your XAMPP control panel.
Then click on Databases at the top.
Click Create after giving your database a name. It doesn’t matter what your chosen database name is; just remember it since you’ll need it for the following stage.
When you install XAMPP with WordPress, you don’t need to create a new database user. You can use the default user, If you are installing WordPress on a live web server though, you should create a custom user for WordPress.
Now we’ve got our WordPress database set up to start the installation process.
Installing WordPress
First, go to Windows Explorer and look for the XAMPP install location. Inside of the XAMPP install location will be a folder called htdocs. Delete all of the files inside of htdocs. These files were the demo website that comes with XAMPP.
Go to your Downloads > WordPress folder (the extracted WordPress zip file should be located here) > and copy the components of the WordPress folder to htdocs.
Now, when we go to the localhost, you will get this page which is the WordPress setup page.
Now, enter the database name, username, password, and hostname. Then click on submit button. Click on Run the installation.
You will enter your new website details here. Site title, username, password, and correct email, click on install WordPress. WordPress will install in a minute. After that, click on the login button and type in your login details.
After clicking on login, it will take you to the WordPress dashboard, and you’re ready to edit the site!