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:
- Upload all files to
public_htmlvia FTP, SFTP, or your host's file manager. - Create a MySQL database and user in your hosting control panel.
- Visit
https://yourdomain.com/install.phpand run the installer. - 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 productioninstall.lock— remove this so the installer can run, or createconfig.phpmanually- 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');
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:
| Directory | Permission | Why |
|---|---|---|
cms/uploads/ | 755 or 775 | Image uploads |
cms/pages/ | 755 or 775 | Page 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
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:
- Log in to the admin panel.
- Go to Settings.
- Update Site URL to your production domain.
- 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.phphas production DB credentials and SITE_URLinstall.phpdeleted (RuntCMS does this automatically; verify it's gone)install.lockexistscms/uploads/is writablecms/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:
- Download the new release archive.
- Upload and overwrite your existing files via FTP — do not overwrite
config.php,install.lock,cms/uploads/, orcms/pages/. - Log in to the admin panel and go to Upgrade in the sidebar.
- If any database migrations are pending, click Run Migrations to apply them.
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.phpandinstall.lockto.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