Setting up XAMPP to test WordPress site on Windows

XAMPP is an incredibly convinient development stack for Windows consisting of apache, php, mysql, mariadb and perl. You can use it to test your WordPress site publshed from Helpinator before releasing it to public.

Head over to XAMPP site ( and download Windows installer.

XAMPP website

Run the installer and follow steps. When asked for a folder enter “C:\xampp” or another folder OUTSIDE of “Program Files”.

XAMPP installation folder

When the installer finishes you are allowed to run XAMPP Control Panel which provides an easy way to Start/Stop services and alter configurations.

XAMPP control panel

But before we start anything let’s add our testing domain to Apache (because we wll have to restart it anyway). To add a new domain you will need to perform a set of actions (create html files folder, alter apache config and Windows hosts file so you can access your site by domain name from your web browser). But we wrapped all that into a handy tool that you can use to add domain names with a single click. Download it using this link:

XAMPP Add site tool

Now we can launch services, Apache and MySQL in particular. Click “Start” button next to the service name.

XAMPP Services Running

Click “Admin” button next to “MySQL” service, it will open PHPMyAdmin in your webbrowser. We will add a new database for WordPress using it.


Now click “Databases” tab. Enter “wptest” below “Create database” and click “Create”.

phpMyAdmin create database

Now go to WordPress site and download fresh WP.

Download WordPress

There’s “wordpress” folder in this package, extract files from this folder into our new site root, located at C:\xampp\htdocs\www\

Now we need to create WordPress configuration to continue. Locate wp-config-sample.php and rename it to wp-config.php. Open this new file in any text editor and set the following lines

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'wptest' );

/** MySQL database username */
define( 'DB_USER', 'root' );

/** MySQL database password */
define( 'DB_PASSWORD', '' );

We set DB_NAME to wptest database that we created, DB_USER to root and DB_PASSWORD to empty string. Of course in production server settings like this are a suicide, but we only need it for local testing.

Now you can delete index.html file that was created automatically by XAMPPAddSite as a stub. Then open your web browser and navigate to your domain name ( in our case). WordPress installer appears.

WordPress installer

Now you can complete your WordPress installation.

Leave a comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.