Install WordPress and XAMPP On Your PC - Genesis Beginner

Sunday, February 12, 2017

Install WordPress and XAMPP On Your PC

In this tutorial I’ll show you how to install WordPress on your desktop PC using XAMPP. At the time of this writing the current version of XAMPP.
There are two ways to install XAMPP:
  • using the ZIP file
  • using the installer
What’s the difference you ask? If you use the installer method XAMPP will automatically install the necessary services needed to run. This method also comes with an uninstaller should you decide you no longer want the program.
Using the ZIP method doesn’t actually install anything. You simply extract the contents of the ZIP file to C:\and manually start the services. When you no longer want the program there is nothing to uninstall, there are no added or modified registry entries. You simply delete the XAMPP directory which is located at C:\xampp This is my preferred method but I’ll walk you through the process of setting up XAMPP using both methods.
Setting up WordPress on your PC is a great idea for several reasons:
  • maintain a backup or clone of your live blog
  • test new functionality such as plugins, themes etc without affecting your live blog
  • general experimentation
I have dozens of WordPress instances running on my PC including several SVN installs.
In order to run, WordPress requires a server (Apache), and that server needs to support both PHP and MySQL. XAMPP will set these components up for you.
Ready? Then let’s go!

Using the ZIP method

Head over to the Apache Friends website to obtain XAMPP. See the image below.

We are using the ZIP method so make sure to click the green graphic that says Download Click here for other versions. Don’t click the graphic to download the installer, we’ll go through that later.
After clicking the green graphic that says Download Click here for other versions you’ll see the the image below.
Looking at the image above click on More Downloads.
After clicking on More Downloads you’ll see the image below.

Looking at the image above click the first item XAMPP Windows.
After clicking XAMPP Windows you’ll see the following screen. Click the first item 1.8.3.

After that you’ll see the following image with a list of available packages.
XAMPP packages
Looking at the image above take the item labelled xampp-win32-1.8.3-3-VC11.zip. It should be the 2nd item in the list. You could also take the 7z package (3rd item in the list) but for purposes of this tutorial we’re using the ZIP.
Download the ZIP somewhere to your hard drive and extract the contents to C:\ Do not extract it to C:\Program Files or some such thing. It must be extracted to the root of the drive which is C:\
Extracted properly the directory should be C:\xampp

Using the Installer

Head over to the Apache Friends website to obtain XAMPP. See the image below.

This time we want to download the installer, we don’t want the ZIP. Looking at the image above click the graphic labelled XAMPP for Windows. After a few seconds the download will begin. Again, save it somewhere to your hard drive.
When the download is complete double click it to start the installation. You’ll see the image below. Click Next.

After clicking Next you may see the next screen. It’s a warning that your antivirus may interfere with the installation process.

At this point you can temporarily halt the installation in order to shutdown your antivirus for a few moments or simply continue. I opted to shutdown the AV for a few minutes.
Next, you’ll see the image below.

Looking at the image above, it is asking what components you want to install. All you need is Apache, MySQL, PHP and phpMyAdmin. After selecting the components click Next.
Now we come to the screen below.

Looking at the image above, it is asking what directory XAMPP should be installed in. It should default to C:\xampp but if it doesn’t for some reason make sure to manually select C:\xampp As I stated earlier, XAMPP must be installed at the drive’s root. In fact you may see a screen warning you about User Account Control (UAC) protection and reminding you to install the package at root.
After clicking Next we come to the screen below.

Bitnami is an open source project that provides installers and virtual appliances for various web packages. For the purposes of this tutorial we won’t be using it so clear the check box labelled Learn more about Bitnami for XAMPP. Click Next.
After clicking Next we come to the Welcome to XAMPP installation screen below.

Be patient while the installation is underway. It takes only a few moments. Once complete you’ll see the screen below.

Looking at the image above clear the check box that says Do you want to start the Control Panel now? Click Finish.
And we’re done. XAMPP is now installed. The reason why I said to clear the check box and not to start the Control Panel is because I will show you how to start it each time you want to use it.
Now that XAMPP is installed let’s start using it.

Using XAMPP

If you set up XAMPP using the ZIP method you’ll need to navigate to C:\xampp\xampp-control.exe to access the Control Panel. You may want to add this shortcut to your Start Menu or Desktop or Taskbar etc for convenience in the future.
If you set up XAMPP using the installer it will have added the shortcut for the Control Panel to your Start Menu.
You’ll need to start the Control Panel with administrative rights so right click xampp-control.exe and select Run as administrator. See the image below.

After that Windows firewall will throw up 2 warnings at you. One informing you that some features of the Apache HTTP Server have been blocked and the other informing you that some features of mysqld.exe have been blocked. Grant access to both. You’ll only need to grant access this one time. It will add a permanent rule so that these dialogues won’t bother you in the future. See the images below.


After granting access to both Apache HTTP Server and mysqld.exe you’ll be greeted by the XAMPP Control Panel. See the image below.

Looking at the image above click the appropriate buttons to start both Apache and MySQL. Clicking the red x at the top right corner minimizes the Control Panel to the taskbar while clicking Quit shuts down the Control Panel.
Now that everything is running open your favourite browser and navigate to http://localhost/xampp/ The first time you visit this URL you will see the splash screen below.

