Deploying Fusion
Introduction
Fusion is a modern, open-source content management system built on Laravel that brings together the power of a flexible CMS with the elegance of a developer-friendly framework. Designed for both content creators and developers, Fusion provides an intuitive admin interface for managing content, pages, forms, and media while giving developers full control through Laravel’s ecosystem, custom fields, extensible modules, and a beautiful theming system.
What sets Fusion apart from traditional CMS platforms is its approach to content modeling. Instead of forcing your content into predefined structures, Fusion lets you create custom content types (called “blueprints”) with flexible field groups, reusable components, and powerful query builders. Need a blog with custom taxonomies? A product catalog with specifications? A portfolio with case studies? Fusion handles it all through its visual blueprint builder without writing code, yet developers can extend everything through Laravel’s familiar patterns.
Fusion combines the best of both worlds—editors get a clean, intuitive interface for creating and managing content with live preview, drag-and-drop page building, media management, and SEO tools. Developers get Laravel’s routing, Eloquent ORM, Blade templates, authentication, and the entire Composer ecosystem. Whether you’re building a corporate website, an online magazine, a documentation portal, or a custom web application with CMS capabilities, Fusion provides the foundation without the bloat.
Deploying Fusion on Klutch.sh gives you a production-ready CMS with automatic HTTPS for secure administration, persistent storage for uploads and database, straightforward database connectivity, and the flexibility to scale resources as your content and traffic grow—all without managing servers, configuring web servers, or wrestling with deployment pipelines.
This guide walks you through deploying Fusion on Klutch.sh using Docker, connecting to a MySQL or MariaDB database, configuring the CMS, creating content types and pages, customizing themes, implementing caching for performance, and following production-ready best practices for security, backups, and maintenance.
Why Deploy Fusion on Klutch.sh?
- Modern Laravel Foundation: Built on Laravel 10+ with all framework benefits
- Automatic HTTPS: Secure admin panel and frontend with automatic SSL
- Persistent Storage: Reliable volume storage for uploads, cache, and media
- Database Integration: Easy connection to MySQL, MariaDB, or PostgreSQL
- Scalable Resources: Adjust CPU and RAM as traffic and content grow
- Custom Content Types: Flexible blueprint system without database migrations
- Developer-Friendly: Full Laravel ecosystem and Composer packages
- No Server Management: Focus on content and development, not infrastructure
- Cost-Effective: Pay only for resources used, no licensing fees
- GitHub Integration: Version-controlled themes and custom code
Prerequisites
Before you begin, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your deployment
- Basic understanding of Laravel and PHP
- Familiarity with content management systems
- Composer installed locally for development
Technical Requirements:
Fusion is a Laravel application with moderate resource needs:
- Minimum 1GB RAM (2GB+ recommended for production)
- At least 10GB persistent storage for uploads and cache
- MySQL 5.7+, MariaDB 10.3+, or PostgreSQL 10+
- PHP 8.1+ with required extensions (included in Docker image)
- Node.js 16+ for asset compilation (dev/build only)
Required Dependencies:
Fusion requires a database. You’ll need to deploy either:
Optional Dependencies:
For improved performance, consider deploying:
- Redis - for caching, sessions, and queues
Understanding Fusion Architecture
Fusion is built as a modern Laravel application with CMS capabilities:
Core Components:
- Admin Panel: Vue.js-powered interface for content management
- Blueprint System: Custom content type builder with field groups
- Page Builder: Visual drag-and-drop interface for page layouts
- Media Manager: File upload, organization, and transformation
- Form Builder: Create custom forms with validation and email notifications
- Navigation Builder: Manage menus with drag-and-drop
- User Management: Roles, permissions, and authentication
- Theme System: Blade templates with component-based structure
Content Architecture:
- Blueprints: Content type definitions (like post types)
- Entries: Individual content items created from blueprints
- Fields: Flexible field types (text, rich text, media, repeater, etc.)
- Taxonomies: Categories, tags, and custom classification systems
- Relationships: Link entries across different blueprints
- Collections: Organized groups of entries
File Structure:
fusion/├── app/ # Laravel application code├── bootstrap/ # Laravel bootstrap├── config/ # Configuration files├── database/ # Migrations and seeds├── public/ # Web root (assets, index.php)├── resources/ # Views, Blade templates, assets│ ├── blueprints/ # Content type definitions│ ├── themes/ # Theme templates│ └── views/ # Blade views├── storage/ # Logs, cache, uploads│ ├── app/ # Application storage│ ├── framework/ # Framework cache│ └── logs/ # Log files├── tests/ # PHPUnit tests└── vendor/ # Composer dependenciesPreparing Your Repository
Step 1: Create Project Directory
Create a new directory for your Fusion deployment:
mkdir fusion-cmscd fusion-cmsStep 2: Install Fusion
Install Fusion using Composer:
composer create-project fusioncms/fusioncms .Or clone from GitHub:
git clone https://github.com/fusioncms/fusioncms.git .composer installStep 3: Create Dockerfile
Create a Dockerfile for your Fusion deployment:
FROM php:8.2-fpm-alpine
# Install system dependenciesRUN apk add --no-cache \ nginx \ supervisor \ curl \ git \ zip \ unzip \ libzip-dev \ libpng-dev \ libjpeg-turbo-dev \ freetype-dev \ icu-dev \ libxml2-dev \ oniguruma-dev \ sqlite-dev \ nodejs \ npm
# Install PHP extensionsRUN docker-php-ext-configure gd --with-freetype --with-jpeg && \ docker-php-ext-install -j$(nproc) \ pdo_mysql \ mysqli \ zip \ gd \ intl \ xml \ mbstring \ opcache \ bcmath \ exif
# Install ComposerCOPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Set working directoryWORKDIR /var/www/html
# Copy application filesCOPY . .
# Install PHP dependenciesRUN composer install --no-dev --optimize-autoloader --no-interaction
# Install and build frontend assetsRUN npm ci && \ npm run build && \ rm -rf node_modules
# Set permissionsRUN chown -R www-data:www-data /var/www/html && \ chmod -R 755 /var/www/html && \ chmod -R 775 storage bootstrap/cache
# Configure NginxCOPY docker/nginx.conf /etc/nginx/nginx.conf
# Configure PHP-FPMRUN echo "php_admin_value[error_log] = /var/www/html/storage/logs/php-fpm.log" >> /usr/local/etc/php-fpm.d/www.conf && \ echo "php_admin_flag[log_errors] = on" >> /usr/local/etc/php-fpm.d/www.conf
# Configure PHPRUN echo "memory_limit = 256M" >> /usr/local/etc/php/conf.d/memory-limit.ini && \ echo "upload_max_filesize = 64M" >> /usr/local/etc/php/conf.d/uploads.ini && \ echo "post_max_size = 64M" >> /usr/local/etc/php/conf.d/uploads.ini && \ echo "max_execution_time = 300" >> /usr/local/etc/php/conf.d/timeouts.ini
# Configure SupervisorCOPY docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Expose HTTP portEXPOSE 80
# Health checkHEALTHCHECK --interval=30s --timeout=10s --start-period=60s \ CMD curl -f http://localhost/health || exit 1
# Start SupervisorCMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]Step 4: Create Nginx Configuration
Create docker/nginx.conf:
user www-data;worker_processes auto;pid /run/nginx.pid;
events { worker_connections 1024;}
http { include /etc/nginx/mime.types; default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/www/html/storage/logs/nginx-access.log main; error_log /var/www/html/storage/logs/nginx-error.log warn;
sendfile on; tcp_nopush on; keepalive_timeout 65; client_max_body_size 64M;
gzip on; gzip_vary on; gzip_min_length 1024; gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/javascript application/xml+rss application/json;
server { listen 80; server_name _; root /var/www/html/public; index index.php index.html;
# Security headers add_header X-Frame-Options "SAMEORIGIN" always; add_header X-Content-Type-Options "nosniff" always; add_header X-XSS-Protection "1; mode=block" always; add_header Referrer-Policy "no-referrer-when-downgrade" always;
# Disable access to hidden files location ~ /\. { deny all; }
# Main location block location / { try_files $uri $uri/ /index.php?$query_string; }
# PHP-FPM configuration location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; fastcgi_buffer_size 128k; fastcgi_buffers 256 16k; fastcgi_busy_buffers_size 256k; fastcgi_temp_file_write_size 256k; fastcgi_read_timeout 300; }
# Cache static assets location ~* \.(jpg|jpeg|png|gif|ico|css|js|svg|woff|woff2|ttf|eot)$ { expires 1y; add_header Cache-Control "public, immutable"; } }}Step 5: Create Supervisor Configuration
Create docker/supervisord.conf:
[supervisord]nodaemon=trueuser=rootlogfile=/var/www/html/storage/logs/supervisord.logpidfile=/var/run/supervisord.pid
[program:php-fpm]command=/usr/local/sbin/php-fpm -Fautostart=trueautorestart=truestdout_logfile=/var/www/html/storage/logs/php-fpm.logstderr_logfile=/var/www/html/storage/logs/php-fpm-error.log
[program:nginx]command=/usr/sbin/nginx -g "daemon off;"autostart=trueautorestart=truestdout_logfile=/var/www/html/storage/logs/nginx-stdout.logstderr_logfile=/var/www/html/storage/logs/nginx-stderr.log
[program:queue-worker]process_name=%(program_name)s_%(process_num)02dcommand=php /var/www/html/artisan queue:work --sleep=3 --tries=3 --max-time=3600autostart=trueautorestart=truestopasgroup=truekillasgroup=trueuser=www-datanumprocs=1redirect_stderr=truestdout_logfile=/var/www/html/storage/logs/worker.logstopwaitsecs=3600
[program:schedule]command=/bin/sh -c "while true; do php /var/www/html/artisan schedule:run --verbose --no-interaction & sleep 60; done"autostart=trueautorestart=trueuser=www-datastdout_logfile=/var/www/html/storage/logs/schedule.logstderr_logfile=/var/www/html/storage/logs/schedule-error.logStep 6: Create Environment Configuration
Create a .env.example file:
APP_NAME=FusionAPP_ENV=productionAPP_KEY=APP_DEBUG=falseAPP_URL=https://example-app.klutch.sh
# Database ConfigurationDB_CONNECTION=mysqlDB_HOST=mysql-app.klutch.shDB_PORT=8000DB_DATABASE=fusionDB_USERNAME=fusionDB_PASSWORD=your-secure-database-password
# Cache ConfigurationCACHE_DRIVER=fileSESSION_DRIVER=fileQUEUE_CONNECTION=database
# Redis Configuration (optional)# CACHE_DRIVER=redis# SESSION_DRIVER=redis# QUEUE_CONNECTION=redis# REDIS_HOST=redis-app.klutch.sh# REDIS_PORT=8000# REDIS_PASSWORD=null
# Mail ConfigurationMAIL_MAILER=smtpMAIL_HOST=smtp.mailtrap.ioMAIL_PORT=2525MAIL_USERNAME=nullMAIL_PASSWORD=nullMAIL_ENCRYPTION=tlsMAIL_FROM_ADDRESS=noreply@example.comMAIL_FROM_NAME="${APP_NAME}"
# FilesystemFILESYSTEM_DISK=local
# Fusion SettingsFUSION_MULTISITE=falseFUSION_MAINTENANCE=falseStep 7: Create .gitignore
Create a .gitignore file:
/node_modules/public/hot/public/storage/storage/*.key/vendor.env.env.backup.phpunit.result.cachedocker-compose.override.ymlHomestead.jsonHomestead.yamlnpm-debug.logyarn-error.log/.idea/.vscodeStep 8: Create README.md
Document your deployment:
# Fusion CMS on Klutch.sh
Modern Laravel-based content management system.
## Quick Start
1. Deploy MySQL/MariaDB database on Klutch.sh2. Configure `.env` with database credentials3. Push this repository to GitHub4. Deploy on Klutch.sh with HTTP traffic5. Access admin panel at `/admin`
## Features
- Custom Content Types (Blueprints)- Visual Page Builder- Media Management- Form Builder- SEO Tools- Role-Based Permissions- Theme System- API Support
## Configuration
See Klutch.sh dashboard for environment variables.
## Documentation
- [Fusion Documentation](https://beta.fusioncms.com/docs)- [Laravel Documentation](https://laravel.com/docs)Step 9: Generate Application Key
Generate a Laravel application key:
php artisan key:generate --showCopy the generated key for use in environment variables.
Step 10: Push to GitHub
Initialize git and push your repository:
git initgit add .git commit -m "Initial Fusion CMS deployment setup"git branch -M maingit remote add origin https://github.com/your-username/fusion-cms.gitgit push -u origin mainDeploying the Database
Fusion requires a MySQL or MariaDB database. Deploy the database first before deploying Fusion.
Option 1: Deploy MariaDB on Klutch.sh (Recommended)
-
Follow our MariaDB deployment guide to set up a database server
-
Configure the MariaDB deployment with:
- TCP Traffic on port 8000
- Persistent Volume:
/var/lib/mysqlwith at least 5GB - Environment Variables:
MYSQL_ROOT_PASSWORD: Strong root passwordMYSQL_DATABASE:fusionMYSQL_USER:fusionMYSQL_PASSWORD: Strong user password
-
Note the connection details:
- Host:
your-mariadb-app.klutch.sh - Port:
8000 - Database:
fusion - Username:
fusion - Password: Your configured password
- Host:
Option 2: Deploy MySQL on Klutch.sh
-
Follow our MySQL deployment guide to set up a database server
-
Configure with similar settings as MariaDB above
Option 3: Use External Managed Database
You can also use external managed database services:
Deploying Fusion on Klutch.sh
Step 1: Create New App
-
Log in to the Klutch.sh dashboard
-
Create a new project or select an existing one
-
Create a new app and configure it:
- Repository: Select your Fusion GitHub repository
- Branch: Choose the branch to deploy (e.g.,
mainorproduction) - Traffic Type: Select HTTP (Fusion runs as a web application)
- Internal Port: Set to 80 (Nginx listens on port 80)
Step 2: Configure Persistent Volumes
Fusion requires persistent storage for uploads, cache, and logs.
-
In your app settings, navigate to the Volumes section
-
Add a volume for storage:
- Mount Path:
/var/www/html/storage - Size: 10GB (adjust based on expected media uploads)
- Mount Path:
-
Add a volume for public uploads:
- Mount Path:
/var/www/html/public/storage - Size: 5GB
- Mount Path:
Step 3: Configure Environment Variables
Set essential environment variables for your Fusion deployment:
-
In your app settings, navigate to the Environment Variables section
-
Add the following variables (mark sensitive values as secrets):
Application Configuration:
Terminal window APP_NAME=FusionAPP_ENV=productionAPP_KEY=your-generated-application-keyAPP_DEBUG=falseAPP_URL=https://example-app.klutch.shDatabase Configuration:
Terminal window DB_CONNECTION=mysqlDB_HOST=your-mariadb-app.klutch.shDB_PORT=8000DB_DATABASE=fusionDB_USERNAME=fusionDB_PASSWORD=your-database-passwordCache & Session:
Terminal window CACHE_DRIVER=fileSESSION_DRIVER=fileQUEUE_CONNECTION=databaseMail Configuration:
Terminal window MAIL_MAILER=smtpMAIL_HOST=smtp.mailtrap.ioMAIL_PORT=2525MAIL_USERNAME=your-mail-usernameMAIL_PASSWORD=your-mail-passwordMAIL_ENCRYPTION=tlsMAIL_FROM_ADDRESS=noreply@example.comMAIL_FROM_NAME=Fusion
Important: Use the application key generated earlier. The key must be base64 encoded and prefixed with base64:.
Step 4: Deploy Your Application
-
Click Deploy to start the build process
-
Klutch.sh will:
- Pull your GitHub repository
- Detect the Dockerfile automatically
- Build the Fusion container image
- Deploy it with your configured volumes and environment variables
-
Monitor the build logs for any errors
-
Once deployed, your Fusion CMS will be available at
https://example-app.klutch.sh -
Initial deployment may take 5-10 minutes for database migrations and setup
Initial Setup and Installation
After deployment, complete the Fusion installation:
Step 1: Run Database Migrations
The Dockerfile should automatically run migrations, but if needed, you can run them manually:
# Access your containerdocker exec -it your-container-id bash
# Run migrationsphp artisan migrate --force
# Seed the database (optional)php artisan db:seedStep 2: Create Storage Link
Create a symbolic link for public storage:
php artisan storage:linkStep 3: Access Installation Wizard
-
Navigate to
https://example-app.klutch.shin your browser -
You should see the Fusion installation wizard
-
Follow the wizard steps:
- Database connection verification
- Admin account creation
- Site settings configuration
-
Create your admin account:
- Name: Your full name
- Email: Your email address
- Password: Strong password (minimum 12 characters)
-
Configure site settings:
- Site Name: Your website name
- Site Description: Brief description
- Timezone: Select your timezone
-
Click Complete Installation
Step 4: Access Admin Panel
-
Navigate to
https://example-app.klutch.sh/admin -
Log in with your admin credentials
-
You should see the Fusion admin dashboard
Creating Your First Content
Let’s create a blog to demonstrate Fusion’s blueprint system:
Step 1: Create a Blueprint
Blueprints define content types:
-
In the admin panel, navigate to System → Blueprints
-
Click Create Blueprint
-
Configure the blueprint:
- Name:
Blog Post - Handle:
blog_post(auto-generated) - Description:
Blog post content type - Icon: Select an icon
- Type:
Entry
- Name:
-
Click Create Blueprint
Step 2: Add Fields to Blueprint
-
In the blueprint editor, click Add Section
-
Name the section:
Content -
Add fields to the section:
Title Field:
- Type: Text
- Name:
Title - Handle:
title - Required: Yes
- Help Text:
Post title
Excerpt Field:
- Type: Textarea
- Name:
Excerpt - Handle:
excerpt - Required: No
- Help Text:
Short description for previews
Body Field:
- Type: Rich Text
- Name:
Body - Handle:
body - Required: Yes
- Help Text:
Main post content
Featured Image:
- Type: Media
- Name:
Featured Image - Handle:
featured_image - Required: No
- Allowed Types:
image
Published Date:
- Type: Date
- Name:
Published At - Handle:
published_at - Required: Yes
-
Click Save Blueprint
Step 3: Create an Entry
-
Navigate to Content → Blog Posts (the menu item is auto-created)
-
Click Create Blog Post
-
Fill in the form:
- Title:
Welcome to Fusion CMS - Excerpt:
Fusion makes content management easy and flexible - Body: Write your post content using the rich text editor
- Featured Image: Upload an image
- Published At: Select today’s date
- Title:
-
Click Publish to make the post live
-
Click Save Draft to save without publishing
Step 4: Display Content on Frontend
Create a Blade template to display blog posts:
Create resources/themes/default/blog/index.blade.php:
@extends('layouts.app')
@section('content') <div class="container mx-auto px-4 py-8"> <h1 class="text-4xl font-bold mb-8">Blog</h1>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8"> @foreach($posts as $post) <article class="bg-white rounded-lg shadow-md overflow-hidden"> @if($post->featured_image) <img src="{{ $post->featured_image->url }}" alt="{{ $post->title }}" class="w-full h-48 object-cover"> @endif
<div class="p-6"> <h2 class="text-2xl font-semibold mb-2"> <a href="{{ route('blog.show', $post->slug) }}" class="hover:text-blue-600"> {{ $post->title }} </a> </h2>
<p class="text-gray-600 text-sm mb-4"> {{ $post->published_at->format('F j, Y') }} </p>
@if($post->excerpt) <p class="text-gray-700 mb-4">{{ $post->excerpt }}</p> @endif
<a href="{{ route('blog.show', $post->slug) }}" class="text-blue-600 hover:text-blue-800 font-medium"> Read More → </a> </div> </article> @endforeach </div>
{{ $posts->links() }} </div>@endsectionCreate resources/themes/default/blog/show.blade.php:
@extends('layouts.app')
@section('content') <article class="container mx-auto px-4 py-8 max-w-4xl"> @if($post->featured_image) <img src="{{ $post->featured_image->url }}" alt="{{ $post->title }}" class="w-full h-96 object-cover rounded-lg mb-8"> @endif
<h1 class="text-5xl font-bold mb-4">{{ $post->title }}</h1>
<div class="text-gray-600 mb-8"> Published on {{ $post->published_at->format('F j, Y') }} </div>
<div class="prose prose-lg max-w-none"> {!! $post->body !!} </div>
<div class="mt-12 pt-8 border-t"> <a href="{{ route('blog.index') }}" class="text-blue-600 hover:text-blue-800 font-medium"> ← Back to Blog </a> </div> </article>@endsectionAdd routes in routes/web.php:
use App\Http\Controllers\BlogController;
Route::get('/blog', [BlogController::class, 'index'])->name('blog.index');Route::get('/blog/{slug}', [BlogController::class, 'show'])->name('blog.show');Create controller app/Http/Controllers/BlogController.php:
<?php
namespace App\Http\Controllers;
use Fusion\Models\Entry;
class BlogController extends Controller{ public function index() { $posts = Entry::where('blueprint', 'blog_post') ->where('status', 'published') ->orderBy('published_at', 'desc') ->paginate(12);
return view('blog.index', compact('posts')); }
public function show($slug) { $post = Entry::where('blueprint', 'blog_post') ->where('slug', $slug) ->where('status', 'published') ->firstOrFail();
return view('blog.show', compact('post')); }}Page Builder
Fusion includes a visual page builder for creating layouts:
Creating a Landing Page
-
Navigate to Content → Pages
-
Click Create Page
-
Configure the page:
- Title:
Home - Slug:
home(or/for homepage) - Status:
Published
- Title:
-
Click Page Builder tab
-
Add components:
- Hero Section: Banner with call-to-action
- Features Grid: Highlight key features
- Content Block: Rich text content
- Call to Action: Button or form
-
Customize each component:
- Edit text and images
- Adjust colors and spacing
- Configure buttons and links
-
Click Save & Publish
Available Components
Fusion includes these default components:
- Hero: Large banner with background image
- Text Block: Rich text content
- Image: Single image with caption
- Gallery: Image grid
- Video: Embedded video player
- Button: Call-to-action button
- Form: Embedded custom form
- Spacer: Vertical spacing
- Divider: Horizontal line
- Custom HTML: Raw HTML
Form Builder
Create custom forms for contact, surveys, or registrations:
Creating a Contact Form
-
Navigate to Content → Forms
-
Click Create Form
-
Configure the form:
- Name:
Contact Form - Handle:
contact - Email Recipients:
contact@example.com - Confirmation Message:
Thank you for contacting us!
- Name:
-
Add form fields:
Name Field:
- Type: Text
- Label:
Your Name - Required: Yes
- Validation: Minimum 2 characters
Email Field:
- Type: Email
- Label:
Email Address - Required: Yes
- Validation: Valid email format
Subject Field:
- Type: Select
- Label:
Subject - Options:
General Inquiry,Support,Sales - Required: Yes
Message Field:
- Type: Textarea
- Label:
Message - Required: Yes
- Validation: Minimum 10 characters
-
Configure email notification:
- Subject:
New Contact Form Submission - Reply To: Use form email field
- Email Template: Customize message
- Subject:
-
Click Save Form
Embedding Forms
In Blade Templates:
@fusion('form', ['handle' => 'contact'])In Page Builder:
Add a Form component and select the contact form.
Form Submissions:
View submissions in Content → Forms → Submissions.
Media Management
Fusion provides powerful media management:
Uploading Media
-
Navigate to Content → Media
-
Click Upload or drag files to upload
-
Supported formats:
- Images: JPG, PNG, GIF, SVG, WebP
- Documents: PDF, DOC, DOCX, XLS, XLSX
- Videos: MP4, MOV, AVI (uploaded to storage)
- Audio: MP3, WAV
-
Organize files into folders:
- Create folders for different content types
- Move files between folders
- Bulk operations available
Image Transformations
Fusion automatically generates responsive images:
<!-- Original image --><img src="{{ $media->url }}" alt="{{ $media->alt }}">
<!-- Resized image --><img src="{{ $media->url(['width' => 800]) }}" alt="{{ $media->alt }}">
<!-- Thumbnail --><img src="{{ $media->url(['width' => 300, 'height' => 200, 'fit' => 'crop']) }}" alt="{{ $media->alt }}">
<!-- Responsive srcset --><img src="{{ $media->url(['width' => 800]) }}" srcset=" {{ $media->url(['width' => 400]) }} 400w, {{ $media->url(['width' => 800]) }} 800w, {{ $media->url(['width' => 1200]) }} 1200w " sizes="(max-width: 800px) 100vw, 800px" alt="{{ $media->alt }}">Theme Customization
Fusion uses Blade templates for theming:
Theme Structure
resources/themes/your-theme/├── layouts/│ ├── app.blade.php # Main layout│ └── admin.blade.php # Admin layout├── partials/│ ├── header.blade.php│ ├── footer.blade.php│ └── navigation.blade.php├── pages/│ ├── home.blade.php│ └── about.blade.php├── blog/│ ├── index.blade.php│ └── show.blade.php└── components/ └── button.blade.phpCreating a Custom Theme
-
Create theme directory:
Terminal window mkdir -p resources/themes/mytheme -
Create main layout
layouts/app.blade.php:<!DOCTYPE html><html lang="{{ app()->getLocale() }}"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>@yield('title', config('app.name'))</title>@vite(['resources/css/app.css', 'resources/js/app.js'])</head><body>@include('partials.header')<main>@yield('content')</main>@include('partials.footer')</body></html> -
Activate theme in admin:
- Navigate to Settings → Theme
- Select your custom theme
- Click Save
User Management and Permissions
Fusion includes a robust user and role system:
Creating Roles
-
Navigate to System → Roles
-
Click Create Role
-
Configure the role:
- Name:
Editor - Handle:
editor - Description:
Can create and edit content
- Name:
-
Set permissions:
- Content: Create, read, update entries
- Media: Upload and manage media
- Forms: View submissions
- Pages: Create and edit pages
-
Click Save Role
Creating Users
-
Navigate to System → Users
-
Click Create User
-
Configure the user:
- Name: Full name
- Email: Email address
- Password: Strong password
- Roles: Assign roles
- Status: Active
-
Click Save User
Caching and Performance
Enable Redis Caching
For improved performance, deploy Redis and configure Fusion to use it:
-
Deploy Redis on Klutch.sh (see Redis guide)
-
Update environment variables:
Terminal window CACHE_DRIVER=redisSESSION_DRIVER=redisQUEUE_CONNECTION=redisREDIS_HOST=redis-app.klutch.shREDIS_PORT=8000 -
Update
config/database.php:'redis' => ['client' => 'phpredis','default' => ['host' => env('REDIS_HOST', '127.0.0.1'),'port' => env('REDIS_PORT', 6379),'database' => 0,],], -
Clear and reconfigure cache:
Terminal window php artisan config:cachephp artisan route:cachephp artisan view:cache
Optimize Application
-
Enable OPcache: Already configured in Dockerfile
-
Cache Configuration:
Terminal window php artisan config:cache -
Cache Routes:
Terminal window php artisan route:cache -
Cache Views:
Terminal window php artisan view:cache -
Optimize Autoloader:
Terminal window composer install --optimize-autoloader --no-dev
SEO Configuration
Fusion includes built-in SEO tools:
Per-Page SEO
-
Edit any page or entry
-
Navigate to SEO tab
-
Configure:
- Meta Title: Custom title tag
- Meta Description: Page description
- Meta Keywords: Comma-separated keywords
- Open Graph Image: Social sharing image
- Robots: Index/noindex, follow/nofollow
-
Preview how page appears in search results
-
Click Save
Global SEO Settings
-
Navigate to Settings → SEO
-
Configure:
- Site Title: Default title
- Title Template:
{title} | {site_name} - Meta Description: Default description
- Twitter Card: Configure social sharing
- Google Analytics: Add tracking ID
- Verification Tags: Google, Bing verification
-
Click Save Settings
Generate Sitemap
php artisan fusion:sitemapSitemap available at: https://example-app.klutch.sh/sitemap.xml
API and Headless CMS
Fusion can be used as a headless CMS:
Enable API
-
Navigate to Settings → API
-
Enable API access
-
Configure:
- API Prefix:
/api - Rate Limiting: 60 requests per minute
- Authentication: Token-based
- API Prefix:
-
Generate API token:
- Navigate to System → API Tokens
- Click Create Token
- Set permissions
- Copy token
API Endpoints
Get all blog posts:
curl https://example-app.klutch.sh/api/entries/blog_post \ -H "Authorization: Bearer your-api-token"Get single post:
curl https://example-app.klutch.sh/api/entries/blog_post/post-slug \ -H "Authorization: Bearer your-api-token"Response:
{ "data": { "id": 1, "title": "Welcome to Fusion CMS", "slug": "welcome-to-fusion-cms", "excerpt": "Fusion makes content management easy", "body": "<p>Full content here...</p>", "featured_image": { "url": "https://example-app.klutch.sh/storage/images/hero.jpg" }, "published_at": "2024-01-15T10:00:00Z" }}Custom Domain Configuration
Step 1: Configure Domain in Klutch.sh
-
In the Klutch.sh dashboard, navigate to your app settings
-
Go to the Domains section
-
Add your custom domain (e.g.,
www.yourdomain.com) -
Klutch.sh will provide DNS records to configure
Step 2: Update DNS Records
-
Log in to your domain registrar
-
Add the DNS records provided by Klutch.sh:
- CNAME record pointing to your Klutch.sh app
-
Wait for DNS propagation (up to 48 hours)
-
Klutch.sh will automatically provision SSL certificates
Step 3: Update Fusion Configuration
-
Update the
APP_URLenvironment variable to your custom domain -
Redeploy the application
-
Clear cache:
Terminal window php artisan config:clearphp artisan cache:clear
Security Best Practices
Application Security
-
Use Strong APP_KEY:
- Generate with
php artisan key:generate - Never commit to version control
- Rotate periodically
- Generate with
-
Disable Debug Mode in Production:
Terminal window APP_DEBUG=false -
Configure HTTPS:
- Force HTTPS in production
- Use secure cookies
- Enable HSTS headers
-
Implement CSP Headers:
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline';" always; -
Rate Limiting:
- Laravel includes rate limiting
- Configure in
app/Http/Kernel.php - Customize limits per route
User Security
-
Strong Passwords:
- Enforce minimum 12 characters
- Require mixed case, numbers, symbols
- Use Laravel’s password validation
-
Two-Factor Authentication:
- Install 2FA package
- Require for admin accounts
- Provide backup codes
-
Role-Based Access:
- Follow principle of least privilege
- Regular permission audits
- Revoke unused accounts
Database Security
-
Use Prepared Statements:
- Eloquent uses prepared statements automatically
- Never concatenate user input into queries
-
Encrypt Sensitive Data:
- Use Laravel’s encryption
- Encrypt database backups
- Secure credential storage
-
Regular Backups:
- Automated daily backups
- Test restoration procedures
- Store backups off-site
Backup and Maintenance
Database Backup
-
Manual Backup:
Terminal window mysqldump -h mariadb-app.klutch.sh -P 8000 -u fusion -p fusion > fusion-backup.sql -
Automated Backups:
- Configure database backup schedule
- Store backups in cloud storage (S3, DigitalOcean Spaces)
- Retain backups for 30+ days
-
Laravel Backup Package:
Terminal window composer require spatie/laravel-backupphp artisan backup:run
File Backup
-
Storage Directory:
- Backup
/var/www/html/storageregularly - Include uploaded media
- Backup database snapshots
- Backup
-
Configuration Backup:
- Store environment variables securely
- Version control all code changes
- Document custom configurations
Updates and Maintenance
-
Update Fusion:
Terminal window composer update fusioncms/fusioncmsphp artisan migratephp artisan config:clear -
Update Dependencies:
Terminal window composer updatenpm updatenpm run build -
Clear Caches:
Terminal window php artisan config:clearphp artisan cache:clearphp artisan route:clearphp artisan view:clear -
Run Health Checks:
Terminal window php artisan fusion:check
Troubleshooting Common Issues
Application Won’t Start
-
Check Logs:
- View application logs in Klutch.sh dashboard
- Check
storage/logs/laravel.log - Review Nginx error logs
-
Verify Environment Variables:
- Ensure all required variables are set
- Check
APP_KEYis set correctly - Verify database credentials
-
Check Permissions:
Terminal window chmod -R 775 storage bootstrap/cachechown -R www-data:www-data storage bootstrap/cache
Database Connection Errors
-
Test Connection:
Terminal window mysql -h mariadb-app.klutch.sh -P 8000 -u fusion -p -
Verify Credentials:
- Check
DB_HOST,DB_PORT,DB_DATABASE - Verify
DB_USERNAMEandDB_PASSWORD - Ensure database exists
- Check
-
Check Firewall:
- Ensure TCP traffic enabled on database
- Verify network connectivity
500 Internal Server Error
-
Enable Debug Mode Temporarily:
Terminal window APP_DEBUG=true -
Check Error Logs:
- Review
storage/logs/laravel.log - Check PHP-FPM logs
- Review Nginx error logs
- Review
-
Common Causes:
- Missing
APP_KEY - Incorrect file permissions
- Missing Composer dependencies
- Syntax errors in code
- Missing
Admin Panel Not Loading
-
Clear Cache:
Terminal window php artisan config:clearphp artisan cache:clearphp artisan view:clear -
Rebuild Frontend Assets:
Terminal window npm run build -
Check Database Migrations:
Terminal window php artisan migrate:statusphp artisan migrate --force
Production Deployment Checklist
Before going live with Fusion:
- Database deployed and accessible
- Persistent volumes configured (10GB+ for
/var/www/html/storage) - All environment variables set correctly
-
APP_KEYgenerated and set -
APP_DEBUGset tofalse -
APP_ENVset toproduction - HTTPS working correctly (automatic via Klutch.sh)
- Custom domain configured (optional)
- Database migrations run successfully
- Storage link created (
php artisan storage:link) - Admin account created
- File permissions set correctly
- Caching configured (Redis recommended)
- Configuration cached (
php artisan config:cache) - Routes cached (
php artisan route:cache) - Views cached (
php artisan view:cache) - Queue workers running via Supervisor
- Scheduled tasks configured
- Backup strategy implemented
- Mail configuration tested
- Security headers configured
- Rate limiting enabled
- Error monitoring set up
- Performance optimizations applied
- SEO settings configured
- Sitemap generated
- SSL certificates verified
Resources and Further Reading
- Fusion Official Website
- Fusion Documentation
- Fusion GitHub Repository
- Laravel Documentation
- Laravel Video Tutorials
- MariaDB Deployment Guide
- MySQL Deployment Guide
- Redis Deployment Guide
- Klutch.sh Quick Start Guide
- Klutch.sh Volumes Documentation
Conclusion
Deploying Fusion CMS on Klutch.sh provides a powerful, modern content management solution built on Laravel’s solid foundation. With automatic HTTPS, persistent storage, straightforward database connectivity, and the flexibility to scale resources as needed, you can focus on creating great content and building custom features rather than managing infrastructure.
This guide covered everything from initial deployment to advanced features like custom blueprints, page building, form creation, theme customization, API integration, and production best practices. Whether you’re building a simple blog, a complex corporate website, or a custom application with CMS capabilities, Fusion on Klutch.sh provides the tools, flexibility, and reliability you need.
Remember to keep your system updated, implement proper backups, follow security best practices, and optimize for performance to ensure your CMS runs smoothly. For additional help or questions, refer to the resources above or engage with the Fusion and Laravel communities.
Happy content managing!