The XAMPP File Is 109MB
The XAMPP File Is 109MB
During the install process, you may receive warnings such as Windows asking you if
youre sure you want to install the software and the installer prompting you about antivirus
software. As you would when installing any software on Windows, use your best
judgment, but you probably want to click Yes to continue with the install.
The XAMPP setup wizard will guide you through the installation. Click Next.
In the next window, you will be asked to select which components of the software you
would like to install and which ones you dont want. Some options, such as Apache and
PHP are essential to running the software and will at automatically installed, so they are
grayed out so you cant select them.
Its up to you which components you want to install. Since we want to run WordPress in
our localhost environment, leave MySQL and phpMyAdmin checked and uncheck the
remaining options.
Next, select the folder where you would like to install XAMPP on your machine. Im going
to create a new folder in C:\Program Files\XAMPP.
In the next window, youll be asked whether you would like to install Bitnami for XAMPP,
which offers free tools for installing WordPress, Drupal, and Joomla! on top of XAMPP.
Since were going to install WordPress manually later in this tutorial and dont need free
installers, untick Learn more about Bitnami for XAMPP and click Next.
After going through all those initial installation steps, XAMPP is now finally ready to install.
Click Next.
Once installed, youll be asked whether you would like to start the XAMPP Control Panel,
which provides an interface for running your localhost environment. Leave this option
ticked and click Finish.
The Control Panel will automatically open, but if you unchecked the option in the previous
window, you can go to the XAMPP folder on your computer and open XAMPP Control
Panel instead.
If the installation process went well and everything is running smoothly, the control panel
will open with black and blue text updates at the bottom. But if there are issues
Well, look at that red text! It looks like Ive run into some errors already. Not to fear, it
looks like a port conflict.
The main reason why XAMPP throws up errors like this is due to another program on your
machine using ports 80 or 443 the ports Apache and MySQL need in order to run.
If youre using Windows 10, World Wide Web Publishing Service is most likely using post
80. This program, which is for Internet Information Services (IIS) for Windows Server,
comes pre-installed and if youre not using it, you can simply stop the service running on
your machine or even delete it.
If that doesnt resolve the issue, you can set up a new firewall rule to forcibly unblock the
ports:
1. Open Windows Firewall on your machine and > click on Advanced Settings on the left
2. Click on Inbound on the left, then on the far right click New Rule
3. Click Port and then TCP. In the field below for Specific Ports type in 80, 443 and click Next
4. Check Allow the Connection then click Next
5. Make sure all options are checked and click Next
6. In the name field, enter whatever you want, but for the sake of consistency lets type
in LOCALHOST1. Click Finish
7. Now repeat steps 1-6, but name this new rule LOCALHOST2 and click Finish
8. Restart your computer
I should also mention at this stage that if you get any security/firewall warnings while
installing or using XAMPP (such as the prompt pictured below), make sure you check
Private networks, such as my home or work network and click Allow access. This is
very important. If you dont allow access, XAMPP wont work.
Running XAMPP
Now, lets see if everything works smoothly.
If you previously quit the control panel to fix a port issue, restart XAMPP. Then start up both
Apache and MySQL.
You
have no idea how happy I am to see both Apache and MySQL working, or maybe you do!
A new browser window will automatically open with the phpMyAdmin interface.
Click on Databases near the top-left, and youll be prompted to create a new database. Ive called
mine WP.
When youve entered a name, click Create and close the window.
Quickly and easily set up a new MySQL database for WordPress.
Open the WP folder where you saved WordPress, find the wp-config-sample.php file and rename
it wp-config.php. Open the file and scroll down until you see the following lines:
These lines of code define the login details for your database:
Once youve chosen your language, continue onto the next screen and enter your username and
password details. Click Install WordPress.
Your WordPress installation is now complete!
Open your wp-config.php file again and add/edit the following lines to activate Multisites
installation mode:
define('WP_DEBUG', false);
define('WP_ALLOW_MULTISITE', true);
/* That's all, stop editing! Happy blogging. */
view rawenable-multisite hosted with by GitHub
Login to your localhost site in your browser and under Tools you will now have a new
option, Network Setup.
Enter a name for your network and your email address, then click Install.
WordPress will prompt you to edit your wp-config.php and .htaccess files.
Following the onscreen instructions, open wp-config.php and add the following lines underneath
your previous edit:
define('WP_DEBUG', false);
define('WP_ALLOW_MULTISITE', true);
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'localhost');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
/* That's all, stop editing! Happy blogging. */
view rawsetting-up-multisite hosted with by GitHub
Next, open .htaccess. If you cant find it, make sure hidden files are displaying on your computer. If
you do not have a .htaccess file already, then create it in the same directory as your wp-config.php
file. If you do have a .htaccess file, replace any existing lines with these new ones:
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
# END WordPress
view rawmultisite-htaccess hosted with by GitHub
Youll need to log in again, and when you do, youll see the WordPress dashboard from where
youll be able to access individual sites in your network.
Wrapping Up
XAMPP provides an easy way to run a local server environment on your Windows machine,
allowing you to test and develop locally, rather than installing WordPress on a live site. It will also
save you a bunch of time since you wont have to install and uninstall WordPress each time you
test themes and plugins.
The great thing about XAMPP is its free and open source. You can set up as many installations of
WordPress as you want and its just as easy to get Multisite up and running.