A Beginner’s Guide To LAMP Stacks

14th June, 2019 by

The tech world is nuanced and complicated, drenched in abbreviations and generally written with insiders in mind. As a subsection of that world, web development can appear especially confusing to outside observers. Acronyms and technical terms bounce around like basketballs, potentially making your head spin if you’re not already an expert.

Turning on the LAMP

One frequently used piece of industry jargon is LAMP stacks. These sets of open-source software are used to create websites and build web applications. Some of today’s most popular open-source web applications run on LAMP: WordPress is a prime example, while Wikipedia uses an adapted LAMP stack setup.

As the capitalization suggests, LAMP is one of those acronyms mentioned earlier. Not all modern LAMP stacks are limited to the same quartet of components, but four specific elements have become the norm in such software stacks. Each letter represents one of the software components which combine to create the stack:

  1. Linux operating system.
  2. Apache HTTP Server.
  3. MySQL relational database management system.
  4. PHP programming language.

Stacked Actors

The simplest way to think of LAMP stacks is as a four-layer stack, all working harmoniously together to make a website or application:


The operating system is the foundation of any stack since all the other layers run on top of it. Linux is a good choice of OS as it’s open source, has a worldwide user base, and is more flexible than alternative options.

Apache HTTP Server

Web server software sits one layer above the OS, and it is responsible for translating from web browsers to the correct website. It processes requests and serves up web assets via HTTP.


This relational database management system sits on top of the OS, alongside the web server software. It stores details that can be queried by scripting to construct a website, and MYSQL is suitable even for large or complex sites.


This scripting layer operates on top of the other three. Sites can’t use HTML to perform dynamic processes, so PHP code is dropped into the relevant parts of pages.

In practice, the operation of LAMP stacks follows a fairly linear path:

  1. The Apache web server receives requests for web page data from a user’s browser.
  2. If the request is for a PHP file, Apache passes the request to the PHP layer.
  3. The PHP layer loads the file and executes the code within it.
  4. The PHP layer also communicates with the MySQL layer to fetch any data referenced in the code.
  5. The PHP layer uses the code and data to create the HTML permitting browsers to display web pages.
  6. PHP passes the data back to Apache, to send to the browser.
  7. Any new data can be stored by the MySQL layer.
  8. All of the above is enabled by the Linux layer at the base of the stack.

Variations on a theme

LAMP stacks refer to any generic four-layer software stack model. They don’t have to use the same components, and names vary subtly according to the substitution of different platforms. A huge variety of components could be introduced into a stack, but most developers generally stick to open-source components. Some common variants include:

  • WAMP – a stack which replaces the Linux operating system with Windows.
  • WIMP – Where IIS is also introduced in place of Apache.
  • WISA – SQL and ASP.net are used instead of MySQL and PHP.
  • MAMP – A software stack using MacOS.