PHPackages                             atomicsmash/backups - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. atomicsmash/backups

ActiveWordpress-plugin

atomicsmash/backups
===================

Backups

0.1.2(6y ago)211.4k[5 issues](https://github.com/AtomicSmash/backups/issues)MITPHPCI failing

Since Oct 6Pushed 6y ago3 watchersCompare

[ Source](https://github.com/AtomicSmash/backups)[ Packagist](https://packagist.org/packages/atomicsmash/backups)[ Docs](http://www.atomicsmash.co.uk/)[ RSS](/packages/atomicsmash-backups/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (1)Versions (12)Used By (0)

This plugin is for backing up a WordPress website to Amazon S3.

Plugin features
---------------

[](#plugin-features)

- Database backup
    - Saves a local database dump with an obscure file name.
    - Syncs local database with S3.
    - Removes local copy to reduce wasted HDD space.
    - Local development databases can be synced as well.
- Media library backup
    - Two way sync of uploads folder and Amazon S3.
    - This can be used for backing up live websites but also for syncing local development assets between developers.
- Offload S3 integration - *Coming soon*
    - After media has been moving transferred, you can save the local meta data required for offload S3 to starting loading assets from S3.

Functions
---------

[](#functions)

### wp backups backup

[](#wp-backups-backup)

> This function syncs media, performs a DB backup and sync the database to S3.

Examples

```
wp backups backup
- backup media and database

wp backups backup --type=media
- This just syncs your media

wp backups backup --type=database
- Use this to dump the DB and sync with S3

```

### wp backups development\_sql\_sync

[](#wp-backups-development_sql_sync)

Examples

```
wp backups development_sql_sync
- This checks the status of the remote development database

wp backups development_sql_sync --sync-direction=push
- This checks the status of the remote development database
- Then provides the option to overwrite the remote database with what is available locally

wp backups development_sql_sync --sync-direction=pull
- This checks the status of the remote development database
- Then provides the option to overwrite the local database with what is available on S3

```

Installation
------------

[](#installation)

#### 1. Add the Wordpress plugin to your composer file by navigating to your project and running this inside a terminal:

[](#1-add-the-wordpress-plugin-to-your-composer-file-by-navigating-to-your-project-and-running-this-inside-a-terminal)

```
composer require atomicsmash/backups "*"

```

Commit the changes to your local composer file.

#### 2. Add your S3 credentials to your wp-config file.

[](#2-add-your-s3-credentials-to-your-wp-config-file)

And these constants to your wp-config file:

```
define('BACKUPS_S3_REGION','eu-west-2'); //London
define('BACKUPS_S3_ACCESS_KEY_ID','');
define('BACKUPS_S3_SECRET_ACCESS_KEY','');

```

You can obtain these details by creating an IAM user. Here is [our guide](https://github.com/AtomicSmash/backups/wiki/Getting-AWS-credentials) on how to setup an IAM Amazon user and get the access and secret key that you need.

If you know the name of the bucket you would like to sync with, you can hard this by adding:

```
define('BACKUPS_S3_BUCKET','');

```

Commit the changes to your config.

#### 3. Activate 'Backups'

[](#3-activate-backups)

Now activate the plugin on whichever site you would like backup. This can be done via the admin interface, or by running:

```
wp plugin activate backups

```

If you want to backup a live website, chances are you will need to SSH into the server.

#### 4. Test S3 connection:

[](#4-test-s3-connection)

To test the connection to S3 run:

```
wp backups check_credentials

```

If there is an issue, please check your credentials are being loaded and are correct.

#### 5. If the check is successful, it's time to create a fresh bucket

[](#5-if-the-check-is-successful-its-time-to-create-a-fresh-bucket)

```
wp backups create_bucket

```

`bucket_name` is usually the address of the site you are currently working on ('website.local'). For example:

```
wp backups create_bucket mywebsite.co.uk

```

Running the above command will ask the question: `Create bucket? [y/n]` - supply 'y' to continue.

This will then create a bucket called "mywebsite.co.uk.backup" and select it ready for use.

#### 6. Perform a backup

[](#6-perform-a-backup)

To start the first backup manually,

```
wp backups backup

```

#### 7. Setup auto-deletion of SQL files

[](#7-setup-auto-deletion-of-sql-files)

Depending on how often you backup your website, the SQL files will start to build up quickly. You can setup an S3 folder lifecycle to auto-delete files older than X number of days.

```
wp backups setup_autodelete_sql

```

We usually usually retain backups for 30 days, so we would run:

```
wp backups setup_autodelete_sql 30

```

#### 8. Setting up auto-backup (cron job)

[](#8-setting-up-auto-backup-cron-job)

To get the backup command to run on a regular basis, you need to setup a cron job. Use something similar to this:

```
/usr/local/bin/wp backups backup --path=/path/to/www.website.co.uk/

```

If you are using composer in your project then your WordPress core files might be inside a subfolder, please modify the path to reflect this. The cron job would look like this:

```
/usr/local/bin/wp backups backup --path=/path/to/www.website.co.uk/wp

```

If you are using forge, then simply add to the server scheduling panel:

[![forge-schedule](https://user-images.githubusercontent.com/1636310/46582964-1cd4d880-ca47-11e8-90f1-c80e0ba625d6.png)](https://user-images.githubusercontent.com/1636310/46582964-1cd4d880-ca47-11e8-90f1-c80e0ba625d6.png)

Also, if you are using Capistrano, don't forget to add `current` to the

```
/usr/local/bin/wp backups backup --path=/path/to/www.website.co.uk/current/wp

```

Troubleshooting
---------------

[](#troubleshooting)

Are you receiving an error similar to `PHP Fatal error:  Uncaught Error: Class 'Aws\S3\S3Client' not found in /path/to/file`

Make sure you are requiring your autoload.php generated by composer. We usually add this to the top of our wp-config file:

```
require( dirname( __FILE__ ) . '/vendor/autoload.php' );

```

Upcoming featured
=================

[](#upcoming-featured)

- Backup stats
- Added 'restore' functionality

Changelog
=========

[](#changelog)

= 0.1.2 =

- Added more exceptions for downloading data/development sql files

= 0.1.1 =

- Added exception for downloading data/development sql files

= 0.1.0 =

- Added local development database backups
- Added better plugin development detection by looking for the existence of an vendor/autoload.php file
- There is a new BACKUPS\_S3\_BUCKET constant to hard code the preferred bucket

= 0.0.5 =

- Updated readme

= 0.0.4 =

- Improved UX when creating a bucket
- FIXED issue with syncing DB backups back to local machine from S3

= 0.0.3 =

- Added offload S3 functionality
- Added setup guide
- Added lifecycle addition for SQL folder

= 0.0.2 =

- Simplified media transferring

= 0.0.1 =

- Project renamed from log-flume to 'Backups'
- Added database backup functionality

###  Health Score

25

↓

LowBetter than 37% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~46 days

Recently: every ~80 days

Total

8

Last Release

2451d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1ece800089b8d593741a22cab40028b7d5119a3b5e89d86d913a829251562e10?d=identicon)[atomicsmash](/maintainers/atomicsmash)

---

Top Contributors

[![daviddarke](https://avatars.githubusercontent.com/u/1636310?v=4)](https://github.com/daviddarke "daviddarke (56 commits)")

---

Tags

plugindevwordpress

### Embed Badge

![Health badge](/badges/atomicsmash-backups/health.svg)

```
[![Health](https://phpackages.com/badges/atomicsmash-backups/health.svg)](https://phpackages.com/packages/atomicsmash-backups)
```

###  Alternatives

[sybrew/the-seo-framework

An automated, advanced, accessible, unbranded and extremely fast SEO solution for any WordPress website.

47078.8k](/packages/sybrew-the-seo-framework)[afragen/git-updater

A plugin to automatically update GitHub, Bitbucket, GitLab, or Gitea hosted plugins, themes, and language packs.

3.3k1.6k](/packages/afragen-git-updater)[webdevstudios/cmb2-attached-posts

Custom field for CMB2 for creating post relationships.

13565.5k](/packages/webdevstudios-cmb2-attached-posts)[atomicsmash/acf-limiter-field

Advanced Custom Fields: Limiter Field

112.8k](/packages/atomicsmash-acf-limiter-field)[alleyinteractive/pest-plugin-wordpress

WordPress Pest Integration

263.7k1](/packages/alleyinteractive-pest-plugin-wordpress)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
