Advanced Guides

Migrating from official PHP images

Migrating from the official PHP images to serversideup/php is easy because our images are based on the official PHP images. We just give you a "batteries included" experience that's ready for production.

Key differences

Because our images run as www-data by default, you may need to update file permissions for mounted volumes.
Official PHP Imagesserversideup/php
Base Operating SystemDebian, AlpineDebian, Alpine
PHP CompilationPHP Source CodePHP Source Code (based on official PHP images)
Run PHP, pinned to the minor version
Multi-arch support
Init SystemDocker CMDDocker CMD or S6-Overlay
Published RegistryDockerHubDockerHub, GitHub Packages
Unprivileged by default
Variable-first configuration
Includes composer
Includes install-php-extensions
Production-Ready by default
Built-in security optimizations
Optimized for Laravel & WordPress
NGINX + FPM variation
FrankenPHP variation
Native health checks
Learn more about choosing an image

Making the change

Making the change will literally take you two seconds.

Figure out which image you'd like to use

Review our choosing an image guide to help you decide which image you'd like to use. Also, make sure our default configurations satisfy your requirements.

Update your Dockerfile or compose.yml file

We simply change php:8.4-apache to serversideup/php:8.4-fpm-apache

Dockerfile

FROM php:8.4-apache

# Rest of your Dockerfile...

compose.yml

services:
  php:
    image: php:8.4-apache
    ports:
      - 80:80
      - 443:443

Test your application

Make sure to test your application to ensure it's working as expected.

Deploy and enjoy!

Making the change is that simple.

If you need to customize the base image, review our guides below: