How to Install WordPress in XAMPP?
If you want to test WordPress CMS or simply intend to develop/design your site before investing in a domain and hosting, installing WordPress locally is a smart choice.
Why is it such a great choice? Well…
The obvious reason: You don’t have to spend a dime before the actual site is ready unless you decide to buy some premium plugins or themes.
It’s lightning-fast to develop in a local environment compared to a live server. E.g., Want to try a new theme? Just copy-paste the file in the appropriate folder. No uploading delay, no processing delay, no saving delay!
For such experience, though, you need to create a local server first. And the hero of this article, XAMPP, helps you do that.
XAMPP is a free and open-source web server solution stack package that includes Apache server, MariaDB (database), and interpreters for PHP & PERL.
Because WordPress is written in PHP, XAMPP is the perfect local server solution.
It’s highly popular in the IT market, but for newbies, installing and setting things up with XAMPP can be a bit hectic. Therefore, we have created this straightforward step-by-step guide to help give a quick boost to your WordPress site development process. And here goes:
Step-1: Download & Install XAMPP
Go to Apachefriends’ site and download the latest version of XAMPP for your OS. We use Windows here, so we will download the Windows version.
Once downloaded, open the file and start installing it. Firstly, you will encounter a “Setup” window — click Next here.
In the next window, you can choose the components you need. For WordPress, you need four things: Apache server, MySQL, PHP interpreter, and phpMyAdmin.
Keep these four selected, and click Next.
In the next screen, you will be asked to select the location where you want all the XAMPP files to be. Leave it at default (C:\xampp), and click Next.
Up next, there will be a prompt asking if you want to install Bitnami. Here, uncheck the box and click Next.
Now, you’ll have all the configurations ready. Merely clicking Next on the succeeding window will install XAMPP on your PC/laptop.
Once the installation is finished, there’s a checkbox to start the Control Panel. Keep it checked and click Finish.
This will open the XAMPP control panel. We want you to open the control panel to make sure if the local server is ready.
Click on Start for both Apache and MySQL on the next window. Once launched, the background color of Apache and MySQL will become green — that means everything’s working perfectly.
Just for testing, open any browser and type http://localhost/ or localhost/phpmyadmin in the URL bar and click enter. If it shows a XAMPP window or phpMyAdmin, your local server is ready. If it’s some sort of error like in this(below) picture, something’s wrong.
We will leave solving such errors for another article, but most likely, you won’t face any error if you followed all the sub-steps mentioned in this section.
Step-2: Copy the WordPress files to htdocs
When you installed XAMPP, among many folders created, there’s one called htdocs.
Open it, and create a new folder for WordPress installation. Let’s call it testsite.
Now, head on to wordpress.org, click on “Get WordPress,” and download the latest WordPress version.
Copy all the WordPress files (after extracting the .zip folder) to our new folder, testsite. This essentially means WordPress is installed on your computer.
Step-3: Create a database for WordPress
Now, open the XAMPP control panel, and make sure both Apache and MYSQL are green. Click on “Admin” in the MySQL row of the panel. It will direct you to phpMyAdmin.
Here, click on the Databases tab, and create a new database.
To simplify things, we are keeping the database name as the folder name (where WordPress is saved). You can name the DB whatever you want.
Step-4: Access WordPress
Once the database is created, head back to the testsite folder under htdocs.
There, you will see a file wp-config-sample PHP file, among many. Rename it to wp-config. Now, open it in any text editor (We use Sublime).
Scroll down till you see “database_name_here”. Edit that to “testsite” or whatever database name you gave while creating. Change “username_here” to “root” and “password_here” to empty(“ ”).
Then, save the file.
Step-5: Open and set up your WordPress
Open a browser and type “localhost/testsite” in the URL bar. Click enter. And start the WordPress installation process.
Once you do that, you will be greeted with a normal WordPress dashboard.
That’s it. Play with it. Locally.
WordPress is perhaps the best CMS in the market. And to try out how comfortable you are with it, you can install it and test it locally.
The only thing you require, apart from WordPress (of course), is a local server. XAMPP helps you create one. Follow the steps we discussed in this how-to guide, and you can experience and develop your WordPress site without actually using a live server or a domain name.
We hope you found this guide helpful. If you faced any difficulties (while) following the steps, let us know in the comments. We will try to help you! Until then, goodbye :)
You can als visit some good article below:
• Uptime 99.99%
• Free SSL certificate
• WordPress official recommendations