After following the guidance in this article, you will have learned how to install, configure, and use XAMPP for local WordPress development — and the related benefits. Keep reading to learn how to use XAMPP, and how to conduct a WordPress installation for XAMPP.
What Does XAMPP Stand for in Web Development?
The XAMPP acronym in web development stands for cross-platform, Apache, MySQL/MariaDB, and PHP/Perl/Python. XAMPP layers those technologies in a stack for web development. It allows you to build a WordPress site offline, on a local webserver on your computer. This simple and lightweight solution works on Windows, Linux, and macOS.
In Web Development, What are the Differences Between XAMPP & MAMP?
Experts agree that MAMP is easier to manage than XAMPP, but XAMPP offers more options for customization. Also, MAMP does not offer standalone installers for WordPress and is less customizable than XAMPP.
About Using XAMPP with WordPress for Local Development
XAMPP is a multi-platform local server environment developed by Apache Friends. A local server allows you to test your website (code, plugins, themes, etc.) locally on your computer without having to pay a hosting company. Local servers are much safer and hidden from hackers, especially when your website is in the testing phase. You don’t need an Internet connection, you can use your local server anywhere, and all you need is a computer.
To install WordPress locally, you need Apache (webserver), PHP (programming language for developing dynamic web pages), and MySQL/MariaDB (database management system). By installing XAMPP, you will get everything you need to facilitate local WordPress development. In other words, XAMPP represents a quick solution for setting up a WordPress localhost development environment on your machine.
XAMPP can be installed on MacOS, Linux, and Windows. However, it is noteworthy that there are better solutions for each of those operating systems. For example, MAMP is best optimized for macOS, XAMPP works great on Windows, and Valet is optimal on Linux operating systems.
You can download XAMPP for free from the Apache Friends official website. However, if you do not have a prebuilt project that you wish to test which is compatible with the older PHP version, it is highly recommended to download the latest version, which currently is PHP 8.1.6 (at the time is article was published).
XAMPP & Localhost Setup for WordPress
Here's how to use XAMPP and how to install WordPress XAMPP in nine steps.
How to Install XAMPP
Take the following steps to install XAMPP locally on your computer:
- Open the folder where you have downloaded the XAMPP localhost installation and run it.
- You might see a warning message, but just click OK — as the warning message is not significant in this case.
- In the Setup XAMPP window, click Next.
- You will be prompted by a window where you will see a list of components/applications that will be installed. It is not necessary to install all of them. For example, you don’t need Fake Sendmail, Mercury Mail Server, and Tomcat. There won’t be any issues even if you install them all. Click Next.
- Choose the location where you want to install XAMPP and click Next.
- Uncheck the Learn More About Bitnami for XAMPP checkbox and click Next.
- In the Ready to Install Window, click Next, and wait for the installation to be completed.
- Once the installation is complete, uncheck the Start the Control Panel checkbox (which you will do later), and click Finish.
- Go to the installation directory and open the xampp folder. This folder is the directory that you will be working with, or more specifically, where you will be configuring the control.exe file.
How to Install WordPress
To install WordPress locally the right way and avoid potential future issues, follow these steps:
- Open the xampp folder, right-click on the control.exe file, and run it as an Administrator.
- Click Config, select the Apache and MySQL (MariaDB) checkbox and click Save. Now you won’t have to manually start Apache and MySQL/MariaDB every time you start XAMPP WordPress, as it will be done automatically.
- Open your browser, and in the URL bar type, localhost and hit Enter. You will be prompted by the Welcome to XAMPP for Windows page, which means that we can move on to downloading and installing the WordPress locally.
How to Use XAMPP and WordPress Together
Follow the next steps in order to install WordPress for local development with XAMPP:
- Download WordPress from the official website.
- Once the wordpress.6.0.1.zip is downloaded, extract the zip file in the htdocs folder located in the xampp folder.
- Next, you must create a database to install WordPress locally. Open your browser, and in the URL bar type, localhost. Then, hit Enter, and afterward click on phpMyAdmin.
- Click on the database panel. Name your database wordpress or any other name you would like. It is just important to remember the name of your database and click Create.
- Now, you have to assign the database you have just created. Go to your browser's URL bar, type localhost/wordpress, or localhost/the name you chose for your database, and hit Enter. By doing so, you will be prompted by a WordPress installation page.
- Select your language and click Continue.
- Now it is important to remember all of the credentials.
- Enter your Database Name, type root in the Username field, and in the Password field, also type root, or you can leave it empty. In the Database Host field type, localhost and wp_ in the Table Prefix field. Then, click Submit.
- Everything is now ready for the local WordPress installation. Click Run the Installation.
- You will be prompted by a Welcome Screen. Enter the information about your WordPress website, which you can change anytime later, including the site title, username, password, and your email. You can choose a site title, such as, My Super Awesome Blog, for example. You can choose a username type of Admin, for example. It is not necessary to set a strong password, since you will be running WordPress locally. Therefore, set a password you will easily remember, such as 654321. Confirm the usage of the weak password checkbox and enter your email address. Since you will be running WordPress locally, search engine visibility is not important, meaning you can leave the checkbox unchecked and click Install WordPress.
- After the installation is complete, enter your login credentials, which in our case were for an Admin account with a username of Admin and a password of 654321, and click Login.
You have successfully installed WordPress locally. As well, you now know the basics of how to use XAMPP, and you are ready to experiment as much as you want to create a perfect WordPress website.
About XAMPP Local Development
Why do you need XAMPP in place to install and test your WordPress site locally and not just via the browser?
WordPress is based on PHP, a server-side programming language. Your browser cannot process a PHP code, unless the code is compiled through a webserver. Considering that fact, XAMPP provides the “PHP decoding server,” necessary to load a WordPress site locally. Furthermore, WordPress needs a database that XAMPP also provides, and it is possible to manage your database using phpMyAdmin.
Bottom Line on XAMPP & WordPress
After following the steps above, you have learned how to use XAMPP with WordPress locally. You can now experiment locally on your computer to create a perfect WordPress website for your business. All of the WordPress features are available for you to test locally. Likewise, all of the plugins and themes are there waiting for you to experiment with.
Other than using XAMPP for local WordPress development, you can also try using Local WordPress development with Valet or WordPress Local Development with MAMP.
Not a Nexcess hosting customer yet? Check out our fully managed WordPress hosting plans to get started today.
- Migration Guide: How to Transfer a GoDaddy Domain to Nexcess
- Overcome Web Hosting Issues & Pain Points with Managed Hosting from Nexcess
- Setup & Settings for the W3 Total Cache Plugin