WampServer Localhost

How to WordPress localhost in Windows

Facebooktwittergoogle_plusredditpinterestlinkedinmail

My journey as a Developer started with Microsoft products and the Windows operating system.  You can see my skill set on my Bio Page, and more about me at About.  To this day, I don’t own a Mac.  Therefore, when I was hired into the world of WordPress in August 2015, I had no choice but to try to figure out how to create a DEV environment on Windows.  My comfort zone for Development was Visual Studio, so of course I needed that in the mix as well.

Those decisions made my initial journey into WordPress Development much more difficult than it needed to be.  However, it allowed me to get deep into the weeds of the technologies supporting WordPress, and therefore solidified my understanding of how everything works.  I would not recommend that specific path to Windows users unless you are willing to take a deep dive into those technologies.  For instance, using Visual Studio, I gained an understanding of WordPress on IIS7.x and IIS8.x.  That is an exercise that requires intestinal fortitude and is not for the faint of heart!

There is a much simpler, more straightforward way of implementing a WordPress DEV environment on Windows, and that is what I am going to describe in this post.  So what do you need for WordPress Windows DEV environment?  You need an Apache Server, a PHP stack, and a MySQL stack.  What you need is WampServer 3.  The most definitive article about how to install it on Windows is at WampServer 3 All you need to know,  I urge you to read that article in its entirety before trying to install WAMPServer 3.

 

 

The download for WampServer 3 can be found here.  I will be detailing the 64 bit version only for Windows 10 in this post.  The current 64 bit version of Wampserver is 3.0.6 which includes Apache 2.4.23, PHP 5.6.25/7.0.10, MySQL 5.7.14, PhpMyAdmin 4.6.4, Adminer 4.2.5, and PhySysInfo 3.2.5.  The download button has the latest versions of Apache, MySQL, and PHP.

As per the forum post, WAMPServer 3 All you need to know:

BEFORE proceeding with the installation of Wampserver, you must ensure that you have current versions of all these Microsoft C/C++ Runtime Libraries, if you do not check and install any missing libraries before you install Wampserver it will not install correctly and will not run correctly!
In addition, the installation will be faulty and you will need to remove Wampserver BEFORE installing any missing Runtime Libraries.
and then re-install WAMPServer

Make sure your system has “up to date” versions of ALL these redistributable packages:-
— Microsoft Visual C/C++ Redistributable 2008 (VC9),
— Microsoft Visual C/C++ Redistributable 2010 (VC10),
— Microsoft Visual C/C++ Redistributable 2012 (VC11),
— Microsoft Visual C/C++ Redistributable 2013 (VC13),
— Microsoft Visual C/C++ Redistributable 2015 (VC14)

Where to find and download the MSVC Redistributable packages:

Install all of the packages above, one at a time, starting at the top and working down in order.

You must install WAMPServer as an Administrator.  Right-click the install *.exe file and select “Run as Administrator” from the menu.

You will be confronted with the Windows UAC (User Access Control) Dialog box.  Click Yes to continue the installation.

WampServer installation User Access Control dialog box
WampServer installation User Access Control dialog box

The next dialog box will ask you to Select Your Preferred Language from a drop down list.  English is the default.  To continue click OK.

WampServer installation Select Language screenshot
WampServer installation Select Language

Next you will be presented to a Welcome to WampServer64 Installation Wizard screen.  To continue click Next.

WampServer Installation- Welcome to Wampserver Setup Wizard Screenshot
WampServer Installation- Welcome to Wampserver Setup Wizard

The next screen you see is the License Agreement dialog box.  To continue click the “I accept the agreement” radio button and click Next.

WampServer installation License Agreement screenshot
WampServer installation License Agreement

Next you will see the Information screen.  This informs you about all of the prerequisites that we addressed and installed earlier.  To continue click Next.

WampServer Installation Information dialog box screenshot.
WampServer Installation Information screen

