Skip to content

Moving Servers

This guide explains how to back up and restore a CMS installation, or move it between servers.

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-backup inside it

If you’d rather collect the files yourself:

  1. Upgrade old versions: if your CMS predates version 2.11, update to the latest version for improved backup and restore functionality.

  2. 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)
  3. 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
  1. 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.
  2. Delete isInstalled.php from the data folder (/cmsb/data/ by default)

    • This file signals that installation is complete. Removing it triggers the installation screen again.
  3. Run the program installation by navigating to /cmsb/admin.php in 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 .zip backups require the PHP ZipArchive extension.
  4. 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 as http://example.com/
      • Use relative filepaths like uploads or ./uploads instead of absolute paths like /var/www/example.com/htdocs/uploads
    • If the servers serve the site under different URL prefixes (e.g. /~username on a development server), set Website Prefix URL in Admin Menu > General Settings. It’s automatically added to viewer URLs and available in code as CMS::$prefixUrl

You’re complete!

For older CMS versions or very large databases, use phpMyAdmin, mysqldump, or similar tools. Contact your web host or server administrator for guidance.

Documents CMS Builder 3.83