Your managed-hosting renewal landed in your inbox final week.
Yikes.
The quantity is greater than you bear in mind. Your $9-a-month plan is one way or the other $34 a month now. The advertising e mail known as it a “price adjustment.”
The value isn’t even the annoying half. The plan you signed up for 3 years in the past is now a distinct plan, and no person requested you. You’ll be able to’t ssh into the field. You’ll be able to’t change the PHP model with out submitting a ticket. The host doesn’t consider itself as renting you a server. It thinks of itself as renting you permission to run a web site.
LAMP remains to be the default PHP runtime on the general public internet. Over 4 out of each 10 web sites run a LAMP software known as WordPress. What modified during the last decade is that managed hosts wrapped LAMP in a management panel and began charging extra for much less of it. A VPS takes the management panel again off.
Putting in LAMP your self takes about 5 steps, plus one key choice (PHP-FPM, not mod_php) that almost all older tutorials get unsuitable. Right here’s precisely do it — and know whether or not self-managing is the correct name for you within the first place.
What Is a LAMP Stack?
A LAMP stack is the four-piece runtime that serves most PHP functions on the web. Linux for the OS, Apache for the online server, MySQL (or MariaDB) for the database, and PHP for the appliance code. It’s been the default open-source internet stack for the reason that early 2000s. Variations modified; the form hasn’t.
The “L” is versatile: Ubuntu, AlmaLinux, Debian, and Rocky all rely. Choose one and transfer on. For most individuals in 2026, the correct reply for a brand new deployment is Ubuntu 24.04 LTS. It’s the present default for brand spanking new installs, and loads of manufacturing servers nonetheless run 22.04 LTS, which stays supported into 2027.
As of June 2026, in accordance with W3Techs, PHP runs 70.8% of all web sites with a recognized server-side language. (Clearly, PHP isn’t useless.) WordPress alone powers 41.5% of all web sites, and it’s a LAMP software by design. In different phrases, should you run a WordPress website, you’re already working LAMP. You simply might not personal the server.
Operating LAMP on a VPS, versus shared or managed internet hosting, will get you three issues:
- Full root entry: You determine which PHP modules are put in, which Apache config to ship, and which port the database listens on.
- No tenant noise: A VPS will get a assured slice of CPU and RAM. Your visitors spike doesn’t compete with whoever else is on the host.
- Predictable pricing: A flat month-to-month price that doesn’t double when an “limitless” shared plan decides your CPU utilization is simply too excessive.
The price is that every little thing between the kernel and your software is now your job.
What VPS Do You Truly Want for a LAMP Stack?
A 4 GB VPS with 2 vCPU and NVMe SSD storage runs a typical LAMP software comfortably — a single WordPress website, small Laravel app, or a few low-traffic PHP websites. Scale up solely when the workload tells you to.
| Workload | RAM | vCPU | Storage | Tier notes |
|---|---|---|---|---|
| Single WordPress website, low-medium visitors | 2–4 GB | 2 | 40-60 GB | Stack 4 baseline |
| Multi-site company internet hosting (5–15 websites) | 4–8 GB | 2–4 | 80–120 GB | Stack 4 to Stack 8 |
| Excessive-traffic WordPress or WooCommerce retailer | 8–16 GB | 4+ | 100+ GB | Stack 8 or larger |
| Customized PHP app with a heavy database | 8–16 GB | 4+ | 100+ GB | Stack 8 or larger |
A couple of sizing notes value realizing:
- NVMe issues greater than folks anticipate. MySQL is writing continuously — the binlog, the InnoDB redo log, the desk information. Previous SATA SSD technically works, however you’ll really feel the slog the primary time you run a database import.
- RAM is normally the constraint. PHP-FPM holds employee processes in reminiscence; MySQL holds an InnoDB buffer pool. Run out of RAM, and the field begins swapping. And a swapping LAMP server feels damaged even when nothing technically is.
- Don’t over-provision on day one. Most operators measurement up for an imagined future load that by no means arrives. Begin on the workload-appropriate tier and scale whenever you hit a wall.
For many LAMP workloads, VPS Stack 4 is the correct baseline: 4 GB RAM, NVMe storage, full root entry, and unmetered bandwidth. Scale up when the workload tells you to.
How Do You Set up a LAMP Stack on a VPS?
A LAMP set up on a recent Ubuntu 24.04 LTS VPS takes about half-hour. The form is similar on AlmaLinux, solely the bundle supervisor differs (dnf as an alternative of apt). Debian makes use of apt, similar to Ubuntu.
Choose your OS first. Ubuntu 24.04 LTS is the default for many new deployments. Canonical ships LTS safety updates for 5 years, and most tutorials goal it. AlmaLinux is the correct name for a Crimson Hat-family system with out the RHEL price ticket.

