Working With Wamp Server To Create A Database And Host A Website

Introduction

WAMP Server is a server which is used to host PHP pages. PHP is a server-side scripting language developed by Rasmus Lerdorf.

WAMP stands for – Window Apache MySQL and PHP.
Developed by – Romain Bourdon
Operating system – Windows

Now we are going to discuss the steps for WAMP Server Installation.

Step 1:

WAMP Server download

In this website download WAMP Server 32 BITS & PHP 5.6.15.

On clicking the download link, the following window will open for download. In this click the following.


link
                                                 Figure 1: Direct link to download

After clicking that link the following downloading process window will open.

download
                                                Figure 2: Downloading Window.

Now your file is downloaded and save that *.exe file in your system drive location.

save
                                    Figure 3: Save the file

After the file has downloaded the following tray icon file is visible and stored at your system location

wamp
                  Figure 4

Step 2:

Now double click that exe file.

The following window will open

warning
      Figure 5: Security warning window for running process

Click Run button and the installation process window will open. First you have to choose the language default as English and then hit ok. Then the step up process wizard will open. In that window click Next button to proceed the installation.

Then the License agreement window will open, click I accept the agreement and then hit next. Next the set up information window will open, then hit next.

The destination location window will open to save where the WAMP folder wants to be located. By default it takes C:\wamp, then hit next and then Install button to install the WAMP Server.

install
                           Figure 6: Installation processed window.

After installation click finish button to navigate WAMP Server.

Now the orange color try Icon placed at the start menu is visible.

icon
                                             Figure 7: Tray Icon in orange color

The tray icon is visible in orange because there are two applications running at localhost using same port number, like 80. Left click the tray Icon, select local host and it shows the following window IIS.

If you face the error, then click the link to download the file (VCRUNTIME140.dll) as shown below and paste it into C:\Windows folder

api-ms-win-crt-runtime-l1-1-0.dll (cannot start error means)

wamp
                                                                                 Figure 8 

iis7
                                                                  Figure 9: IIS7

So now we are going to stop IIS port 80 or we could change the WAMPSERVER LISTEN PORT value 80 to 81 in the following way.

Left click the tray Icon and do the following steps

config 
                           Figure 10: httpd.conf

After selecting httpd.conf file one notepad window will open and search the text Listen by using CTRL+F.

port
                                                               Figure 11: Listen Port

Here change the listen portfrom 80 to 81.

Right click the tray Icon and choose refresh then left click the icon restart all services. Now your tray icon turned to green. WAMP Server is now ready.

Now left click the icon and choose localhost

The IIS logo window will open in your browser. In your address bar near your localhost mention the following like localhost:81, then the window will appear in the following manner.

homepage
                                                   Figure 12: WAMP SERVER home page

Step 3:

After installation is completed host a simple PHP website via WAMPSERVER. The following steps to be noted.

The folder of wampis placed into your C:\wamp system location.

In this wamp folder navigate to www root folder and there two files appear; one is index.php and another one is testmysql.php those files are built-in type files.

Now we have to place our sample website folder into that www root directory like the following:

directory
                              Figure 13: Place website folder into www root directory

Now refresh our localhost in browser and we find our sample website appears under projects title.

project
                                     Figure 14: Projects

Now click that folder in our browser and our sample project home page will open like this

sample
                                 Figure 15: Sample website home page.

Step: 4

Before you create your database in SQL server try to backup the file in *.sql format. In your WAMP Server home page PhpMyAdmin link appears. Click that link and the database connectivity form will open in the following format.

myadmin
                                                            Figure 16: PHP my admin page

Set the username as root and make empty password column and hit go. The admin page window will open like the following,

connectivity
                                 Figure 17: php my admin database connectivity page

After the page opens in your right side window, click database and choose to create database.

connection
                                                               Figure 18: Database creativity

Now your database will present at left side php mydmin page,

page
               Figure: 19

Choose your database and create table or you have to restore your SQL database.
Restore SQL Server database in the following format.

Click import link the following window will open

import
                                                         Figure 20: Import Database

In this window browse your *.sql backup file, choose character set and then hit Go button it takes some time to import so please be patient until the database is imported.

After importing you will get the following message box:

import
                                             Figure 21: Importing successful window.

Now your website is ready to connect the database and now browse your site in localhost:81

Enter your username and password and then hit to login,

login
                                   Figure 22: Login page

Read more articles on PHP:


Similar Articles