Upgrading WampServer from version 2.2 to version 3.0

WampServerIn order to do web development, it’s a good idea to have a local development environment setup. I had setup WampServer on my PC a couple of years ago when I launched my personal WordPress site. It made it much easier to experiment with changes in the WordPress setup and try out different themes.

Recently, I decided to get back into playing around with WordPress and trying some other programming ideas. When I checked the WampServer site, I noticed that they had moved to version 3.0, while I was still on version 2.2. I figured it was time to upgrade. Here are the steps and resources I used to complete the upgrade.

Preparing for the migration

Before downloading WampServer version 3.0, I did a little housekeeping to make sure I could keep my existing data.

  1. First, I made sure that my existing WampServer version 2.2 was still running and that my old websites would load. I hadn’t run WampServer since upgrading from Windows 7 to Windows 10. I ran into some problems with the IIS services running on port 80 and with WAMP binding to an IPv6 address. The latter prevented me from accessing phpmyadmin, which I needed for the next step.
  2. Instead of trying to migrate the MySQL databases by copying the ‘data’ directory, I decided to take the approach of exporting the databases from the existing install so I could import to the new install. The WampServer forum posts referenced below recommended the export/import method in order to avoid possible corruption of the database.
  3. I also noted the structure of each database and the users related to each so I could recreate the database setup after completing the upgrade.
  4. With those steps out of the way, it’s time to get down to business. Stop all services by left-clicking on the green WampServer icon in the system tray and selecting “Stop All Services” . The WampServer icon should be red.
  5. Remove the MySQL service by left-clicking the red WampServer icon in the system tray. Select MySQL -> Service -> Remove service.
  6. Remove the Apache service by left-clicking the red WampServer icon in the system try. Select Apache -> Service -> Remove service.
  7. Stop WampServer. Right click on the familiar red icon and select “Exit”.
  8. Rename the existing \wamp folder to \wamp-backup, or something similar. This is important just in case something goes wrong. It’s always a good idea to have a backup, and it allows for a clean install of the new version.
  9. Download the latest WampServer files from the WampServer site.

Installing WampServer Version 3.0

Once the WampServer install package is downloaded, go ahead and run it, being sure to right click on the installation file and select “Run as administrator”.

  1. Note the instructions. There are references to Visual C++ runtime libraries that need to be installed. To see if these are installed, go to Add/Remove programs and look for Microsoft Visual C++. In my case, I was missing a couple of these, so I followed the links in the WampServer install package to install them.
  2. After verifying the prerequisites, proceed with the installation process. I followed their recommendations for the file locations. After doing this, wait for install to complete. It will take a couple of minutes.
  3. Once the install is complete, open the directory where you installed WampServer, and run the wampmanager application. WampServer will startup. You’ll see the red icon appear in the system tray, and it will cycle through orange to green, which means that the apache server is running. Open a browser and go type ‘localhost’ on the URL address bar. You should see the screen below, which indicates your WampServer is indeed operational.

WampServer - LocalHost screen

Now let’s restore our old data and get the websites back up and running.

Restore website and databases

Now that WampServer is running, and Apache is operational, it’s time to restore the previous data. I had a few local WordPress sites, and some test PHP files. I chose to start with the test PHP files since these were a lot less complicated, and then restore the MySQL WordPress databases. Here are the steps I followed.

  1. Copy the virtual hosts from the old installation, in bin\apache\apache2.2.22\comf\extra\httpd-vhosts.conf, to the new virtual hosts file, in bin\apache\apache2.4.23\conf\extra\httpd-vhosts.conf. For the time being, I decided to leave the default Apache settings from the default httpd.conf file installed with WampServer 3..0 which limits access to the file system to the local user.
  2. Copy over the website directories in the ‘www’ directory of the prior installation to the new WampServer installation.
  3. Restart the apache services to pick up the new vhost configuration. I loaded in my test directory, and had to do a couple of directory root changes in the vhost file. After that, I got a sample phpinfo() command running that displayed the following:
    WampServer version 3 - phpinfo
  4. Now it’s time to import the old databases into MySQL. To do this, access phpMyAdmin by left clicking on the WampServer icon in the system tray and selecting ‘phpMyAdmin’. At the login screen, the default user is ‘root’, and the password can be left blank (these values can be changed later, if desired). Now load the database(s) that were exported earlier, and make sure that the users have been recreated to ensure access.

Now you can load the website(s) that depend on database access. In my case, I was able to reload my local WordPress websites. While I ran into a few glitches, the process overall was relatively painless for a software upgrade.

Resources referenced

Here are the resources I used to complete the upgrade. I would strongly advise skimming these, at a minimum, before proceeding with an upgrade.

  1. The WampServer site – http://www.wampserver.com/
  2. The steps outlined in this stackoverflow post, titled Best way to Upgrade wamp 2.0 to 2.5, was helpful. Even though it didn’t apply to the exact versions I was moving from and to, the general outline provided in the accepted answer was close enough to get me most of the way there.
  3. The WampServer forum post, titled Installing a new release of WAMPServer, had useful tips about installing a new release of WampServer.
  4. The WampServer forum post, titled WAMPServer 3 All you need to know, also had a number of very useful tips in it.

UPDATE: Getting things to work on Windows 10

If you run into a problem getting Apache to run on Windows 10, it could be due to another process listening on port 80. There are two ways to go about fixing the problem:

  1. Find the program that is listening to port 80. Skype has been labeled as one particular culprit, but IIS is another process that runs by default that likes to occupy port 80.
  2. Change the Apache settings through the httpd.conf file to listen on a port other than port 80, such as port 8080.

My personal preference is to use step number 1, and to find out what has port 80 tied up. In my case, it was IIS that runs more or less by default in Windows 10. In order to turn it off, you need to open an elevated command window (means running CMD as administrator) and stop the IIS server. You can do that with the following command:

C:\> iisreset /stop

I’ve found that I have to run that command the first time I start wampserver after a reboot of the computer. Keep this in mind as part of the upgrade process.


Dislcaimer: these steps applied to my specific situation and setup. I am not a WampServer guru. I am documenting these for my personal use in case I need to remember and recreate what I did. You are more than welcome to reference these steps, but keep in mind that they may or may not work for you depending on the specifics of your setup. What I’m trying to say, in not so many words, is that I’m more than happy to entertain questions, but I cannot guarantee timely and accurate responses.

One thought on “Upgrading WampServer from version 2.2 to version 3.0

  1. Pingback: 2021 - Year in review for the blog - Gregg Borodaty

Leave a Reply

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