Home Linux HTML/CSS PHP React VR Blog T-Shirt Shop PHP Fiddle

Intro to LAMP: What is LAMP?

Watch the video tutorial for this lesson:

Intro to LAMP

Check out my blog:

Coding Commanders Blog

Linux/LampWhat is LAMP Stack?

This lesson teaches the components of LAMP stack (Linux, Apache2, MySQL, PHP).

LAMP: Linux, Apache2, MySQL, PHP

What is LAMP?

LAMP is a software stack used for web development. A software stack includes everything needed to support an application. A web development stack must include:

✶ Operating System
✶ Server
✶ Database
✶ Programming Language


Linux is an operating system. An operating system manages the interaction between a device's hardware and software. Windows and macOS are two commonly used operating systems. Linux is called a Unix-family operating system.

Unix is a multitasking operating system designed to be used by multiple users. Businesses often need several users, with different permissions, working on the same projects. Unix-family operating systems are conventional in the tech world. Linux is the most popular Unix-family OS.

Linux is also open-source. That means the source code is available to the public. The source code's availability makes Linux free and customizable. There are many versions of Linux. In this tutorial, we will use Ubuntu Server.

Learning Linux makes a programmer more marketable.


Apache is the most popular web server software. It is also open source.

A web server stores and transfers the data used to make websites. It has two parts: Hardware and Software. Both are simply called "servers".

Web server hardware is the actual machine, typically contained in a secure data center, that stores website data. Website data includes static files such as HTML, CSS, and image files.

Hardware is suitable for storage, but it needs software to make it work. Web server software makes the web work by using HTTP (Hypertext Transfer Protocol) to serve web pages to clients. HTTP is the rules for transferring web data.

When a client types a web address, it sends a request to the web server. The web server software will process that request and fetch the page data. Once fetched, the page data is served back to the client. The client's web browser (e.g., Firefox, Google Chrome, Dolphin) translates the data and displays the web page.


MySQL is a database management system. A database is an organized and secure way to store data.

Static files transfer to the client's computer, meaning the client can see all that data. That may be okay for a company logo or a blog article, but it is not okay for private data. Databases are a way to store information on the server securely. A database is a better solution for information such as passwords and account numbers.

It is also much more efficient to use a database for large or complicated sets of data. When working with large amounts of data or complicated data structures, databases are the way to go.

MySQL is an open-source relational database management system that uses SQL (Structured Query Language).

Think of MySQL as an Excel spreadsheet. There are columns and rows which make individual data entries. Each data entry is like a cell on a spreadsheet, and each database table is like an individual spreadsheet.

Relational databases allow data entries to be related to each other. Say there is a MySQL table called "Users" that has rows: user_id, username, email, password, and user_type. There is another table called "User_Types" that has rows: type_id, permission_1, permission_2, permission_3. The "user_type" row in the "Users" table can reference the "type_id" in the "User_Types" table to access the user's permissions.


PHP is a server-side programming language. It is a scripting language, meaning it is not compiled.

Server-side code executes on the server and not on the user's computer. PHP is used to interact with the database and write application logic. Logic is the code that makes the application work. PHP can be used to perform calculations and manipulations to data.

Looking for a more in-depth explanation? Watch the video below:

Color Selector



If you find my tutorials helpful, please consider donating to support my free web development resources.

The more money I raise, the more content I can produce.

Thank you,
Commander Candy