LEMP stack VPS

nginx, PHP-FPM and MariaDB, configured so .php files run straight away. You upload the app, create its database and add HTTPS.

Who it suits

PHP applications other than WordPress: Laravel, a hand-built site, an app moving over from shared hosting. For WordPress itself, the WordPress app also creates the database and downloads WordPress for you.

Which plan

Budget (2 GB) runs a typical PHP site together with its database. Move to Standard when the database or the traffic grows; MariaDB is usually the first thing to want more memory.

What we install

nginx with PHP-FPM and MariaDB, configured so .php files run out of the box. The PHP and MariaDB versions are the ones your distribution ships. The database root account uses socket login, so only root on the server can use it.

$ apt Debian family (apt)
  • nginx
  • mariadb-server
  • php-fpm
  • php-mysql
  • php-cli
  • php-curl
  • php-gd
  • php-mbstring
  • php-xml
  • php-zip
$ dnf Red Hat family (dnf)
  • nginx
  • mariadb-server
  • php-fpm
  • php-mysqlnd
  • php-cli
  • php-gd
  • php-mbstring
  • php-xml

From order to ready

  1. Server ready. We email you when the server is running, and you can log in with SSH. The installer starts on that same first boot.
  2. Installer running. It logs to /var/log/vps9-setup.log; tail -f it to watch.
  3. Application ready. This can be minutes after SSH works. The installer writes its exit code to /var/lib/vps9-setup.exit; a value of 0 means installation succeeded. The stack is ready when http://<your IPv4>/ answers from nginx and a test .php file in /var/www/html runs.

What you still do

  1. Upload your PHP app to /var/www/html.
  2. Create a database and user with mariadb as root.
  3. Add HTTPS with certbot --nginx -d example.com.

Exposure and security

Ports 80 and 443 are open for nginx. MariaDB listens on localhost only, and its root account logs in through the Unix socket, so there's no database password to guess. There's no admin page to claim.

Backups and upgrades

We turn on automatic security updates: unattended-upgrades on Ubuntu and Debian, dnf-automatic on AlmaLinux, Rocky Linux and Fedora, security fixes only, once a day. PHP-FPM restarts when an update replaces code it runs; the server never reboots by itself, so reboot after kernel updates. Other updates are yours, and a distribution upgrade can bring a new PHP version, so test your app afterwards. rack4.io/help/php2shell-check-and-patch-php shows how to check PHP is patched. Back up the database with mariadb-dump and your web root, and copy both off the server. We run the hardware, the network and the first-boot install; after that, LEMP stack is yours to run, and we don't manage or update it for you. Off-site backups of the whole disk are an optional paid add-on; they copy the disk as it is at one moment, so keep the app's own backups as well.

Ready when you are

Order a server