Do you want to install WordPress on Windows localhost using cross-platform web server XAMPP? It’s a great idea because having the ability to run WordPress in the local environment allows you to make a WordPress website locally before migrating to the live server.
In this article, we will learn how to easily install WordPress on Windows using XAMPP. If you want to install WordPress using WAMP, refer to this guide. Refer to this article, if you want to create a clone of your live website on Windows localhost using XMAPP.Want to install WordPress on Windows Localhost? This article walks you through the process of installing WordPress on localhost using the XAMPP server.
Why you should install WordPress on Windows Localhost Using XAMPP
There are many reasons to install WordPress locally, such as:
- Develop a website locally and test it before making it live.
- Test plugins and themes locally.
- Create a copy of your live website, install it locally, fix or test the issues and then migrate it back to the live server.
- Use locally hosted WordPress to develop plugins and themes.
That being said, let’s take a look at XAMPP and the prerequisites you need to implement before installing it.
What is XAMPP
You need Apache, PHP, and MySQL or MariaDB to install and run WordPress. These packages are separate open-source software and installing them separately is not easy. XAMPP is a Windows web development environment that allows you to create web applications with Apache2, PHP, and MySql/MariaDB. Also, it offers phpMyAdmin that gives you the ability to easily manage the databases. XAMPP is open-source and available for all major operating systems.
Here’s what the alphabets in XAMPP stand for:
- X – cross-platform (X)
- A – Apache
- M – MariaDB
- P – PHP
- P – PERL
Apart from the core components mentioned above, XAMPP also comes with additional tools such as Mercury mail server, phpMyAdmin, Webalizer, OpenSSL (for Linux only), Apache Tomcat, Fake Sendmail, and FileZilla.
Prerequisites to Install WordPress on Windows Localhost
To run WordPress, the prerequisites are:
- PHP 7.3 or greater
- MySQL 5.6 or greater OR MariaDB 10.1 or greater
- Nginx or Apache with mod_rewrite module
- HTTPS support
XAMPP will take care of all prerequisites listed above. With all this in mind, let’s take a look at how to properly install XAMPP and WordPress on Windows.
Let’s Install WordPress on Windows Localhost
There are 8 steps to get up and running with your WordPress site for Windows. Follow these steps:
Step #1: Download XAMPP Server
First of all, you need to install XAMP Server on Windows. To do so, navigate to XAMPP Server’s download page and then click on the Download (64 bit) button corresponding to the latest version.
Step #2: Install XAMPP Server
Once downloaded, run the XAMPP installer. If UAC (User Account Control) us active on your system, you will get a warning message. If you want to retain UAC, avoid installing XAMPP to c:\Program Files.
Click OK and then click Next to show the Select Components page. To run WordPress, you only need PHP, MySQL/MariaDB, and Apache. However, if you want to later experiment with other modules, leave the default options, and then click Next.
Next, you need to select the Installation folder. I recommend that you install XAMP in the default folder c:\xampp. Now, click Next; clear the Learn more about Bitnami for XAMPP checkbox and then click Next.
Click Next to initiate the installation process. You will be presented with the Windows Defender Firewall message box. Clear the Public networks checkbox and then select Private networks checkbox.
Now, click Allow access and then click Finish.
Click Save from the Language message box to select the language and open the XAMPP Control Panel.
Step #3: Explore the XAMPP Control Panel
XAMPP Control Panel is a simple interface from where you can access all modules of the XAMPP server. It allows you to toggle individual modules on and off, access the admin area, and configuration and log files.
The array of buttons on the right of the panel allows you to access various tools and options:
- Config: Opens the Configuration of Control Panel dialog box. You can specify the global XAMPP settings from here.
- Netstat: Opens the Netstat – TCP Listening sockets window. This window displays all active TCP connections and ports on your machine.
- Shell: Starts XAMPP in a custom command line mode.
- Explorer: Opens the XAMPP root folder in Windows Explorer.
- Services: Executes services.msc; shows all Windows services.
- Help: Opens a Window with links to XAMPP forums (English & Germany).
- Quit: Closes the panel.
Step #4: Specifying XAMPP Settings
Before we proceed farther, let’s specify settings for the server. Click the Config button to open the Configuration of Control Panel dialog box.
The default editor is notepad.exe. If you want a different editor, click on the folder icon and select the editor. Now, enter the following in the Browser field to make Chrome default browser when using XAMPP:
C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
In the Autostart of modules section, select Apache and MySQL checkboxes. Now, select the Start Control Panel Minimized checkbox. Next, click Save to save the changes made.
Step #5: Start Apache and MySQL Modules
To start the Apache module, click on the Start button corresponding to the Apache module; the Apache server should start successfully under ports 80 and 443.
To open the Apache’s dashboard, click the Admin button. You can also access it by navigating to http://localhost/dashboard in your browser.
To start the MySQL module, click on the Start button corresponding to the MySQL module; the MySQL module should start successfully under ports 3306. Also, select the Private networks checkbox and clear the Public networks from the Window Defender Firewall dialog box. Click the Allow access button.
You can access phpMyAdmin by clicking on the Admin button corresponding to the MySQL module.
Step #6: Create a New MySQL Database
Click the Admin button corresponding to the MySQL module to open phpMyAdmin. The interface is divided into two panes. On the right pane, make sure you are in the Databases tab and then enter sizzdev in the Database name field. Now, choose Collation from the drop-down located next to the Database name field. Next, click Create; the database is now ready for the WordPress installation.
Step #7: Download WordPress
First of all, you need to navigate to WordPress.org file and download the latest version of WordPress. Navigate to the website and click the GetWordPress button; the download page will be displayed. Now, click the Download WordPress button to download the zip file. Save the file on your computer.
Step #8: Install WordPress
Extract the zip file and copy the WordPress folder. Next, using File Browser navigate to the location where you installed XAMPP and paste the WordPress folder in the htdocs sub-folder. If you have used the default location for installing WampServer, the location will be C:\xampp\htdocs.
You can now rename the pasted WordPress folder to anything you want. However, give it a name that you can easily remember. For the sake of this article, change the name to sizzdev.
In the /xampp/htdocs/sizzdev folder, rename wp-config-sample.php to wp-config.php. In this file, replace:
- define( ‘DB_NAME’, ‘database_name_here’ ); with define( ‘DB_NAME’, ‘sizzdev’ );
- define( ‘DB_USER’, ‘username_here’ ); with define( ‘DB_USER’, ‘root’ );
- define( ‘DB_PASSWORD’, ‘password_here’ ); with define( ‘DB_PASSWORD’, ” );
Save the changes and close the file. Now, we are ready for installation. Make sure XAMPP is running and then naviagte to http://localhost/sizzdev in your browser.
Now, select the language and click Continue. In the Welcome page, set Site Title to Sizz Dev, Username to sizzadmin, and then set a password or use the auto-generated password. Next, click Install WordPress.
Congratulations, you’ve successfully installed WordPress on XAMPP. Now, click on the Log In button to login to WordPress dashboard.
As you can see, setting up a local WordPress site may sound complicated, but XAMPP makes it extremely easy for you. Here’s all it takes to install WordPress on Windows Localhost:
- Download XAMPP Server
- Install XAMPP Server
- Explore the XAMPP Control Panel
- Specifying XAMPP Settings
- Start Apache and MySQL Modules
- Create a New MySQL Database
- Download WordPress
- Install WordPress
I hope this article helped you learn how to install WordPress on Windows using the XAMPP development server. If you liked this article, please subscribe to our newsletter. You can also connect with us on YouTube, Facebook, Twitter, and Pinterest. If you are a foodie, please check our recipe grid.
Do you have any questions or suggestions about how to install WordPress on Windows using XAMPP? Ask away in the comments section below.