Skip to content

Repository files navigation

Backup for ExpressionEngine

Backup is an ExpressionEngine add-on that creates portable ZIP backups of your site files, database, or both from the control panel.

Features

  • Create a full backup containing site files and a SQL database dump.
  • Create database-only backups as ZIP files containing database.sql.
  • Create site-file-only backups.
  • Download and delete backups from the ExpressionEngine control panel.
  • Uses ExpressionEngine path constants so renamed system folders and Windows paths are supported.
  • Stores backups in the ExpressionEngine cache directory instead of public uploads.
  • Excludes cache, temp files, previous backups, .git, and node_modules from site-file backups.

Requirements

  • ExpressionEngine 7 or newer.
  • PHP 8.0 or newer.
  • PHP zip extension enabled (ZipArchive).
  • A database user with permission to read tables and run SHOW CREATE TABLE.
  • Enough disk space for the generated ZIP file.

Installation

  1. Copy the backup folder to system/user/addons/backup.
  2. In the ExpressionEngine control panel, go to Developer -> Add-ons.
  3. Install Backup.
  4. Open Add-ons -> Backup.

You can also install with the ExpressionEngine CLI:

php system/ee/eecli.php addons:install --addon=backup

Usage

  1. Open Add-ons -> Backup.
  2. Choose one backup type:
    • Full Backup: public files, system files, themes, and database.
    • Database Only: SQL dump only.
    • Site Files Only: files only.
  3. Click Create Backup.
  4. Download the backup from the Existing Backups table.

Backups are stored in:

system/user/cache/backup

If your ExpressionEngine system folder has been renamed, Backup uses the runtime PATH_CACHE constant instead of assuming the folder is named system.

Security Notes

  • Backup files can contain source code, configuration files, uploaded assets, and database contents.
  • Store downloaded backups securely.
  • Delete old backups from the control panel when they are no longer needed.
  • The backup storage folder includes an empty index.html and .htaccess deny rule for Apache, but server-level access rules can vary. Prefer keeping the cache directory outside public web access when possible.
  • Only trusted control panel users should have access to this add-on.

Portability

Backup normalizes ZIP entry paths to forward slashes, which keeps archives readable across Linux, macOS, and Windows. It discovers roots from ExpressionEngine configuration and constants such as base_path, FCPATH, SYSPATH, PATH_THEMES, and PATH_CACHE.

Restoring Backups

This add-on creates backup archives only. Restore manually by:

  1. Extracting the site files from the ZIP archive.
  2. Uploading files to the correct server paths.
  3. Importing database.sql with your database tool of choice.
  4. Checking system/user/config/config.php and environment-specific settings after restore.

Always test restores in a staging environment before relying on a backup workflow in production.

License

MIT. See LICENSE.

About

ExpressionEngine Site and DB Backup

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages