=== iP Site Backup & Restore ===
Contributors: ip-labs.gr
Requires at least: 5.8
Requires PHP: 7.4
Stable tag: 1.2.1
License: GPLv2 or later

Full-site backup (files + database) into one zip. Download it, restore it from the list, or upload a zip and restore.

== Where ==
Tools → Site Backup (administrators only).

== What is in a backup ==
* manifest.json – site URL, table prefix, WP/PHP version, date
* database.sql  – all tables with this site's table prefix
* files/        – everything under the WordPress folder, except:
  the backups folder itself, wp-content/cache, wp-content/upgrade,
  other backup plugins' folders, .git, node_modules
  (add more with the `ipsbr_excluded_paths` filter).

== Restore ==
* Files are written first, then the database is imported.
* NOT overwritten: wp-config.php, this plugin's own folder, the backups folder.
* Files created after the backup are NOT deleted.
* By default a "pre-restore" safety backup of the current site is taken first.
* "Restore options" let you choose what to restore: database, uploads, themes, plugins,
  other wp-content, WordPress core (core is off by default).

== Migration (new in 1.2.0) ==
Install the plugin on the new site, upload the backup zip, pick the parts and restore.
* Different address (domain, www, http/https, sub-folder): all URLs are replaced in the database,
  including serialized data (widgets, theme settings, builders) and JSON-escaped block data.
  Post GUIDs are never changed. The old server path is replaced too.
* Different table prefix (wp_ vs xyz_): tables are renamed while importing; user roles and
  user meta keys are converted.
* "Keep the users of this site" (on by default): the users/usermeta of the new site stay, so you
  remain logged in; posts/comments by unknown authors are assigned to you.
* Without it, users come from the backup and you log in with the source site's credentials.
* If "Plugins"/"Themes" are not selected, the new site's active plugins/theme are kept.
* This plugin stays active, wp-config.php is never touched; cache drop-ins
  (object-cache.php, advanced-cache.php, db.php) are not copied to another host.
* MariaDB <-> MySQL collations are converted automatically if the new server does not know them.
* After migrating: Settings -> Permalinks -> Save, and clear cache plugins.
* Backups made with 1.1.0 or older can be migrated too (the old server path is just not replaced).

== Storage & security ==
* Backups live in wp-content/uploads/sbr-backups/, protected by .htaccess / web.config,
  and every file name has a random part (for Nginx, which ignores .htaccess).
* Downloads go through an admin-only, nonce-protected handler.
* Only one backup/restore can run at a time (file lock).
* "Keep the latest N backups" deletes older zips automatically (0 = keep all).
  Safety and uploaded backups count toward N; the backup being restored is never deleted.

== Requirements ==
* PHP Zip extension (ZipArchive), MySQL/MariaDB (mysqli).
* Designed for sites up to ~500 MB. Everything runs in one request, so very large
  sites may hit the host's PHP time limit.
* Upload restore is limited by the server's upload_max_filesize / post_max_size.

== Changelog ==
= 1.2.1 =
* Plugin name now ends with the version ("iP Site Backup & Restore 1.2.1").

= 1.2.0 =
* Migration: restore on another domain / table prefix, with serialization-safe URL replacement.
* Restore options: choose database, uploads, themes, plugins, other, core; keep this site's users.
* WordPress core files are no longer restored unless selected.
* Manifest now stores the server path and wp-content folder.

= 1.1.0 =
* Renamed to iP Site Backup & Restore (folder ip-site-backup-restore), by iP-Labs.gr.
* "Settings" link in the Plugins list.
* Backups made with the old "Site Backup & Restore" are still listed and can be restored
  (same backups folder, same "keep latest N" setting).
* Filter renamed: sbr_excluded_paths → ipsbr_excluded_paths.
