Moving Servers
This guide explains how to back up and restore a CMS installation, or move it between servers.
Backup
Section titled “Backup”The quickest option is a Website Backup: under Admin Menu > Backup & Restore, enter an optional backup name and click Create Backup. This produces a single zip containing your entire web root (/cmsb/, upload folders, viewer files) plus the data folder and a database dump. Use the Download button next to “Previous Backups” to save it to your computer.
Website Backup options:
- Skip database backup — if database size causes timeouts (back up the database separately with phpMyAdmin or mysqldump)
- Save to web root — if the default output location (the web root’s parent directory) isn’t writable
- Exclude any folder from the backup by placing an empty file named
.cms-no-backupinside it
Manual backup
Section titled “Manual backup”If you’d rather collect the files yourself:
-
Upgrade old versions: if your CMS predates version 2.11, update to the latest version for improved backup and restore functionality.
-
Create a database backup by selecting “Backup” under Admin Menu > Backup & Restore.
- This generates a backup file containing a snapshot of your MySQL data in the data folder’s
backups/directory (/cmsb/data/backups/by default; the exact path is shown on the Backup & Restore page)
- This generates a backup file containing a snapshot of your MySQL data in the data folder’s
-
Download all relevant files:
/cmsb/and its contents — contains the CMS files and database backups- Upload folders — by default uploads are stored in
/uploads/beside/cmsb/; download it, plus any alternate upload folders you’ve configured - Viewer files — download any PHP viewer files that display CMS content
Restore
Section titled “Restore”-
Upload all the relevant files you downloaded during backup.
- For a Website Backup, extract the zip and upload the web root contents to the new server. The database dump it contains lands in the data folder’s
backups/directory, where the restore step below will find it.
- For a Website Backup, extract the zip and upload the web root contents to the new server. The database dump it contains lands in the data folder’s
-
Delete
isInstalled.phpfrom the data folder (/cmsb/data/by default)- This file signals that installation is complete. Removing it triggers the installation screen again.
-
Run the program installation by navigating to
/cmsb/admin.phpin your browser.- Enter the MySQL details for the new site
- Click the “Restore from Backup” tab and select your backup file (it appears at the top)
- Click “Restore” and verify you can log in to the CMS
- Note: Restoring is only possible when the target database location (database + table prefix) has no pre-existing user accounts, and
.zipbackups require the PHP ZipArchive extension.
-
Update references to the old server
- The CMS automatically detects its environment when possible, but check for hardcoded old server references
- Review Admin Menu > General Settings, plugin code, viewers, and custom upload directories in the Field Editor
- Replace old server references with new ones, or preferably use server-agnostic references:
- Use relative domain URLs like
/instead of absolute URLs such ashttp://example.com/ - Use relative filepaths like
uploadsor./uploadsinstead of absolute paths like/var/www/example.com/htdocs/uploads
- Use relative domain URLs like
- If the servers serve the site under different URL prefixes (e.g.
/~usernameon a development server), set Website Prefix URL in Admin Menu > General Settings. It’s automatically added to viewer URLs and available in code asCMS::$prefixUrl
You’re complete!
Advanced Tips
Section titled “Advanced Tips”Manual MySQL backups and restores
Section titled “Manual MySQL backups and restores”For older CMS versions or very large databases, use phpMyAdmin, mysqldump, or similar tools. Contact your web host or server administrator for guidance.