This guide walks you through installing and running the Photo7 photography portfolio + print shop on your server or local machine.
pdo_mysql, curl, gd (for thumbnails), exif, mbstring, json, fileinfo.public/ directory as the web root. (Apache .htaccess is included.)git clone <your-repo-url> photo7 cd photo7
mysql -u root -p -e "CREATE DATABASE photo7 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;" mysql -u root -p photo7 < sql/schema.sql
config/config.php if needed and set DB credentials:
return [
'db' => [
'host' => '127.0.0.1',
'port' => 3306,
'name' => 'photo7',
'user' => 'photo7_user',
'pass' => 'secret',
],
'app' => [
'name' => 'Photo7',
'url' => 'https://your-domain.test',
'admin_email' => 'you@example.com',
'timezone' => 'UTC',
'debug' => false,
],
'mail' => [
'to' => 'you@example.com',
],
'openai' => [
'api_key' => '',
'model' => 'gpt-4o-mini',
],
];
'url' to your public base URL.public/uploads/ (for photos and generated variants)storage/ (for mail/spam logs)mkdir -p public/uploads storage chown -R www-data:www-data public/uploads storage chmod -R 775 public/uploads storage
Point your vhost to public/.
<VirtualHost *:80>
ServerName photo7.test
DocumentRoot /path/to/photo7/public
<Directory /path/to/photo7/public>
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
server {
listen 80;
server_name photo7.test;
root /path/to/photo7/public;
index index.php;
access_log /var/log/nginx/photo7.access.log;
error_log /var/log/nginx/photo7.error.log;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock; # adjust to your PHP-FPM socket
fastcgi_read_timeout 60s;
}
location ~* \.(jpg|jpeg|png|gif|webp|svg|ico|css|js|woff2?)$ {
expires 30d;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
}
/admin/setup./admin/login./admin/albums > Upload.debug to false in config for production.storage/ logs.exif and gd are enabled; confirm uploads are JPEG/PNG/WebP.That’s it! You should now have Photo7 running with admin access, uploads, search, tags, and (optionally) the print shop.