Deployment

Deploying a RuntCMS site means uploading your files to a live server and running the installer — or, if you've already installed locally, transferring the database and files to production.

First-time deployment

If you're deploying fresh to a live server:

  1. Upload all files to public_html via FTP, SFTP, or your host's file manager.
  2. Create a MySQL database and user in your hosting control panel.
  3. Visit https://yourdomain.com/install.php and run the installer.
  4. Log in and start building your content.

See the Installation guide for full details.

Migrating from local to production

If you've built the site locally and want to move it to a live server:

1. Export your local database

mysqldump -u root -p your_database > runtcms-export.sql

2. Upload files

Upload everything except:

  • config.php — you'll create a new one for production
  • install.lock — remove this so the installer can run, or create config.php manually
  • Any local-only files (.DS_Store, IDE config, etc.)

3. Create the production database

In your hosting panel, create a MySQL database and user with SELECT, INSERT, UPDATE, DELETE, CREATE, INDEX, and ALTER privileges.

4. Import the database

Use phpMyAdmin, the hosting panel's database import tool, or the MySQL CLI:

mysql -u prod_user -p prod_database < runtcms-export.sql

5. Create config.php

Create config.php in the production public_html root with your production database credentials and site URL:

<?php
define('DB_HOST', 'localhost');
define('DB_NAME', 'prod_database');
define('DB_USER', 'prod_user');
define('DB_PASS', 'prod_password');
define('SITE_URL', 'https://yourdomain.com');
Security: Never commit config.php to a public Git repository. It contains database credentials. Add it to .gitignore in your local project.

6. Create install.lock

Create an empty file named install.lock in public_html to prevent the installer from running:

touch install.lock

Or just upload an empty file with that name.

File permissions

These directories need to be writable by the web server:

DirectoryPermissionWhy
cms/uploads/755 or 775Image uploads
cms/pages/755 or 775Page HTML file creation

On cPanel shared hosting, set permissions via the File Manager (right-click → Permissions). On a VPS, use chmod:

chmod 755 public_html/cms/uploads
chmod 755 public_html/cms/pages
755 vs 775: Use 755 if the web server runs as a different user than your FTP user (typical on shared hosting). Use 775 if they share a group. When in doubt, try 755 first.

Updating the site URL

If you imported a database from a local environment, the site URL stored in the settings table will be the local URL. Update it:

  1. Log in to the admin panel.
  2. Go to Settings.
  3. Update Site URL to your production domain.
  4. Save.

Also update SITE_URL in config.php if you set it there.

Ongoing deployments

For subsequent deployments (after the site is live and editors are using it), be careful:

  • Uploading page files — safe. New HTML structure changes take effect immediately.
  • Overwriting the database — dangerous! This would erase all editor content, revisions, and images. Don't overwrite the production database unless you intend to reset all content.
  • Adding new pages — create them in the admin panel on production, or add the HTML file and the admin panel page record separately.

Deployment checklist

  • HTTPS configured and working
  • config.php has production DB credentials and SITE_URL
  • install.php deleted (RuntCMS does this automatically; verify it's gone)
  • install.lock exists
  • cms/uploads/ is writable
  • cms/pages/ is writable
  • SMTP configured in Settings (for password reset and 2FA emails)
  • Admin account password is strong and unique
  • 2FA enabled on admin account (recommended)
  • robots.txt reviewed — make sure it allows crawling if the site should be indexed
  • Visit the live site as a logged-out user and check all pages load correctly

Updating RuntCMS

When a new version of RuntCMS is released, the update process is:

  1. Download the new release archive.
  2. Upload and overwrite your existing files via FTP — do not overwrite config.php, install.lock, cms/uploads/, or cms/pages/.
  3. Log in to the admin panel and go to Upgrade in the sidebar.
  4. If any database migrations are pending, click Run Migrations to apply them.
Migrations are small SQL files that update the database structure when a new version requires it. RuntCMS tracks which ones have been applied, so running the Upgrade page is always safe — already-applied migrations are never run twice.
Database privileges: Some migrations require CREATE or ALTER privileges. If a migration fails with a permissions error, you'll need to run it manually. The Upgrade page includes step-by-step instructions for both cPanel/phpMyAdmin and the MySQL command line.

Using Git for deployments

If you use Git for version control:

  • Add config.php and install.lock to .gitignore
  • Commit your page HTML files, CSS, JS, and template changes
  • Do not commit cms/uploads/ — these are user-uploaded files that belong on the server
  • Do not commit vendor/ if you run Composer locally — or do commit it if you want a self-contained deploy

A simple deployment via Git pull:

# On your server
cd ~/public_html
git pull origin main

# Run Composer if dependencies changed (requires Composer on server)
composer install --no-dev --optimize-autoloader

RuntCMS 0.9 Documentation