Are you looking for an article that will guide you step-by-step to install WordPress locally on XAMPP? If yes, then you are at the right place. Even if you weren’t, I surmise you will find this article quite helpful 🙂 Well, I know to install WordPress locally sounds like a breeze but it isn’t really so easy feat. So, here I am to provide you a helping hand just in case you need it.
You might also be thinking why do we need to install WordPress locally while we can install it straight away. Well there are many advantages of running a WordPress site in a local environment. The greatest of them is that running WordPress locally helps you come up with better planning strategies as well as design visualization. Later, we can copy the site to the preferred host or live server when it is ready to be launched.
Besides, you don’t need to worry about the domain name or web server. Furthermore, on local host you can easily test your installations, new versions of themes, plugins and other changes you make on the site without letting your site online. So, it is safer especially for the testing purposes. Apart from that, your site also runs quickly on local host than on the live server.Thus, it also saves a bunch of your time.
Let’s start with a brief introduction to XAMPP…
What is XAMPP?
XAMPP is the acronym for cross-platform, Apache, MySQL, PHP and Perl. It is a free and open source cross-platform web server solution developed by Apache friends. XAMPP makes it extremely easy for developers to set up a local environment for testing and development purposes. It includes Apache, MariaDB and PHP in an extractable file. Thus, it is a complete package of everything that is needed (server application, database and a scripting language) to set up a web server. Since, XAMPP is a cross-platform web server it is available for and works equally well on Windows, MAC and Linux based computers.
Getting back to the topic let us now see how to install WordPress locally on XAMPP.
Step 1: Download and install XAMPP on your computer
Pretty obvious, If we want to install WordPress locally on XAMPP then we need to have it installed it on our computer. You can simply go to Apache Friends and then Download XAMPP.
After the download finishes, the next step is to run the downloaded file.
If you are running any Antivirus software(s), then you will get a warnings shown in the image below:
You can simply click on the “Yes” button and proceed.
You will then see the standard installer screen. Just click on the “Next” Button.
After that, you will be asked to select the components that you would like to install. Since, we do not require all the given components to install XAMPP and WordPress, you can let the MySQL and phpMyAdmin checked and uncheck everything else. Then, click Next.
Then, select the location to install XAMPP. You can either create a location yourself or install it on the location given by default. The latter option will do for most of the users.
On the next window, you will be asked if you would like to install “Bitnami for XAMPP” which is the free installer. Since, we will be installing WordPress manually, we do not need it. Simply, uncheck it and click Next.
Now, XAMPP is ready to be installed. Click the “Next” button and it is installed.
As a final step, after it is installed, you will be asked if you would like to launch the control panel which provides you with an interface to start working with XAMPP. Just leave the option checked and click “Finish”.
Step 2: Start the modules and test your server
The control panel will then automatically be opened after that. You will see the start button next to Apache and MySQL. Go ahead and click the start button.
Then, you may see a Windows firewall notification as shown in the image below. Make sure you click on “Allow Access” button for both Apache and MySQL so as to run the applications.
After clicking the button, the status for them will turn green.
You have now successfully installed XAMPP on your computer.
Step 3: Download and install WordPress Files
First, to download WordPress, visit WordPress.org and download the latest version of WordPress.
And then, extract the zip file.
Head over to the folder you selected for the XAMPP installation. For me it’s C://xampp. In that folder, find the sub folder namely “htdocs“. Copy the extracted file inside htdocs. And it’s totally up to you whether you want to rename the WordPress folder or leave it as it is. Personally, I recommend you to rename the WordPress folder as it will make identifying the local site later.
Step 4: Create a database for WordPress
Before we install WordPress, we need to create MySQL database. For that, you can just click on the “Admin” button the XAMPP control Panel.
Or you can simply open a browser and visit localhost/phpmyadmin. It is will redirect you to page with the phpMyadmin interface as shown in the image:
Here, click on the “Databases” at the top-left and then name your database that will be easier for you to remember. After that, click on the “Create“ button.
Step 5: Run the WordPress Installer
Now that a database is created, you can proceed with the other steps. So, open your favorite browser and visit your site by going to localhost/Website-trail. The page that will open after that will tell you that you will be requiring a database name, database username, database password and a database host. Click on the Let’s go button.
You will then see page where you need to enter your database details you just created. Just enter the details as follow:
Database Name: “Name of your database”
Password: leave the password field blank
Database Host and Table Prefix: leave it as it is
The next step is to click on the “Submit” to continue.
After that, you will be asked to enter the information about your site.
Finally, click on “Install WordPress” button and we are done.
WordPress site is now perfectly ready to run locally and will prompt you to login when completed. You can simply login to your site to going to localhost/Website-trial/wp-admin. Enter your credentials you created during the installation.
WRAPPING THINGS UP!
Like I said earlier, XAMPP provides an extremely secure and an ideal testing environment for your WordPress site. You can easily setup as many WordPress installations as you wish on XAMPP. Moreover, you can also design and develop your WordPress site on a local environment like you would do on a live website. You can try installing WordPress themes. other thing you would like to do is try new great plugins.
I hope this article helped you in learning how to install WordPress locally on XAMPP. You may also like to check out on more of such articles for WordPress Beginners:
- How to Install WordPress Plugins
- Createing a WordPress Website: Beginners Guide
- How to Make your WordPress Site