=== AegisBackup ===
Contributors: aegisify
Donate link: https://aegisify.com
Tags: backup, restore, migration, database, security
Requires at least: 6.8
Tested up to: 6.9
Requires PHP: 8.2
Stable tag: 1.1.24
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Professional WordPress backup, restore, and migration plugin built for shared hosting with safe wizards, table tools, and recovery-first workflows.

== Description ==

AegisBackup is part of the **Aegisify ecosystem** and was built with one clear objective:

**Make WordPress backups, restores, and migrations predictable, safe, and transparent — even under strict hosting limits.**

Unlike traditional backup plugins that rely on fragile AJAX loops or opaque restore logic, AegisBackup uses **guided workflows, explicit confirmations, and connection-aware migrations** that match how WordPress hosting actually works.

---

## Core Features

### 🔹 Database Backups
* Full database backups
* Selective table backups
* Column-aware exports
* Scheduled database plans
* Safe table replacement logic
* Prefix-aware restore workflows

### 🔹 File Backups
* Full WordPress file backups
* Selective directories/files
* Tree-based file selector (no AJAX dependency)
* Scheduled file backup plans
* ZIP-based storage optimized for shared hosting

### 🔹 WordPress Backups (Snapshots)
* Full WordPress snapshots (files + database)
* Environment and metadata capture
* Safe restore into existing installations
* Optional advanced restore into a new database

---

## 🚀 Push / Pull Migration (NEW)

AegisBackup introduces a **secure Push / Pull Migration system** designed for moving WordPress sites **between live servers**.

### How It Works
* Destination WordPress generates a short-lived, HMAC-signed token
* Source WordPress connects securely using that token
* Source can:
  - **Migrate Database Backups**
  - **Migrate Selected Files / Directories**
* Destination receives and stages incoming data safely
* Restore actions are always explicit and user-controlled

### Migration Capabilities
* Push database backups to another WordPress site
* Push selected files or directories (relative to `/public_html/`)
* Destination-side listing of received DB backups
* One-click Restore or Delete on the Destination
* Connection auto-expiration for security
* No FTP, no SSH, no manual uploads

### Destination Restored Site 
* You will need to add your temporary domain - WP-CONFIG.PHP
define('WP_HOME', 'https://hostname.hostingprovider.com');
define('WP_SITEURL', 'https://hostname.hostingprovider.com');

### Increase Backups blocks - WP-CONFIG.PHP
Insert into wp-config.php - Aegisbackup 
define('AEGISBACKUP_FILES_BATCH', 500);     // default 120
define('AEGISBACKUP_DB_EXPORT_LIMIT', 1000); // default 250

* Once you have validated everything has been transferred over, you can remove those two lines and your site will be restored.  Please be sure to update your DNS records to reflect the new hosting.
* Quick checks:  Settings -> General -> you should see
WordPress Address
Site Address

---

## 🔐 Designed for Shared Hosting
AegisBackup is built for environments with:
* Low memory limits
* Execution time limits
* Database permission restrictions

All restore and migration operations are:
* Chunk-safe
* Prefix-aware
* Explicitly confirmed
* Recoverable if interrupted

---

== Installation ==

1. Upload the `aegisbackup` folder to `/wp-content/plugins/`
2. Activate the plugin through the WordPress Plugins menu
3. Navigate to **AegisBackup → Backups & Migrate**
4. Configure backups, restores, or migrations as needed

---

== Usage ==

### Database Backups
Navigate to:
**AegisBackup → Backups & Migrate → Database Backups**

* Create full or table-specific backups
* Schedule recurring database backups
* Download, delete, or migrate backups to another site

### File Backups
Navigate to:
**AegisBackup → Backups & Migrate → File Backups**

* Select files/directories using a tree-based selector
* Schedule recurring file backups
* Restore or migrate selected files safely

### Migration Wizard
Navigate to:
**AegisBackup → Backups & Migrate → Migration Wizard**

* Connect Source and Destination WordPress sites
* Migrate database backups
* Migrate selected files/directories
* Monitor incoming backups on the Destination
* Restore with explicit confirmation

---

== Restore Wizard ==

### Default (Recommended)
**Restore into existing WordPress installation**
* Uses current database and wp-config.php
* Safely drops existing WordPress tables
* Restores backup tables and files
* Fixes URLs, paths, and permalinks
* Cleans up temporary files

### Advanced
**Restore into a new database**
* User-supplied database credentials
* Restores into isolated database
* Optional wp-config.php update
* Intended for advanced users

---

== Changelog ==

= 1.1.24 =
* Cleanup and fix minor bug on Transfer Wizard

= 1.1.23 =
* Offline restoration.

= 1.1.22 =
* Plugin submission - cleanup.

= 1.1.21 =
* Plugin submission - cleanup.

= 1.1.20 =
* Plugin Submission: stability improvements and admin-side hardening.

= 1.1.19 =
* Maintenance release: stability improvements and admin-side hardening.
* Improved input handling (sanitization) for admin actions and restore workflows.
* UI and logging refinements.

= 1.1.18 =
* Maintenance and UI refinements.

= 1.1.17 =
* Maintenance release.

= 1.1.16 =
**Push / Pull Migration & Live Transfer Enhancements**

* Added secure Push / Pull Migration system
* Destination-side connection listening with token-based authentication
* Source-side migration of:
  - Database backups
  - Selected files/directories
* Destination now lists received database backups with:
  - Restore
  - Delete
* Integrated Database Table Backups into Migration Wizard
* Package selector no longer auto-selects backups
* Default base path set to `/public_html/` for Source and Destination
* Improved shared-hosting safety and clarity

= 1.1.15 =
* UI and stability improvements
* Backup listing persistence fixes
* Improved migration package handling

= 1.1.14 =
* Restore background process improvements
* Improved job state tracking and recovery

= 1.1.13 =
* Restore / Migrate tabs renamed for clarity
* Migration UI improvements

= 1.1.12 =
* Restore / Migrate submenu split
* Restore tab lists backups by type

= 1.1.11 =
* Improved migration package layout
* Fixed database restore edge cases

= 1.1.10 =
* Database Prefix Manager improvements

(earlier changelog entries preserved)

---

== Upgrade Notice ==

= 1.1.16 =
This update introduces secure Push / Pull Migration and destination-side restore management. Highly recommended for users performing site migrations.

---

== Support ==

Documentation, updates, and support:
https://aegisify.com

---

== Disclaimer ==

Always test restores and migrations in a staging environment first.  
AegisBackup performs destructive operations during restore and requires explicit user confirmation.
