Step-by-Step: Setting Up a Local Host or Server on Computer

In the case of the web, the server is the place from where the web pages are served or hosted. And a local server is a type of server that works on a local machine.

If you want to do web development work on your computer, you have to setup a local host or local server on your computer.

Today we will discuss how to setup a local host or server on a computer.

Local host software

There are several popular localhost softwares. Like WAMP, MAMP, LAMP and XAMPP, here WAMP is Windows Apache MySQL PHP. MAMP is Macintosh Apache MySQL PHP, LAMP is Linux Apache MySQL PHP.

XAMPP is Cross Apache MySQL PHP Perl. . As XAMPP is cross platform, we will use XAMPP.

You can download it directly from https://www.apachefriends.org/download.html, or you can search in Gulole with download XAMPP.

xampp-server-download

Installing XAMPP on PC

It’s time to install the local server after downloading it. Installing it is similar to installing any other application; however, occasionally you need to check. We have created a video about the localhost application, which is provided below. The instructions are also provided in picture form.

After the setup file has been downloaded, double-click it and give it some time. When the XAMPP local host installation begins, the Setup XAMPP window will pop up, as seen below.

xampp-set-up-wizard

Click on the Next button here. We have to take a look at the window called Select Components.

xampp-setup-select

In this step, if you want, you can directly click on Next. But if you think that you will customize and install.

So you have to decide what you want. Untick the ones you don’t need. Now click on the Next button. Another window called Installation Folder will appear.

xampp-select-directory

By default, it wants to be installed on C-Drive, but I prefer not to install it on C-Drive. Because if, for some reason, your Windows operating system does not work, then you may not be able to get back your web projects.

So if it is installed on another drive, your projects will be fine even if you update the operating system.

So we have to set up on another drive, click on the icon of the folder on the right side of Search for Folder in the window called Installation Folder, and choose the folder to set up.

I decided to put the setup in a folder called Server on the D drive. See the picture below.

xampp-select-drive_

After fixing the folder in another drive, click on Next. After that, go through the next window that will appear. At the end, click on the Finish button, the setup is done.

Running Xampp Control Panel

After a while, you will see that the XAMPP Control Panel is open. If not, open it from Start. Now click the Start button on the right side of Apache under Module of XAMPP Control Panel.

This will run Apache, and the first time it needs to grant Apache access to the Windows firewall. Click on Allow Access when it comes in front of you.

xampp-control-panel

Start MySQL at the same time. The first time it will also ask for Windows firewall access, grant it. You will see that Apache and MySQL are light green.

Now open the folder in which you have installed the local server; inside it you will find a folder called htdocs. Place your web projects inside this folder.

Now type http://localhost/ in the address bar of your web browser and press Enter. You will see your local server files.

If it happens that you have placed your project file inside another folder inside htdocs, type http://localhost/ followed by that folder name and press Enter. eg http://localhost/newproject/

Leave a Comment