Looking at the image above select your language. I chose English.
You will now arrive at the XAMPP backend where you can access its various tools and functions. For instance, you can access phpMyAdmin by clicking its link in the sidebar. You can also reach phpMyAdmin by navigating directly to http://localhost/phpmyadmin/ in your browser.
While in the XAMPP backend you’ll see a link in the sidebar labelled Security. Since this is localhost it’s not necessary to activate any security measures because only you can access it. That’s why you should never install this package on a live, remote server. It’s meant to create a development environment on your PC.
But in case you do want to activate some very basic protection click the link I mentioned labelled Security. See the image below.

After clicking that link you’ll see the following screen. See the image below.

Looking at the image above you can see a list of unsecure items. Click the link http://localhost/security/xamppsecurity.php to correct that.
After clicking that link you’ll be taken to the XAMPP Security Console where you can activate some basic security measures. See the image below.

Looking at the image above you can set a password for the MySQL SuperUser. The default username is root. Make sure to retain this password because you will need it not only to access phpMyAdmin in the future but to install WordPress later on. You can also set a username and password to protect the XAMPP directory.
After completing those steps you need to shutdown then restart both Apache and MySQL in order for the changes to take effect. Maximize the Control Panel (if minimized) and click the buttons labelled Stop for both Apache and MySQL. See the image below.

Looking at the image above you don’t need to click the button labelled Quit. You only click that when your session is over and you want to close everything. Our session is not over as we’re restarting Apache and MySQL.
Once both services are stopped, wait a few seconds then start them again.
That’s it. We have installed XAMPP which includes everything we need to run WordPress on our PC. In this part we’ll go through the process of installing WordPress.
First, we need to download WordPress. Head over to http://wordpress.org/download/ to grab a copy and save it to your hard drive.
When working with XAMPP all of your web projects will be stored in the htdocs folder located at C:\xampp\htdocs. Your WordPress project(s) will go there as well as any other projects you care to create such as Drupal, SMF, Joomla! etc. You access the projects with a browser by navigating to http://localhost/YourProject
For example, put your WordPress folder in the htdocs folder so that the path looks like C:\xampp\htdocs\WordPress You can name the WordPress folder anything you want – it doesn’t have to be WordPress. In fact you’ll have to if you want to run more than one instance. My various WordPress folders are named as such wp01, wp02, wp03 and so forth.
If you go with WordPress then the path would be C:\xampp\htdocs\WordPress and the URL http://localhost/WordPress
If you named the WordPress folder wp01 then the path would be C:\xampp\htdocs\wp01 and the URL to access it http://localhost/wp01. You get the idea.
Okay, go to the WordPress ZIP file you downloaded moments ago and extract the contents to C:\xampp\htdocs. (minus the period) Your project will be located at C:\xampp\htdocs\wordpress and to access it with your browser you will navigate to http://localhost/wordpress
Next, fire up the XAMPP Control Panel and with your browser navigate to http://localhost/phpmyadmin/ for it is here that we will create a database for WordPress. If you created a password for the MySQL SuperUser as outlined in Part 1 you will need to enter that password at the phpMyAdmin login screen. The default username is root.
If you didn’t create a password you’ll enter the phpMyAdmin backend right away bypassing the login screen.
Once in the phpMyAdmin backend you will see the screen below.

Looking at the image above click Databases. You will then be presented with the screen below.

Looking at the image above choose a name for your new database – I chose wordpress. From the drop menu select a collation – I chose utf8_general_ci then click Create.
Success! You have just created a brand new database for WordPress. You can see it in the list in the sidebar. See the image below.

Now we’re ready to install WordPress.

Install WordPress

With your browser navigate to http://localhost/wordpress where you will see the screen below.

Looking at the image above click on Create a Configuration File. After that you will be presented with the screen below.

Looking at the image above, it is reminding you it will need some basic information to continue the installation. Click on Let’s Go!
At the next screen, as seen below, you will enter the basic information WordPress wants.

Looking at the image above it is asking for:
  • Database Name
  • User Name
  • Password
  • Database Host
  • Table Prefix
These are the details you will enter:
  • Database Name: wordpress (as chosen earlier)
  • User Name: root (the default MySQL SuperUser)
  • Password: the password you chose earlier for the MySQL SuperUser
  • Database Host: localhost (default)
  • Table Prefix: wp_ (default)
After entering the details click on Submit.
You will then see the screen below. Click on Run the install.

Now we come to the next screen where it asks for the details specific to this WordPress install. See the image below.

Looking at the image above enter your:
  • Site Title – I chose My Site
  • Username – I chose username
  • Password – I chose password (hence the weak password warning :) )
  • Your E-mail
Click on Install WordPress.
The installation literally takes a few seconds. You should then see a confirmation screen like the one below. Click on Log In.

You will finally be presented with the WordPress login screen as seen below.

Enter the Username and Password you chose a few moments ago and Bob’s your uncle! Congratulations, you now have a fully functioning WordPress site on your PC. Have fun!
Further reading:
  • Apache Friends XAMPP forum (English) [link]
  • Apache Friends XAMPP FAQs (Windows) [link]
  • WordPress Codex [link]
  • WordPress Support Forums [link]

No comments: