How to install WordPress in localhost

Ankit Kumar
6 min readNov 2, 2021

--

WordPress has been driving over one-third of all web pages as one of the most popular online systems. Each day, loads of new residents arrive. If you’re one of them, we’d like to welcome you with this five-step instruction on “How to Install WordPress on Localhost.”

How to install WordPress on localhost
Photo by Souvik Banerjee on Unsplash

Anyone who wants to try their hand at building a website will be enticed by its simplicity. WordPress is used by millions of individuals around the world for their web pages. This accounts for 30% of all active websites at the time of writing. It’s nearly impossible to do so without first installing WordPress on your home computer. With all that in view, we’ll show you how to install WordPress on localhost in this article.

How to Install WordPress locally on Your Computer?

It takes time to create a modern WordPress site from the ground up. So, I merely go to the main XAMPP page. Click the download icon after selecting your computer system. If you used the straight method, you’d have to spend hours on the internet to have your site up and running.

On a live site, you can’t afford to make major changes, such as changing the theme. This could cause your website to crash, and your website’s reliability and the image will suffer as a result. The better method is to test offline first, then go live after extensive testing.

Additionally, WordPress may be installed locally to allow you to rapidly test themes and plugins. And you may do so without causing any problems with your current website. Later you might need to move WordPress from localhost to server. And for that, we’ve got you covered too!

Read here: How to move localhost WordPress from localhost to server?

Step 1. Download XAMPP

  • Merely go to the main XAMPP page. Click the download icon after selecting your computer system. There are several versions available for various operating systems. Select the best option for your gadget.
  • Wait a few seconds after hitting the download icon. Because the file is somewhere around 150 MB in size, it will take some time to acquire.
Download xampp
  • Install and run XAMPP on your computer. The following is the second option. You must unzip the program after it has been downloaded. Simply choose the Install button or double-click it when the program is complete. You’ll soon see that the installation procedure has started.
setup xampp
  • You can select which parts to install on the next page. You don’t need all of the components to set up XAMPP with WordPress. All you need, are MySQL and phpMyAdmin, as indicated in the figure below.
  • You can now choose which folder XAMPP will be installed in, or you can keep it as is.
  • A prompt will appear on the following page, inviting you to install Bitnami for XAMPP. This isn’t required for installing XAMPP and WordPress, so uncheck the box, then run the install.

Step 2: Start the modules and put your server to the test

  • You’ll need to run two modules to correctly install XAMPP and WordPress i.e Apache and MySQl. When you launch them, their status should change to green.
  • If everything went smoothly, you should now have a working XAMPP server on your Windows PC! However, now is the time to set up XAMPP and WordPress. So, here’s how to set up a WordPress site with XAMPP.

Step 3: Put the WordPress files in place

  • The procedure should be similar if you’ve ever manually installed WordPress. To begin, go to wordpress.org and download the most up-to-date edition of WordPress. Then, in Windows, go to the location where XAMPP was installed. That’s C:/xampp for most. It is something close. Then look for the htdocs subdirectory in that folder.
  • Inside htdocs, paste the WordPress folder you downloaded previously. Create a new folder for your test site in htdocs. This directory title will be used to reach your website as a sub-name. If you create the directory testsite, for example, you can view your site via http://localhost/testsite.
  • For your WordPress site, you’ll now need to build a database. To access https://localhost/phpmyadmin/, open up a new web browser and type in https://localhost/phpmyadmin/. This will open the phpMyAdmin app.
  • You’ll need to click on Databases and give your new database a name. Then, to proceed, click on the ‘Create’ button.
  • Replace testsite with your own folder name in htdocs if you renamed the folder something else. This will launch the WordPress installation wizard, prompting you to choose a language. Click the ‘Continue’ button after selecting a language.
  • On the next page, click the “Let’s go!” button.
  • Return to the WordPress localhost website now that we’ve set up our WordPress database. Provide your database name, the user name can be ‘root,’ and the password choice can be left blank — better it’s and you’ll find other forms filled in from previously.
  • WordPress will ask you for details about your website in the next phase. To begin, type the title you want to use for this website. After that, you must create an admin account with a username, password, and email address.
  • Verify the search engine visibility button attentively. Alternatively, Google will begin to index your local site as well! Finally, click the “Install WordPress” option to install it.
  • You will have completed the installation of WordPress on your machine. Now is the time to log into your WordPress site.

You can view your local WordPress site by visiting localhost/testsite, and WordPress admin by navigating to localhost/testsite/wp-admin, utilising our example folder name.

Conclusion

If you’ve followed all of the procedures above, there’s no way you’ll run into any problems while installing WordPress on localhost. Now you can do whatever you want on your PC with your WordPress site. So that was the entire process of setting up a personal testing site on localhost. Depending on your ability, the process will take 15 to 20 minutes. On a regular basis, we produce such important tutorials.

--

--