Servers

How to install a LEMP or LAMP stack

~5 min read

After connecting a server, install the web stack: web server (Nginx or Apache), PHP, and a database. DeployFly handles the entire installation with one form and streams real-time logs.

Before you start

  • Server successfully connected (see: How to connect your first server)
  • A clean Ubuntu server with no existing web server installed

Steps

  1. 1

    Open the Install Stack screen

    Open your server. If it has no stack yet, you'll see an "Install Stack" prompt on the overview. Otherwise, click the "Install" tab in the server sidebar.

  2. 2

    Choose your web server

    Select Nginx (recommended for performance and modern PHP apps) or Apache (better for legacy apps that use .htaccess). You cannot change this later without reinstalling.

  3. 3

    Select your PHP version

    Choose PHP 8.3 for new projects. For older apps (WordPress pre-6.x, Laravel <9), PHP 8.1 or 8.0 may be safer. You can install additional PHP versions later.

  4. 4

    Choose your database engine

    Select MySQL 8.0 or MariaDB 10.x. Both are fully compatible with WordPress, Laravel, and most PHP apps. MariaDB is slightly faster for read-heavy workloads.

  5. 5

    Enable optional extras

    Toggle Redis to install a cache and session store. Toggle Memcached if your app specifically requires it. Enable Supervisor if you plan to run background workers.

  6. 6

    Click Install Stack and watch the logs

    Click "Install Stack". A real-time log stream appears showing every package install and config step. The full installation takes 2–5 minutes depending on server speed.

  7. 7

    Confirm installation

    When you see "Stack installed successfully", the server is ready to host applications. The overview now shows your running services.

Watch out

  • Do not run the stack installer on a server that already has Nginx, Apache, MySQL, or PHP installed manually — it may conflict with existing configuration.

Tips

  • Install Redis even if you don't need it immediately — it's used by Laravel queues, WordPress caching plugins (W3TC, WP Rocket), and PHP session storage.
  • You can install multiple PHP versions (e.g. 8.1 and 8.3) on the same server — each app picks its own version.

Related guides