{"id":20271852,"url":"https://github.com/tanrax/wp-backup","last_synced_at":"2025-06-18T14:33:11.839Z","repository":{"id":79955429,"uuid":"268281708","full_name":"tanrax/wp-backup","owner":"tanrax","description":"Snapshot and backups for WordPress in pure Bash","archived":false,"fork":false,"pushed_at":"2022-03-29T14:55:57.000Z","size":326,"stargazers_count":22,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-11T04:34:03.992Z","etag":null,"topics":["backup","bash","database","restore","shell","wordpress"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tanrax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"tanrax","ko_fi":"androsfenollosa"}},"created_at":"2020-05-31T13:04:51.000Z","updated_at":"2023-08-14T22:51:24.000Z","dependencies_parsed_at":"2023-05-24T12:45:31.148Z","dependency_job_id":null,"html_url":"https://github.com/tanrax/wp-backup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tanrax/wp-backup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanrax%2Fwp-backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanrax%2Fwp-backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanrax%2Fwp-backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanrax%2Fwp-backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tanrax","download_url":"https://codeload.github.com/tanrax/wp-backup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanrax%2Fwp-backup/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260570322,"owners_count":23029664,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backup","bash","database","restore","shell","wordpress"],"created_at":"2024-11-14T12:39:35.557Z","updated_at":"2025-06-18T14:33:06.821Z","avatar_url":"https://github.com/tanrax.png","language":"Shell","funding_links":["https://github.com/sponsors/tanrax","https://ko-fi.com/androsfenollosa"],"categories":[],"sub_categories":[],"readme":"\u003ch2 align=\"center\"\u003e\nSnapshot and backups for WordPress in pure Bash \n\u003c/h2\u003e\n\u003cp align=\"center\"\u003e\n \u003cimg src=\"media/wp-backup-logo.png\" alt=\"logo\" width=\"300\"\u003e\n\u003c/p\u003e\n\nCreate **backups or restores on your WordPress** using a **simple Bash script** and don't rely on plugins or WP-CLI.\n\nWhy should I use it?\n\n- Easy.\n- Very fast.\n- Multi-site compatible.\n- Docker compatible.\n- Working with cron and any unix utility.\n- Maintains settings, plugins and any important elements.\n- Compatible with Linux, MacOS and BSD.\n\n## Use\n\n### Backup ⬇️ 📁 ➕ ⬇️ 📓\n\nCreate a zip file with important files and backup of the database.\n\n``` shell\n./wp-backup.sh backup-all\n```\n\n### Backup only database ⬇️ 📓\n\n``` shell\n./wp-backup.sh backup-database\n```\n\n### Restore only files ⬇️ 📁\n \n``` shell\n./wp-backup.sh restore-files [{backup}.zip]\n```\n\n### Restore only database ⬆️ 📓\n\n``` shell\n./wp-backup.sh restore-database [{database}.sql]\n```\n\n### Restore files and database ⬆️ 📁 ➕ ⬆️ 📓\n\n``` shell\n./wp-backup.sh restore-all [{backup}.zip]\n```\n\n### Check the connection to the database ✅ 📓\n\n``` shell\n./wp-backup.sh check-database\n```\n\n### Connection to the database 🔌 📓\n\n``` shell\n./wp-backup.sh connect-to-database\n```\n\n## Requirements \n\n- **bash** 4.0 or higher\n- **curl**\n- **zip**\n- Only macOS users, **gsed**: `brew install gnu-sed`\n\n## Install\n\nGo to the WordPress directory (Where are all the files and folders like wp-admin, wp-config, wp-content ...).\n\n``` shell\ncd wordpress-folder\n```\n\nDownload script.\n\n``` shell\ncurl -o wp-backup.sh https://raw.githubusercontent.com/tanrax/wp-backup/master/wp-backup.sh\n```\n\nGrant execute permissions.\n\n``` shell\nsudo chmod +x wp-backup.sh\n```\n\nRun.\n\n``` shell\n./wp-backup.sh\n```\n\n## Are you using Docker?\n\nEnter the container with bash. For example `wordpress_web_1`.\n\n``` shell\ndocker exec -it wordpress_web_1 bash\n```\n\nYou will need to enter the WordPress container and install a minimum of unix commands.\n\n- `zip`\n- `unzip`\n- `mariadb-client`\n\n``` shell\napt update \u0026\u0026 apt install -y mariadb-client zip unzip\n```\n\nRun `wp-backup.sh` inside container.\n\n``` shell\n./wp-backup.sh\n```\n\n## Disclaimer\n\nThe author is not responsible for any loss of information or side effects. Use at your own risk.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanrax%2Fwp-backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftanrax%2Fwp-backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanrax%2Fwp-backup/lists"}