Skip to main content
.com domains from $2.99 — WHOIS privacy at no extra charge

How-to · Advanced · one hour

How to Install a LAMP Stack

Linux, Apache, MySQL and PHP, serving real pages from a bare server — a practical, jargon-free walkthrough with the classic mistake flagged before you make it.

Straight answer first

In a line: Linux, Apache, MySQL and PHP, serving real pages from a bare server — a advanced-level task that takes one hour.

The walkthrough below covers every step, the mistake most people make, and the shortcut worth keeping. On Hosting Seller plans several of these steps are already done for you, and we say where.

Written by the Hosting Seller staff · Checked 1 August 2026

Advanced

Difficulty level

one hour

Time to allow

5

Stages

24/7

Help at any hour

This guide assumes no expertise at all — just a hosting account, a browser and one hour of attention. Every instruction works on our platform exactly as written, and carries over to any standard cPanel host.

One promise before you start: nothing in this guide is irreversible. Where a step could bite, we say so and give you the undo.

The route, start to finish

From start to finish, you will install the three components, run the database security script, write the virtual host, get a certificate with certbot and test with phpinfo, then delete it.

Each stage is a few minutes of steady clicking — the time it takes depends mostly on how familiar the control panel already feels. The detailed steps sit further down this page; skim the whole route once before you begin.

Where this goes wrong, and how not to

The phpinfo.php nobody removed. The test file that proved the stack works sits there in public, cataloguing versions and paths for anyone curious enough to look. Verification files are for deleting.

Forewarned really is forearmed here. This one mistake accounts for most of the frustration the subject produces, and it is entirely avoidable once somebody names it.

The shortcut, straight from the support desk

Ask yourself whether you want this hand-built at all. A control panel, or our managed options, looks after the stack for you. Hand-built LAMP is excellent for learning and control, and it makes every future update your own job.

It costs a minute now and pays that back every time the job comes round again — which, like most hosting jobs, it certainly will.

What runs by itself here

Several steps in this guide exist only because hosting historically made you do them. On our plans SSL issues itself, backups run daily without being asked, and one-click installers replace the manual setup entirely. What is left is the part that is genuinely yours.

Stuck halfway through at an odd hour? That is exactly what round-the-clock human support is for — tell us where you are in this guide and we will pick it up from there.

Cloud servers wired together to run VPS infrastructure

The hosting this guide is written against

Every walkthrough on our how-to shelf is tested on the platform we actually run — cPanel, LiteSpeed, NVMe, one-click installs — so the instructions match your screen instead of gesturing vaguely at it.

Backups run every day on every plan, and putting a file or a database back takes one click from the panel.

  • Step by step, tested exactly as printed
  • The snag flagged before you reach it
  • The dull steps are already automated
  • People on hand at any hour if you stall

Why Hosting Seller

On every plan, as standard

Works exactly as written

Every step tested on the platform we run — no 'your host may differ' hand-waving anywhere.

Written from real tickets

Our guides come off the support desk, so the snags flagged here are the ones people genuinely hit.

Automation where it belongs

SSL, backups and installs run themselves here, so the guide covers only what is genuinely yours to do.

No jargon toll

Terms are explained where they appear or linked to the glossary — nothing assumes you already know.

The undo is always named

Where a step could bite, the guide says so and tells you how to put it back again.

5 steps, no filler

Each stage is a few minutes of steady clicking, with the fiddly parts marked as fiddly.

First Steps

From choosing to live

  1. 1

    Install the three components

    Apache, MariaDB or MySQL, and PHP-FPM with the common extensions, all from the distribution's repositories. One package-manager line each on a fresh server.

  2. 2

    Run the database security script

    mysql_secure_installation sets the root password and clears out the test artefacts left behind by the packages. Two minutes, and not a step to skip.

  3. 3

    Write the virtual host

    A site config mapping your domain to its document root, enabled and reloaded. Apache now answers for the name rather than only for the bare address.

  4. 4

    Get a certificate with certbot

    Let's Encrypt's certbot issues, installs and schedules renewal in a single command. HTTPS from the first hour, and it maintains itself thereafter.

  5. 5

    Test with phpinfo, then delete it

    A phpinfo file confirms the whole chain works. Delete it the moment it has, because it advertises versions and paths that attackers enjoy reading.

In the Box

Packed with every plan

  • PHP versions picked per site from the panel
  • DDoS filtering handled out at the network edge
  • SSH, Git and Composer on the plans built for developers
  • Site migration done for you by our staff, at no charge
  • Real people on the counter, every hour of every day
  • Spam and virus filtering fitted to every mailbox
  • Webmail in the browser plus IMAP, POP and SMTP for your own client
  • The Softaculous installer for one-click application setup
  • NVMe SSD storage on every shelf, not just the top one
  • A 30-day money-back guarantee on every hosting plan

Across the Counter

The questions we get asked most

Should I use Apache or nginx?

Both are excellent. Apache's .htaccess flexibility suits shared-style workflows and matches most tutorials you will find. nginx's model shines under heavy concurrency. For a first VPS stack, the sheer weight of Apache documentation makes it the smoother road.

How do I put a second site on the same server?

Another virtual host. Each domain gets its own config block and document root on the same stack. One VPS happily serves a good number of modest sites; resource contention rather than configuration sets the practical limit.

What if the site outgrows the plan I bought?

You move up in place. Plan changes are made from the client area with no migration and no downtime, and the range runs from small shared accounts through VPS to whole dedicated servers. Growing becomes a line change on your account rather than a hunt for a new host.

Where do the servers actually sit?

Our hosting runs from European datacentres with London at the centre, behind server-level caching that keeps cached pages quick for visitors anywhere. For most sites the build of the platform — NVMe disks, LiteSpeed, sensible numbers of accounts per machine — decides the speed far more than the postcode does.

Does hosting come with mailboxes?

It does — mailboxes on your own domain ship with every hosting plan, with webmail, IMAP, POP and SMTP access and spam filtering fitted as standard. There is also standalone email hosting for domains whose website lives somewhere else entirely.

How quickly can I be up and running?

Minutes, not days. The account opens the moment the order clears, the domain — free for year one on annual plans — attaches straight away, and the one-click installer puts WordPress or any of 400+ applications on the page before you leave your chair. Already have a site elsewhere? Hand it over and we move it free, usually inside a day.

Are backups included, and can I put one back myself?

A backup is taken daily on every plan, and the restore is yours to run from the panel in minutes — files, databases or both, at three in the morning without waiting on a ticket. Keeping your own copy offsite as well is never a bad habit, and nothing here stops you.

Packing up and moving host? Take our checklist.

A plain running order for a move nobody notices: what to copy first, how to carry email across without dropping a single message, when to point DNS, and the two slips behind nearly every hour of downtime we get called about.

One email carrying the checklist, then the odd note on running a site well. Step off the list whenever you like — our privacy policy spells out the rest.

Your site is worth better hosting.

Free SSL, a free move in, renewals charged at the order price, and human support around the clock. That is the whole offer.

See the plans