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
www-data by default, you may need to update file permissions for mounted volumes.| Official PHP Images | serversideup/php | |
|---|---|---|
| Base Operating System | Debian, Alpine | Debian, Alpine |
| PHP Compilation | PHP Source Code | PHP Source Code (based on official PHP images) |
| Run PHP, pinned to the minor version | ✅ | ✅ |
| Multi-arch support | ✅ | ✅ |
| Init System | Docker CMD | Docker CMD or S6-Overlay |
| Published Registry | DockerHub | DockerHub, 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 | ❌ | ✅ |
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
php:8.4-apache to serversideup/php:8.4-fpm-apacheDockerfile
FROM php:8.4-apache
# Rest of your Dockerfile...
FROM serversideup/php:8.4-fpm-apache
# Rest of your Dockerfile...
compose.yml
services:
php:
image: php:8.4-apache
ports:
- 80:80
- 443:443
services:
php:
image: serversideup/php:8.4-fpm-apache
ports:
- 80:8080
- 443:8443
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.
Related resources
If you need to customize the base image, review our guides below:
Choosing a Host
Learn how to choose the right hosting provider for your containerized PHP application.
Using Healthchecks With Laravel
Stop guessing if Laravel is up and running. Our health checks have you covered to ensure Laravel is running properly. It supports HTTP checks, Laravel Horizon, Reverb, Scheduler, and Queue.