Setting Your Local Server
Setting Your Local Server
(XAMPP / WAMPP)
Prepared by EJ Antonio, MEng
Requirements
Setting up a locally-hosted environment is a crucial step in any web development project. Doing
this enables you to safely test your site’s features and functionality, on a site that’s completely
private.
In this module, we’ll explore how to use XAMPP to set up a local web server for developing and
executing your web applications. This involves three steps:
§ Installing XAMPP.
§ Running XAMPP and configuring your environment.
§ Executing your web applications
Introduction to XAMPP
If you want to mount WordPress locally you need a few key components. Which include web
server applications (such as Apache), programming languages such as Perl and PHP, and the
tools for database administration – MySQL. However it is time-consuming and difficult to mount
each of these components separately, and XAMPP is to the rescue.
XAMPP (a cross (x)-platform, Apache, MySQL, PHP, and Perl acronym) helps you to quickly and
easily install all of these components. You will then use XAMPP to install the configuration
required to run WordPress on a local computer. You can test plugins there, play with themes and
coding and execute other programming tasks in a secure manner.
Prepared by EJ Antonio
Installing XAMPP
Machine operating system (OS) is not an issue in installing XAMPP since it’s a cross-platform
application. There might be a little bit difference in installing the application. We’ll provide guide
for MacOS and Windows. To install XAMPP, be guided with the following steps:
First of all, you need to go to the website of Apache Friends (www.apachefriends.org) and
select the correct download button on the homepage:
Windows: Double-click on the downloaded installer file and follow the installations instructions.
Prepared by EJ Antonio
Prepared by EJ Antonio
Prepared by EJ Antonio
MacOS: Next, drag XAMPP into your Applications folder and follow the installations instructions.
Upon completion of the initial load sequence XAMPP will be mounted on your device.
Prepared by EJ Antonio
Step 3: Running XAMPP and Configuring its Environment
Start the Apache and MySQL, the rest are not needed for now. See figure below.
Prepared by EJ Antonio
Make sure that all of your services are running [General – Services – Network Port]
You should be able to see the status of your server – green (running / started) ; yellow status
(busy); and red status (not running / stopped)
Prepared by EJ Antonio
MacOS:
To access your file explorer, mount your files by clicking on “mount”. You can access your files by
clicking “Explore” or by clicking on your file Explorer.
Prepared by EJ Antonio
Now you can access your localhost, and continue using XAMPP as a server environment. To do
this, open your preferred web browser, and enter your localhost name (which would be
localhost:8080 in our case). That will light up the dashboard for XAMPP as shown below.
-----------------------
Since you made it, you deserve an Iced Cold Coffee. Have a break for now!
References:
https://www.hostinger.ph/tutorials/how-to-use-xampp-wordpress/
Prepared by EJ Antonio
Appendix A: Port Error Fixes
It should be mentioned that if you are running XAMPP on Windows, and another program on
your machine is using ports 80 or 443, you may encounter a port error. For example, the World
Wide Web Publishing Service program commonly uses port 80 and may cause a conflict with
XAMPP.
To resolve this, you’ll need to stop that service from running by doing the following things:
If this doesn’t resolve the issue, it may be caused by your Windows firewall. To forcibly unlock
your ports, you will need to set up a new firewall rule:
Prepared by EJ Antonio