
This idea came to me after I was trying to recover a deprecated database that I had for a very old website based on php-fusion’s CMS. Sure, these days they do have a new version but, the new version would not work with my old database. So I thought, why not DOCKER? 🙂
Using Docker for PHP-Fusion 7 is actually a great idea—it isolates legacy software (like PHP 5.6 and MySQL 5.6) from the host system and makes upgrades or changes easier down the line.
1. Create a Project Directory:
Firstly you’d need a server or in my case, I created a VM on my home lab.
mkdir ~/phpfusion7
cd ~/phpfusion7
Nix2. Prepare Folder Structure
mkdir fusion
mkdir db_data
Nixfusion/
will contain your PHP-Fusion source code.
db_data/
will hold your MySQL data persistently.
3. Create docker-compose.yml
In ~/phpfusion7
, create a docker-compose.yml
file:
version: '3.7'
services:
web:
image: webdevops/php-apache:5.6
container_name: fusion_web
ports:
- "8080:80"
volumes:
- ./fusion:/app
depends_on:
- db
db:
image: mysql:5.6
container_name: fusion_db
restart: always
environment:
MYSQL_ROOT_PASSWORD: rootpass
MYSQL_DATABASE: fusion7
MYSQL_USER: fusionuser
MYSQL_PASSWORD: fusionpass
volumes:
- ./db_data:/var/lib/mysql
YAMLYou can change the passwords to something more secure.
4. Download PHP-Fusion 7
Go to PHP-Fusion SourceForge and download PHP-Fusion 7 (e.g., v7.02.07).
Upload and extract the contents of the zip/tar.gz into the fusion/
directory.
# example:
cd ~/phpfusion7/fusion
wget https://downloads.sourceforge.net/project/php-fusion/PHP-Fusion%20Archives/7.x/7.02.07/PHP-Fusion_7-02-07.zip
unzip PHP-Fusion_7-02-07.zip
rm PHP-Fusion_7-02-07.zip
BashMake sure all files are directly inside fusion/
(not in a subfolder).
5. Start the Containers
cd ~/phpfusion7
docker-compose up -d
BashThis starts both the PHP-Apache container and the MySQL 5.6 container.
Apache will serve PHP-Fusion on http://<server-ip>:8080
.
6. Run the Installer
In your browser, open: http://<your-server-ip>:8080
Follow the PHP-Fusion installer steps:
Database Host: db
Username: fusionuser
Password: fusionpass
Database Name: fusion7
Once installed, delete or rename the install.php
and setup.php
files per the final step instructions.
7. (Optional) Auto-Restart on Reboot
docker update --restart unless-stopped fusion_web fusion_db
Bash8. (Optional) Reverse Proxy with SSL (e.g., Nginx + Traefik or Caddy)
You can place a reverse proxy in front of your Docker services and assign them domain names + HTTPS certificates. Let me know in the comments if you want help with that part.