A local WordPress installation is actually a replica of the live WordPress site set up on our computer. This installation is not available to the outside world as in the case of a live website. It is only available to us on the machine where we set this up. This installation is quite useful in a number of ways. We do not need to test our themes, plugins or code changes directly on the live server or staging site if we have a local installation.
We have already discussed how to set up WordPress locally on a windows computer using Desktop Server and Instant WP. In this blog, I will cover the process to install a WordPress site locally on a windows computer using XAMPP. I have split the entire installation process to 17 simple steps which altogether takes less than 15 minutes to complete.
Step1: Go to XAMPP website and download XAMPP for windows.
Step2: Now click the downloaded file and the XAMPP installer will start as shown below.
Step3: Select the components we want to install and click Next.
Step4: Choose a path to install XAMPP. It is always better to use a direct folder (eg: C:\xampp) rather than a subfolder. After choosing the folder, click Next button. Uncheck the link “Learn more about Bitnami for XAMPP”
Step5: Click the Next button and finish the installation.
Step6: Once the installation is complete click the Finish button after selecting the checkbox option to start the control panel.
Note: During the installation process, we might come across a screen as shown below.
Our windows operating system has a security measure to block the connection between our server (the one we are using for our local installation) and the internet. We have to allow access for this communication by selecting both private and public networks. If we give access only to private networks then our installation may not work when we are connected to a public network. It is always better to choose both network types and give access.
Step7: Once we click the finish button in step 6 a new screen will appear.
Select the required language and click the Save button.
Step8: Now the control panel will open up as shown below
From the control panel, we have to select Apache and MySql service and click Start button. If these services start correctly we will see a green color on top of the module name. Now we have successfully installed XAMPP on our computer.
Let us now create a database for installing WordPress.
Step9: Click on the Admin button under MySql module in the control panel. A new browser window will open phpMyAdmin which is basically the database tool. In the phpMyAdmin, we have to click the New link on the left top corner as highlighted below and an option to create a new database appears. We have to provide a name for this database and click Create. In our case this name is blogtriangletest. Note down this name as we need it during setting up our WordPress blog.
Step10: Now go to the WordPress website and download the installation file.
After extraction, we will have a wordpress folder The contents of this folder would be like as shown below. Now copy this entire wordpress folder.
Step11: Now go to the XAMPP installation folder which in our case is C:\xampp.This folder will have an htdocs subfolder. Paste the wordPress folder that we have copied before to this htdocs folder. After copying, rename this wordpress folder to a suitable name to identify our site. In our case, I have renamed it to blogtriangle
Step12: Now go to any browser and type http://localhost/blogtriangle.The name after localhost should be the name of the folder that we have given before. Now if we press enter we will have the famous WordPress installation screen as shown below. Select the language and click continue.
Step13: Now a screen will appear as shown below. Here we have to provide the database name that we have created before (blogtriangletest). Username should be given as root. Password field should be left blank. Database host should be given as localhost and table prefix can be given as wp_. The table prefix value is used as the prefix value for all tables that are going to be created. Now click Submit.
Step14: A page will appear as shown below. Click on the Run the installation button.
Step15: Now we are at the final stage of our local WordPress installation process. We have to provide details such as site title, username, password, and email. After this click the Install WordPress button.
Step16: Now a success screen will appear as shown below. Click the Log In button on the screen.
Step17: This will redirect us to the login page of our local WordPress installation. By entering the already provided username and password we can now successfully log in to our WordPress site.
Now if we login to phpMyAdmin as before we can see the newly created tables.
Thus we have successfully installed WordPress locally on windows in less than 15 minutes.