Introduction to the LAMP Stack

💡The shining represents the light that's in the darkness💡


The LAMP stack is a back-end tech stack that is usually used to run websites. The tech stack consists of:

  • Linux as the operating system
  • Apache for the HTTP server
  • MySQL for the database
    • Could also use MariaDB, which is a community-developed fork of MySQL
  • PHP for the backend language
    • Sometimes Python is used instead

This tech stack is comprised of open source software, which makes it great for low-budget projects. The stack is also relatively easy to get running, and if you're using Azure, AWS, or another cloud provider, you can get things started very quickly.

Explanations, Substitutions, and Alternatives

Different problems call for different solutions, which means you may not want to use those exact components every time. I've covered Python being a common PHP replacement, and MariaDB instead of MySQL, but it helps to know you have choices for each component, and it's also good to know why we use each component.

  • Linux
    • Linux is practically the symbol of free-and-open-source software (FOSS), and when you combine that with it's reliability... it's not hard to see why people choose Linux here.
    • Many people choose Windows for their servers, mainly because of the support that comes with Microsoft's OS and it's ability to work well with popular office products and the .NET ecosystem.
      • Some call this the "WAMP" stack.
  • Apache
    • Apache is the HTTP/web server software that runs on the operating system.
    • A common alternative to Apache is Nginx (pronounced Engine X), which then makes it the "LEMP" stack.
      • Nginx is typically faster than Apache, mostly due to Nginx not having to search the entire file tree for .htaccess files.
  • MySQL
    • The relational database management system (RDBMS) of choice in the LAMP stack is MySQL, or it's community-developed fork known as MariaDB
    • If you wanted a NoSQL option, MongoDB is available, and it still fits in the LAMP acronym.
  • PHP
    • The backend scripting language in the traditional LAMP stack is PHP. Although PHP has been losing popularity, or definitely not gaining it, it still is relevant and works great in the LAMP stack.
      • If you decide to make a WordPress server with the LAMP stack, you will likely be using PHP because WordPress was written in PHP and works really well with MySQL/MariaDB.
    • Python is a great substitute here, and if you're looking to practice your Python, a LAMP stack project using Python would be great.


The LAMP stack is a great stack, and it's a ton of fun to build a LAMP website in the cloud. You can find community VM images on Azure or AWS to assist in getting the LAMP stack going, but it's a better learning experience to build the stack from scratch (i.e. installing Apache, MySQL, etc.), which doesn't take long.