=== Supan Backup – Full-Site WXR Export & Disaster Recovery ===
Contributors: gandatechservices, ashishgurprit
Tags: backup, restore, wxr export, media manifest, disaster recovery
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.0
Stable tag: 1.2.2
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html

One-click full-site WXR backup and media manifest from wp-admin. Restore via standard WordPress importer. WP-Cron schedule + history.

== Description ==

Most WordPress sites have no backup until the day they need one. A corrupted update, a botched migration, a hacked plugin — and suddenly months of content is gone.

**Supan Backup** gives you a safety net that actually works. Generate a complete WXR export of all your published posts and pages, plus a full media manifest with every image URL, dimensions, and alt text — packaged and ready to restore via the standard WordPress importer.

One click from wp-admin. Backup history kept on disk. Optional WP-Cron schedule for hands-off protection.

= Key Features =

* **Full WXR content export** — every published post and page, with categories, tags, featured images, and Yoast/RankMath SEO meta preserved
* **Media manifest** — complete inventory of your media library with URLs, file dimensions, file sizes, and alt text for surgical media restoration
* **Backup history table** — see every backup job: timestamp, status, file size, and direct download links for WXR and manifest files
* **Backup Now button** — trigger an on-demand backup from the Tools menu in wp-admin at any time
* **Scheduled backups** — set daily or weekly WP-Cron schedules for fully automated protection
* **Restore via WordPress importer** — WXR files import via Tools → Import → WordPress on any WordPress site
* **Token-named upload directory** — backup files are stored in an unguessable path with .htaccess and directory-listing protection

*About the name: "Supan" (スパン) is a Japanese loanword meaning "span" — the arc or spectrum of connections. It reflects the family of Supan plugins for WordPress site management.*

= External Services =

This plugin sends backup metadata (job status, completion timestamps) to the **Supan API** (hosted on Google Cloud Run). WXR and media manifest files are generated locally on your server and tracked by job ID via the API for backup-history listing.

* **Service URL:** https://gts-seo-engine-711239021998.australia-southeast1.run.app
* **Terms of Service:** https://supan.cchk.info/terms
* **Privacy Policy:** https://supan.cchk.info/privacy

Data sent: backup job metadata (site URL, job ID, status, timestamps, generated file URLs). WXR content and media manifest files themselves remain on your server. No visitor or customer data is transmitted.

= Source Code =

The full PHP source is included in this plugin. Build tooling is not required — this plugin has no compiled assets.

== Installation ==

1. Upload the `supan-backup` folder to `/wp-content/plugins/`
2. Activate the plugin through **Plugins → Installed Plugins**
3. Navigate to **Tools → Supan Backup** in the left menu
4. Enter your **API Key** from [supan.cchk.info/supan-backup](https://supan.cchk.info/supan-backup)
5. Click **Backup Now** to run your first export

== Frequently Asked Questions ==

= What exactly is exported in the WXR file? =

Every published post and page, including: title, content, excerpt, categories, tags, featured image ID, Yoast SEO meta title, Yoast SEO meta description, and custom fields. The format is standard WordPress Extended RSS (WXR) — importable via Tools → Import in any WordPress site.

= What is the media manifest? =

A JSON file listing every attachment in your media library: file URL, uploaded filename, MIME type, image dimensions (width × height), file size in bytes, and alt text. Use it to re-download or re-import media after a restore.

= Can I restore from a WXR backup? =

Yes. Standard WXR files import via **Tools → Import → WordPress** on any WordPress site. For full media restoration, use the media manifest to identify and re-upload files.

= Does it work with Yoast SEO or RankMath? =

Yes. Supan Backup automatically reads and preserves your Yoast `_yoast_wpseo_title` / `_yoast_wpseo_metadesc` meta fields in every export.

= Will it slow down my site? =

No. Backup generation runs on-demand from wp-admin or via WP-Cron in the background. There are zero frontend scripts and no performance impact on your visitors.

= What PHP version is required? =

PHP 8.0 or higher.

= Is the plugin GDPR-compliant? =

Backup files contain your content (posts, pages, media metadata). No visitor personal data is included in exports. See our [Privacy Policy](https://supan.cchk.info/privacy) for full details.

== Changelog ==

= 1.2.2 =
* Admin JavaScript moved out of an inline `<script>` block into `assets/admin.js`, registered via `wp_enqueue_script()` and parameterised via `wp_localize_script()`, per WordPress.org Plugin Check guidance. No functional changes — same backup behavior, just a cleaner enqueue.

= 1.2.1 =
* Author URI updated to https://g-t-s.com.au (Ganda Tech Services Pty Ltd — the entity behind this plugin and the supan.cchk.info product domain) so it matches the registered WordPress.org contributor email.

= 1.2.0 =
* Initial public submission to WordPress.org. Updated plugin URLs to the supan.cchk.info domain, refreshed listing copy for clarity and discoverability, and moved the brand-etymology note to the end of the description.

= 1.1.0 =
* Renamed to Supan Backup; updated plugin URLs and class prefixes
* Removed client-side license gating

= 1.0.0 =
* Initial public release
* On-demand WXR full-site content export
* Media manifest JSON generation
* Backup history table with download links
* WP-Admin Tools menu integration
* Yoast SEO and RankMath meta field preservation

== Upgrade Notice ==

= 1.2.2 =
Admin JavaScript moved to a proper enqueued asset file per WordPress.org Plugin Check guidance. No functional changes.

= 1.2.1 =
Author URI updated to g-t-s.com.au (parent company of the supan.cchk.info product domain). No functional changes.

= 1.2.0 =
First public WordPress.org release. Updated plugin URLs to supan.cchk.info. No functional changes.

= 1.1.0 =
Renamed to Supan Backup. Plugin slug, class prefix, and option names have been refreshed.
