Install PHP 8.1 on Alpine Linux

Jun 09, 2023 · 1 min read · Post a comment

The default Alpine package manager can offer the php 81 package, so the installation will be quick and easy.


  • Alpine Linux
  • sudo privileges

Install PHP 8.1 on Alpine Linux

Step 1. Update Alpine system packages.

sudo apk update

Step 2. Install PHP 8.1:

sudo apk add php81

Step 3. Verify installation.

php -v


PHP 8.1.20-r0


Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.