1. Replace the system
Run sudo apt replace && sudo apt improve -y.
This pulls the present bundle index and patches the bottom OS to the newest safety launch.
2. Set up Apache
Run sudo apt set up apache2.
The bundle places a systemd service known as apache2 on the field, units it to autostart on boot, drops a docroot at /var/www/html/, and writes config to /and so forth/apache2/. Go to your VPS’s IP in a browser. Should you see the Ubuntu Apache welcome web page, you now have a working internet server.
Run systemctl standing apache2 to verify. A inexperienced “energetic (working)” line is what you need.
3. Set up MySQL or MariaDB
Run sudo apt set up mysql-server (or mariadb-server).
Then, run sudo mysql_secure_installation to set a root password, drop nameless customers, take away the take a look at database, and disallow distant root login. Skipping mysql_secure_installation is the most typical beginner mistake — don’t skip it.
If mysql_secure_installation retains looping on the basis password, your root consumer is on auth_socket (the Ubuntu default). Change it first with: ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your_password'; then run the script, and swap again afterward should you favor socket auth.
Nonetheless deciding between MySQL and MariaDB? For many PHP apps, the selection is irrelevant. Choose MariaDB in order for you a permissive open-source license. Go along with MySQL in case your software’s docs assume it. One sensible exception: should you’re migrating from a managed host that ran MySQL 8.0, keep on 8.0. The utf8mb4_0900_ai_ci collation was MySQL-only till MariaDB 11.4.5 (early 2025) added it as a compatibility alias, so charset edge instances can nonetheless chew you on older MariaDB builds.
4. Set up PHP and required modules
Run sudo apt set up php php-mysql php-curl php-mbstring php-xml php-zip.
Completely different apps want completely different modules. WordPress recommends php-imagick for picture processing (php-gd works as a fallback). Laravel wants php-mbstring, php-xml, and php-bcmath. Test the app’s docs if uncertain.
5. Wire PHP to Apache by way of PHP-FPM
Why PHP-FPM as an alternative of mod_php? Mod_php embeds the PHP interpreter inside each Apache course of. That’s high quality for a single low-traffic website. However at scale, each Apache employee holds a replica of PHP in reminiscence, whether or not it’s serving a PHP request or a static picture. RAM will get wasted, and efficiency flattens.
PHP-FPM separates the 2. Apache stays lean and proxies PHP requests to a FastCGI course of pool you may tune independently. For a 4 GB VPS working WordPress, the result’s decrease reminiscence stress beneath visitors and higher tail latency when visitors spikes.
That is the place most older tutorials get it unsuitable. The fashionable advisable setup is PHP-FPM with the Apache occasion MPM, not the previous mod_php.
Right here’s the wiring on Ubuntu 24.04 (PHP 8.3):
# Set up the FPM runtimesudo apt set up php8.3-fpm
# Drop mod_php and the prefork MPM, swap to the occasion MPMsudo a2dismod php8.3
sudo a2dismod mpm_prefork
sudo a2enmod mpm_event
# Hand PHP requests to FPM over a FastCGI proxysudo a2enmod proxy_fcgi setenvif
sudo a2enconf php8.3-fpm
# Apply itsudo systemctl restart apache2
# Verify the wiring tooksudo apache2ctl -M | grep mpm # ought to present mpm_event, not mpm_preforksudo systemctl standing php8.3-fpm # needs to be energetic (working)
A phpinfo() web page will now report Server API: FPM/FastCGI. Should you’re on a distinct PHP model, swap the 8.3 within the instructions to match.
For pool tuning (employee counts, reminiscence limits, socket vs. TCP), The official PHP-FPM set up docs go deeper. The Ubuntu Apache set up docs and the DigitalOcean LAMP tutorial are useful part references for a second angle.
Notice: The DigitalOcean tutorial references an Ubuntu 22.04 server; on the time of writing, the knowledge is appropriate for Ubuntu 18.04 and above.
How Do You Safe a LAMP Stack After Set up?

