How to Install WordPress on Localhost (Laragon & XAMPP)

Are you searching for a way to install WordPress on Localhost? Well, it’s a very easy process. With a local host site, you will be able to test your themes, plugins, and codes as much as you want. There are multiple softwares available to do this. You can use XAMPP, WAMP, MAMP, LARAGON, etc. 

You can install WordPress on localhost by using different development environment software. Among those, Xampp is the most popular. But if you don’t want any hassle in extracting or setting up the database, then Laragon is the best choice. Laragon helps you to create a local WordPress website with a single click and there is no hassle. 

But there’s a drawback: Laragon isn’t available for macOS, it is available for Windows only. After going through the post, you will be able to install WordPress on localhost by yourself. 

Let’s start, then. 

Supercharge Your WordPress Block Editor!

Method 1: Installing WordPress on Localhost Using Laragon (Windows)

First, download Laragon and install it on your computer using the default settings. After the installation is complete, run the program. Click on the “Start All” button. 

Now services will be started, and port no will be shown on the screen. Navigate to Menu -> Quick app and select WordPress. 

Give a sweet title and click ok. WordPress will be downloaded for the first time, and it will take a couple of seconds. Later on, your site will be created instantly after you give it a title. When your site is ready, you will see the “Visit site” button is visible. Click on it. 

Now provide the site name, username, and password, and then hit the “Install WordPress” button. 

Now WordPress will be installed, and you will be asked to log in to your local WordPress website with the password and username you just provided before hitting the “Install WordPress” button. 

And your site is ready. 

Later on, you will be able to visit your site with its name and by including “.test” with it. For example, my site name is “Tableberg”, therefore, I will be able to visit this site with the URL “tablegerg.test”. 

If you forget the URL, then navigate to the Laragon menu -> WWW. Here, you will find all the local websites you have created. Just click on it, and it will launch. 

Method 2: Installing WordPress on Localhost using XAMPP (Windows & Mac)

This method is recommended for mac users and windows users who don’t like laragon.

Step 1: Download & Install XAMPP

First, download XAMPP software from the Apache Friends. For Windows, select ‘XAMPP for Windows,’ and for MacOSX, choose ‘XAMPP for OS X.’  It might take a few minutes to complete the download. 

Once the download is complete, launch the installer. If you are running any antivirus software, then you might get a warning. In that case, just click on the Yes button and continue the installation. Depending on your Windows configuration, you may also get a UAC prompt; just click the ok button. 

Afterward, click the Next button to continue the installation. Choose your components and finish the installation. 

Step 2: Create Database

Once the installation is completed, run the XAMPP control panel and click on the Start button for both Apache and MySQL. 

Once you launch them, your local host will be ready. Now download the WordPress.zip from the official WordPress directory. Navigate to the XAMPP installation folder and find htdocs in the subfolder. For me, it’s D://xampp. 

In htdocs, create a new folder and make a folder with your desired local site name. For example, if you make a folder named mysite, you will have to access your site by navigating to https://localhost/mysite.

Once you have created the folder, extract WordPress.zip in this folder. 

Now it’s time to create a MySQL database. Launch your control panel and click on the MySQL Admin button. 

Or you can browse localhost/phpmyadmin/ directly.

Next, click on the databases. 

Provide the database name and click on the Create button.

Step 3: Install WordPress

Now navigate to your test site. 

https://localhost/FOLDERNAME

On the next page, hit the ‘Let’s go’ button. Then you will have to provide the database name, username, and password. Provide the database name that you created earlier, Username = ‘root,’ and keep the password field blank. 

 Then, continue the installation. Before finishing, it will ask for the site title, username, password, and email. Provide this information and go ahead. 

Now, your WordPress installation is complete. You can navigate to your WordPress via localhost. 

Last but not least, we’d like to recommend DevKinsta, a free local WordPress development tool. It’s a product by Kinsta, but you do not need to be a client to use it. 

It is a useful tool that allows you to create unlimited sites (multisites included), test and develop themes and plugins or custom sites. Sites are configured for Nginx, PHP 7.2 – 8.2, and MySQL. You’ll get access to a built-in database manager, HTTPS support, SMTP server and email inbox, and WordPress error logging.


The tool is available for macOS, Windows, and Ubuntu in 10 languages.

Conclusion

You are all done. I hope now you will be able to install WordPress on a local platform all by yourself. Feel free to ask questions; I will be happy to reply to those. If you liked the post, please share it with your friends, and don’t forget to tell your thoughts. 

Changelog
  • Updated on 2024-10-07 (Uzzal Raz Bongshi)
    • Updated Intro.
    • Updated both methods.
    • Updated Images.

Leave a Reply

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