The next screen is the Select Destination Location screen.  The default location is c:\wamp64.  You can select the default or even move the location to another drive if you want to.  To continue click Next.

WampServer Installation- Select Destination Location folder
WampServer Installation- Select Destination Location folder

The next screen is the Select Startup Menu Folder.  The defaults are good in this instance.  If you select the default, it would be placed in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Wampserver64. This folder content is accessible from the windows start button, all apps in windows 10. If you place in any other folder, the shortcut will not be visible from the start menu.

WampServer Installation Select Startup Menu Folder screenshot.
WampServer Installation Select Startup Menu Folder

The next screen is Ready to Install.  Review all of the details of the selections you have made in previous screens.  If you need to make a change click the Back button.  To begin the installation click Next.

WampServer Installation Ready to Install Dialog box
WampServer Installation Ready to Install

Now the installation begins.  Below is a screenshot of the installation screen and the progress bar.

WampServer installation progress screenshot
WampServer installation Progress Bar

 

 

The next dialog box is one of the most important steps in the installation.  You will see a dialog box that informs you that by default Internet Explorer is used as the default browser.  You want to change the default browser to Chrome instead so click Yes on this dialog box.

Wampserver installation choose default browser screenshot
Wampserver installation Choose Default Browser

You will see something like the screenshot below. In Windows 10, Google Chrome executable is located in C:\Program Files (x86)\Google\Chrome\Application folder by default. Go to this folder and select chrome.exe and click open.

WampServer installation Choose Default Browser path to executable
WampServer installation Choose Default Browser path to executable

The next screen is to Select the Default Text Editor.  My suggestion is that you accept the default of Notepad.  To accept the default and continue click No.

WampServer Installation choose default text editor dialog box screenshot
WampServer Installation Choose Default Text Editor

After the installation is complete, you will see a dialog box informing you that the user name for phpmyadmin is “root” and password is not set, that is there is no password for it.  In other words you should leave the password field blank. Click Next to continue.

WampServer installation phymyadmin information dialog box screenshot
WampServer installation phymyadmin Information

The last screen in the installation process is the Completing the WampServer64 Setup Wizard.  WampServer should now be installed on your system.

WampServer Installation complete dialog box
WampServer Installation Completing the WampServer65 Setup Wizard

You can now start the WampServer by double clicking on the shortcut wampserver icon on your desktop or alternatively launch it from the start menu. After the WamServer starts, you can see the Green icon on the taskbar as shown in the screenshot. Initially it will be Red, then turn Amber and then Green. When it turns green, it means all the services are now running. Please note that you will have to give adminsitrative privilages for the Server to start. That is just click Yes when you see UAC confirmation dialog box when you click the Wamserver icon to start the server.

WampServer taskbar icon screenshot

By default, Apache server listens on port 80. However, in some cases the port 80 is used by other programs such as Skype, or Microsoft SQL Server installed with SQL Server Reporting Services.  In that case you need to change your port number from 80 to 8080.  I highly recommend this so that Microsoft is able to assign port 80 when it needs it for future installations.

To accomplish this task, left click on the Green WampServer icon in your system tray to pop up a WampServer administrative dialog box.  Hover over Apache to expand the nested dialog box and left click on http.conf.

apache-http-conf
This will launch the http.conf file in Notepad.  Launch the Find dialog box with Ctrl+F.  In the text box type 80.  You need to search and replace the following values:

http-conf-find

Change
Listen 0.0.0.0:80
Listen [::0]:80
To
Listen 0.0.0.0:8080
Listen [::0}:8080

Change
ServerName localhost:80
To
ServerName localhost:8080

You now need to Restart All Services.

restart-all-services

The URL for your installation of localhost will change from http://localhost/ to http://localhost:8080/.  The port number is very critical as part of the localhost URL from this point forward.

 

 

The next post in this series will show you how to easily install WordPress on this localhost implementation!

 

Facebooktwittergoogle_plusredditpinterestlinkedinmail

Leave a Comment