A recent LAMP set up isn’t production-ready. These 5 steps cowl the ground:
- Firewall the field: Use UFW (Uncomplicated Firewall, Ubuntu’s built-in firewall entrance finish) to permit solely ports 22 (SSH), 80 (HTTP), and 443 (HTTPS). Two instructions:
sudo ufw enable OpenSSH && sudo ufw enable "Apache Full", thensudo ufw allow. - SSH-key-only logins: Push your public key with ssh-copy-id, then disable password authentication in /and so forth/ssh/sshd_config: PasswordAuthentication no. Bots scan the web for password-auth SSH all day. This single change eliminates the overwhelming majority of brute-force makes an attempt.
- Run
mysql_secure_installation: Should you skipped it throughout set up, run it now. - Add Let’s Encrypt SSL: Set up Certbot and run
sudo certbot --apache. Your website goes from HTTP to HTTPS in 5 minutes. Certificates auto-renew by way of a systemd timer. (Sure, this actually is one command. Sure, most managed hosts cost additional for it.) - Patch on a schedule: Set up unattended-upgrades and configure it to use safety patches mechanically. Set this as soon as. Skip it, and you discover out a couple of CVE since you obtained hacked.
That’s the ground. Something extra (fail2ban, ModSecurity, intrusion detection, and off-box backups) is sweet apply, however not required to ship. For OS-level hardening, Ubuntu’s server safety documentation covers it nicely.
Moderately not personal all of this? DreamHost’s managed VPS plans deal with patching, monitoring, and backups for you.
How A lot Does Operating LAMP on a VPS Value vs. Managed Internet hosting?
A self-managed LAMP VPS runs roughly the price of an entry-level managed plan, however removes each per-site payment, e mail surcharge, and renewal-creep ceiling. The trade-off is the ops work (patching, backups, monitoring) that managed plans deal with for you.
| Method | What you pay for | What you management |
|---|---|---|
| Shared/managed internet hosting | Pre-configured stack, assist, uptime SLAs, backups | Your app and content material |
| Self-managed LAMP VPS | The field and bandwidth | The OS, the stack, each config, each website |
| Devoted server | An entire bodily machine | Identical as VPS, plus the {hardware} |
The trustworthy price of ops, in human time: a clear LAMP VPS wants about half-hour a month of consideration should you’ve automated patching. That’s lower than the time most individuals spend choosing what to observe on Netflix on a Sunday night time.
The quantity no person publishes is what managed internet hosting truly prices three years in. The renewal-creep sample most operators hit seems to be like this.
- Yr 1: $9/month introductory price
- Yr 2: $19/month — “price adjustment”
- Yr 3: $34/month, plus $3 for SSL, plus $5 for day by day backups, plus $15 a 12 months for WHOIS privateness.
At DreamHost, we value our VPS plans to remain flat — no per-site charges, unmetered bandwidth, and full root entry at a predictable month-to-month price.
When Does Operating LAMP on a VPS Make Sense?
Operating LAMP on a VPS is sensible whenever you’ve outgrown what shared or managed internet hosting offers you, and also you’re comfy proudly owning what they used to deal with.
Good suits:
- Leaving managed internet hosting: Value hikes, CPU throttling, or plugin restrictions you didn’t conform to.
- Operating a PHP app: WordPress, Laravel, Magento, Drupal, or a customized codebase that wants predictable sources.
- Company internet hosting a number of websites: Per-site charges on managed plans get absurd at scale.
- Wanting `ssh`, `wp-cli`, and `git`: The instruments you truly use to run a website.
When LAMP on a VPS isn’t the correct name:
- Actual-time apps with heavy WebSocket visitors: Node.js handles persistent connections higher than LAMP’s request-response loop.
- Microservices with autoscaling wants: Containers and Kubernetes match higher whenever you spin situations up and down on demand.
- Zero Linux consolation and no plans to construct it: Keep managed.
A helpful self-test: Should you can ssh right into a server and browse a config file with out panicking, you may run LAMP. If that sentence felt complicated, your managed host is doing actual give you the results you want — and that’s not a foul factor.
When Ought to You Keep on Managed Internet hosting As a substitute?
Keep on managed internet hosting if any of those sound acquainted:
- You don’t have the technical workers who can troubleshoot a systemctl log if WordPress goes down on a Saturday night.
- You don’t need to write a backup script or audit one a buddy wrote.
- Uptime is mission-critical, and also you don’t have somebody on rotation who can reply to a web page.
- You’d save extra in time than you’d spend. A marketing consultant billing $150 an hour and spending two hours a month on server upkeep is paying $300 for the privilege of self-managing. A $30-a-month managed plan seems to be nice at that math.
Someplace round $50 to $80 a month in managed charges, paired with minimal sysadmin consolation, the mathematics begins favoring self-managed. Under that, managed is ok.
Wrapping Up
LAMP on a VPS is sensible whenever you need management and predictable price greater than you need zero ops work. The set up is about half an hour. The hardening is one other half hour.
The laborious half is deciding whether or not the trade-off is value it.
Keep in mind the renewal e mail on the prime of this information. A number quietly determined the shopper wouldn’t discover when a $9 plan was $34. A self-managed LAMP VPS doesn’t make pricing adjustments unimaginable, but it surely takes the stack itself off the desk. The PHP model, the firewall, the SSL cert, and the backup script. These are configurations you personal, on a field you management.
Self-hosting your LAMP stack is only a factor you are able to do now. It used to require a closet stuffed with {hardware} and a static IP out of your ISP. Now, the {hardware} is rented for the value of a few coffees, and the static IP comes with the field.

