-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the official wiki for the PHP Gallery project.
This project is a lightweight, filesystem-driven photo gallery system built in pure PHP, designed to keep data simple, portable, and under your control.
PHP Gallery is built around a simple but powerful idea:
The filesystem is the source of truth. The database is only an index and metadata layer.
This means:
- Your images and galleries exist as real folders and files
- No lock-in to database-only storage
- Easy backups, migrations, and manual edits
- Predictable structure
- Galleries are represented as folders
- Images are stored directly inside those folders
- Optional metadata is stored alongside (e.g. gallery.json)
The application scans and synchronizes these into the database.
The database is used for:
- Fast lookups
- Permissions and access control
- Metadata (titles, descriptions, ratings)
- Relationships (parent / child galleries)
It is not required for the actual image storage.
Supports hierarchical galleries:
galleries/ ├── Travel/ │ ├── Iceland/ │ │ ├── img1.jpg │ │ └── img2.jpg │ └── Italy/ └── Aviation/
- Unlimited nesting depth
- Automatic detection of sub-galleries
- Recursive navigation
New folders are not auto-imported silently.
Instead:
- Admin explicitly scans for new galleries
- Chooses what to include
- Avoids performance overhead and unintended indexing
- Automatic discovery of images
- Thumbnail generation
- Clean linking structure
- Direct file-based storage
- Create galleries via filesystem or admin panel
- Detect new folders
- Rename and reorganize
- Move items between galleries
- Thumbnails
- Metadata support (description, comments)
- Rating system (optional)
- Download gallery as ZIP
- Tree-based gallery structure
- Nested browsing
- Breadcrumb navigation
- Clean URLs (if enabled)
- Indexable gallery pages
- Image-level pages
- Structured metadata support
- Admin vs public access
- Gallery-level visibility
- Controlled editing
[ Filesystem ] │ ▼ [ Scanner / Sync Layer ] │ ▼ [ Database (index + metadata) ] │ ▼ [ Controllers / Services ] │ ▼ [ Public UI / Admin UI ]
- Create a folder in /galleries
- Upload images
- Open admin panel
- Run "Scan for new galleries"
- Confirm import
- Use admin UI
- Stored in database (and optionally JSON)
- Does not affect original files
- Select gallery
- Click download
- System generates ZIP dynamically
- Clone repository
- Set up PHP environment
- Configure database
- Run installer (install.php)
- Set write permissions for thumbnails, cache, uploads
- PHP 8.x recommended
- MySQL / MariaDB
- GD or Imagick
- ZipArchive
- Simplicity over abstraction
- Filesystem as truth
- Minimal dependencies
- Manual control instead of automation
- Readable PHP over framework complexity
Contributions are welcome.
Rudolf Klusal https://github.com/klusik