With a couple of Laravel developments out in the wild, I needed to make sure that they were integrated with my existing backup solution, which includes archived / off-server storage of backups. Pulling down the backups once I had them is pretty straightforward – everything is already set up to do that from the servers I use.
For WordPress sites, I usually use the BackUpWordPress plugin from the team at Human Made:
BackUpWordPress
by Tom Willmot
BackupWordPress was created by our friends at Human Made but is now under new ownership. We’re committed to opensource and WordPress and will provide free support for the many BackupWordPress fans.
We’ll make occasional updates to the free software – please send us any patches you’d like to see released here: https://github.com/orgs/xibodevelopment/
However, we’ll no longer be selling or supporting the paid add-ons (e.g. for backups to Dropbox and Google Drive). It’s certainly a good idea to backup to cloud storage to protect against server-wide risks.
For this we recommend UpdraftPlus WordPress Backups which can do things for free BackupWordPress Premium could do on a paid basis. Click here for full comparison.
BackUpWordPress will back up your entire site including your database and all your files on a schedule that suits you. Try it now to see how easy it is!
This plugin requires PHP version 5.3.2 or later
Features
- Super simple to use, no setup required.
- Works in low memory, “shared host” environments.
- Manage multiple schedules.
- Option to have each backup file emailed to you.
- Uses
zip and mysqldump for faster backups if they are available.
- Works on Linux & Windows Server.
- Exclude files and folders from your backups.
- Good support should you need help.
- Translations for Spanish, German, Chinese, Romanian, Russian, Serbian, Lithuanian, Italian, Czech, Dutch, French, Basque.
Translations
We’d also love help translating the plugin into more languages, if you can help then please visit https://translate.wordpress.org/projects/wp-plugins/backupwordpress/dev/ to start translating.
Stats:
- Current version: 3.14
- Rating: 94(1373 ratings)
- Downloaded 4,917,529 times
For Laravel though, I was starting afresh. I found what looked like a good solution in the form of the Laravel Backup package from the team at Spatie. There were a couple of things I liked about the package:
- It’s simple, straightforward, and does one thing (create backups) well.
- It’s from a team who have a clear track record of delivering open source packages
- From a look through the issue queue, it’s well maintained and open to pull requests from users.
A package to backup your Laravel app
https://github.com/spatie/laravel-backup
784 forks.
6,025 stars.
0 open issues.
Recent commits:
- Update CHANGELOG, github-actions[bot]
- Fix an empty-string archive password silently enabling encryption (#1984)* Fix an empty-string archive password silently enabling encryptionenv('BACKUP_ARCHIVE_PASSWORD') returns '' (not null) for a key that ispresent but empty in .env. BackupConfig::fromArray() only coalesced amissing/null password, so an empty string still reached Zip, whichtreats any non-null password as "encryption wanted" and callsZipArchive::setEncryptionName() with an empty password — libzip thenthrows "ZipArchive::close(): Invalid argument" while finalizing thearchive, with no indication the password was the cause.Coerce a blank password to null in BackupConfig so a config value like'password' => env('BACKUP_ARCHIVE_PASSWORD') actually disablesencryption when the env var is left blank, matching the documentedbehavior ("Set to `null` to disable encryption").Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>Claude-Session: https://claude.ai/code/session_01FcjsrViJZQLGoQs1cXXH9D* Only treat an empty string password as missingA whitespace-only password is valid for libzip, so trimming it wouldsilently disable encryption. Also covers the empty string end to end.Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>———Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>Co-authored-by: Freek Van der Herten <freek@spatie.be>, GitHub
- Update CHANGELOG, github-actions[bot]
- Drop the redundant temporary directory rebinding in resolveConfigThe service provider already binds `backup-temporary-project` to a lazyclosure that reads `config('backup.backup.temporary_directory')`, and`resolveConfig()` overwrites that config key before the container istouched. Rebinding it here changed nothing, and it duplicated the`storage_path('app/backup-temp')` fallback, which could drift from theservice provider's copy.Covered by a test asserting the alternate config's temporary directorywins over the default one when running with `–config`., Freek Van der Herten
- Fix styling, github-actions[bot]
While I’m using it to back up to the local filesystem initially (backups are then transferred offsite separately by an existing system), the package allows you to put your backups onto any supported filesystem, so having it backup to S3, Dropbox, FTP, Rackspace cloud files or similar is just as straightforward.
I love the team’s concept of “Postcardware“, it’s nice as an open source author to know that your work is being appreciated, and used, and I hope they get plenty of postcards!
I have to say though, the real highlight in finding this package was finding Spatie and their broad range of Laravel packages – there’s at least one more that features in this series, and I can easily see myself using more of their packages in the future – thanks Spatie!