Steps to Install WordPress Using XAMPP on LocalHost on Windows PC

Steps to Install WordPress Using XAMPP on LocalHost on Windows PC

Are you planning to create a blog to showcase your thoughts, then WordPress is one of the best platform you can use. But before you go online, isn’t, it will be a good idea to first install WordPress Using XAMPP on your local system so that you can test, apply or edit themes to suits your needs. Apart it also help you to get familiar with the WordPress Environment. Setting a WordPress platform locally have sites run much quicker than they would online, that will give you a much safer testing environment away from a live site.

Few days back when I was trying to apply a new theme to my website, this, localhost environment has helped me a lot to improve my workflow and become an important part of my WordPress testing environment. Having a localhost environment has also save money as I don’t have to wait for all those online bandwidth that testing of WordPress installation needs over a web host as a test environment!

In this post today we’re going to look at XAMPP for Windows, a free, popular and easy to install server environment application that’s open source means you do not to spend anything.

Wordpress+xampp

So, before we begin, let us learn first what this platform XAMPP is?

What is XAMPP?

As WordPress is not a stand-alone application so it requires a server application to run. This is where XAMPP came in place. XAMPP is a cross-platform consisting Apache, MySQL, PHP and Perl. All these are server side scripting programs. In all XAMPP is an easy to use and lightweight application that gives us an environment to create a local web server to install WordPress using XAMPP for testing purposes.

Though, XAMPP is cross-platform, means we can install it over Mac and Linux too, but in this post we specifically talk, how we can set up XAMPP on Windows 7.

Installing XAMPP

First of all click on the Apache Friends website and download XAMPP to download the installation setup.

Appache

The XAMPP installation setup file is around 125MB. So it may take some time depending upon the internet speed you have. Once you downloaded, launch the installer. As we know Windows shows a warning message when we try to install or run a setup, here it might also give a warning message about installing the software on your computer.

Next, the XAMPP setup wizard will guide you through the installation.

Here in the next step, you will be shown with the option to choose between the components which you want to install and which to not. In the list you cannot decide between Apache and PHP, as these are greyed out because they are essential to running the software. But for the others, it is on your complete judgment which to use and those you want to avoid.

As here we want to run WordPress on this localhost, we need only MySQL and phpMyAdmin checked and we can uncheck all those left after.

Next, select the folder where you would like to install XAMPP. Here in this tutorial the location is C:\Program Files\XAMPP.

In the next window you’ll be asked whether you would like to install Bitnami for XAMPP, which offers free tools for installing WordPress, Drupal and Joomla! on top of XAMPP. We’re going to install WordPress manually and without this promotional program, so untick “Learn more about Bitnami for XAMPP” and click “Next.”


After going through all those options, XAMPP is now ready to install. With the step following, you are almost here completing the setup programme.

Once installed, you’ll be asked whether you would like to start the Control Panel. Leave this option ticked and click “Finish.”


If you receive any security/firewall warnings during the installation process (such as the one below), make sure you check “Private networks, such as my home or work network” and click “Allow access.” This is very important. If you don’t allow access, XAMPP won’t work.


If you left “Do you want to start the Control Panel now?” checked during installation, the Control Panel will automatically open. If not, go to the XAMPP folder on you computer and open “XAMPP Control Panel”.


Start up both Apache and MySQL. If you have installed XAMPP properly, both components should run fine without any errors, however, if there are any other applications on your computer using the same ports as these modules then you need to quit the conflicting applications using the same ports and restart XAMPP.


You can check if your new local server is installed by visiting http://localhost in your browser.

Localhost is now installed and working!

How to Setup Your MySQL Database

Before we install WordPress, we need a database.

On your XAMPP Control Panel, click the “Admin” button in the MySQL section.

Click “Admin” to set up MySQL.

A new browser window will automatically open with the phpMyAdmin interface.

Click “Admin” to set up MySQL or go to “localhost/phpmyadmin” in your browser.

Click on “Databases” near the top-left and you’ll be prompted to create a new database. I’ve called mine “WP”. When you’ve entered a name, click “Create” and close the window.

 

Final Step Download and Install WordPress

Download the latest version of WordPress.

In order to get WordPress working with XAMPP we need to unzip WordPress to the right folder. Go to theXAMPP folder on your computer and open the htdocs folder, i.e. C:/Program Files/XAMPP/htdocs.

Unzip WordPress into its own folder and rename it whatever you like. For consistency, I’m going to call this installation of WordPress “WP” to match the name of the database I just created.

Open your WordPress folder, find the wp-config-sample.php file and rename it wp-config.php. Open the file and scroll down until you see the following lines:

]Update your wp-config.php file with your database details.

These lines of code define the login details for your database. Replace “database_name_here” with the name of your database, which in my case is “WP.”

Replace “username_here” with “root” and leave “password_here” blank.

Save the file and close it.

Now we can get on with installing WordPress.

Open your browser and go to http://localhost/wp/

You should see the welcome screen for the famous five minute WordPress installation process.

Enter your details and click “Install WordPress.”

Your WordPress installation is now complete!

Setting up WordPress Multisite

Having Multisite setup on a local machine provides a great way to test themes and plugins in a Multisite environment, but also makes it a quick and easy to have multiple sites running at once.

Open your wp-config.php file again and add/edit the following lines to activate Multisite’s installation mode:

Open XAMPP and ensure your Apache and MySQL servers are running.

Login to your localhost site in your browser and under “Tools” you will now have a new option, “Network Setup.”

Enter a name for your network and your email address, then click “Install.”

WordPress will prompt you to edit your wp-config.php and .htaccess files.

Following the onscreen instructions, open wp-config.php and add the following lines underneath your previous edit:

Next, open .htaccess. If you can’t find it, make sure hidden files are displaying on your computer.

Your .htaccess file should look like this:

Edit your .htaccess file to complete your Multisite installation.

Multisite should now be enabled and working on your WordPress site!

Final Verdict

So finally you have completed the setup program as well as the completion of WordPress installation using XAMPP. Here the great thing about the XAMPP is that, it is an open source application, completely free to use. Using XAMPP you can use as many as installation you want, even the multisite platform of WordPress.

Leave a Reply

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