LAMP Stack
Build a complete LAMP stack — Linux, Apache, MySQL and PHP — step by step, tested on real servers across every Ubuntu and Debian release.
The whole build on one page
Every step below, start to finish, in a single guide — the fastest route if you are building from a clean server right now.
Tested on Ubuntu 26.04
The Ultimate LAMP Stack Guide for Ubuntu 26.04 (Step-by-Step)
Install a complete LAMP stack on Ubuntu 26.04 in one guide. Covers Apache, MariaDB, PHP, virtual host configuration, and free Let's Encrypt SSL setup.
4 steps for Ubuntu 26.04
Each step is its own tested guide. Follow them top to bottom, or jump straight to the part you need.
Install Apache
Install and configure Apache on Ubuntu 26.04. Covers firewall setup, VirtualHost configuration, and essential modules for a production-ready web server.
2
Install Database
Step-by-step guide to install MariaDB 11.8 (MySQL compatible) on Ubuntu 26.04. Secure setup with dedicated user/database. Optional Oracle MySQL.
3
Install PHP
Step-by-step guide to installing PHP 8.5 with Apache on Ubuntu 26.04. Includes module configuration, php.ini tuning, and a test page to verify your setup.
4
Secure with SSL
Install a free SSL certificate on Ubuntu 26.04 using Certbot and Let's Encrypt. Covers Apache configuration, auto-renewal, and HTTPS redirect setup.
You need a server first
Skip these if you already have a server you can reach over SSH.
Put the stack to work
Optional follow-ons once the steps above are done.
The same steps with Nginx in place of Apache — same database, same PHP, same Let’s Encrypt certificate at the end.