Personal Your Total Stack. Apps, AI, Databases, and Extra.
Maintain each credential and dialog on a server you management, with NVMe velocity and unmetered bandwidth inbuilt.
Steadily Requested Questions About LAMP on a VPS
Is the LAMP stack nonetheless related in 2026?
Sure, the LAMP stack remains to be related in 2026. PHP runs 70.8% of all web sites with a recognized server-side language, and WordPress alone, a LAMP software, accounts for 41.5% of all web sites. LEMP and fashionable JavaScript stacks have eaten share for high-concurrency real-time workloads, however for typical PHP apps and content material websites, LAMP remains to be the default.
How a lot RAM do I want for a LAMP VPS?
A 4 GB VPS handles a typical LAMP software: a single WordPress website, a small Laravel app, or a number of low-traffic PHP websites. DreamHost’s VPS Stack 4 is sized for that baseline. Step as much as 8 GB for multi-site company internet hosting or a high traffic WooCommerce retailer. Plan for 16 GB on a heavy-database customized PHP app.
Can I run WordPress on a self-managed LAMP VPS?
Sure, WordPress runs natively on LAMP as a result of LAMP is what it was constructed on. The set up is a digital host, a MySQL database, the WordPress information in /var/www/, and WP-CLI for command-line administration. Managed WordPress hosts run this similar stack beneath their management panel. The distinction is that you could see and tune each layer on a self-managed VPS.
Do I want root entry to put in LAMP on a VPS?
Sure, you want root or sudo entry to put in LAMP on a VPS. Most managed and shared hosts don’t provide you with root, which is why the query issues. In case your present plan blocks sudo apt set up, you’re on a managed plan, and a LAMP set up on that plan isn’t doable with out transferring.
Ought to I set up LAMP manually or use a one-click picture?
Set up manually if you wish to perceive what’s working in your field. One-click pictures and meta-packages like tasksel are high quality for prototyping, however they conceal the alternatives: which PHP modules are put in, whether or not PHP-FPM or mod_php is wired up, and what the firewall seems to be like. The 30 to 60 minutes handbook set up prices pay again the primary time one thing breaks at 11pm.
What’s the distinction between LAMP and LEMP?
LEMP swaps Apache for Nginx (the “E” is pronounced engine-x). Identical Linux, similar database, similar PHP — completely different internet server. Nginx handles high-concurrency static visitors higher. Apache wins on .htaccess flexibility and out-of-the-box WordPress compatibility.
In accordance with W3Techs, Nginx leads internet server market share at 31.8%, with Cloudflare Server at 28.5% and Apache at 23.2% (as of June 2026). Nginx is the brand new default for API-heavy or static-heavy deployments. Apache remains to be the higher alternative in case your software expects .htaccess guidelines, which most off-the-shelf PHP apps, together with WordPress, do.
Did you take pleasure in this text?










