=== UKH Pre-Update Backup Rollback ===
Contributors: khamami
Tags: backup, rollback, update, undo update, restore, wp-content backup, database backup, update safeguard
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Never lose your site to a bad WordPress update. Automatic backup before every update, one-click rollback to restore files and database. Free, GPLv2+.

== Description ==

**UKH Pre-Update Backup Rollback** is the safety net every WordPress update needs. It automatically backs up your entire site — files and database — right before every core, plugin, or theme update. If an update breaks something, restore everything to its exact pre-update state with one click. No technical skills required.

WordPress updates are risky. Every month, thousands of sites go down because a plugin update conflicts, a theme breaks, or a core update lands poorly. Without a rollback safety net, you are one click away from a white screen, lost sales, and hours of manual recovery.

This plugin removes that risk completely.

= Why you need it =

* **Updates fail. Always have a safety net.** — The most common WordPress disaster is a bad update. This plugin turns a potential catastrophe into a 10-second fix.
* **Zero technical skills needed** — No FTP, no phpMyAdmin, no command line. If you can click a button, you can roll back.
* **Full protection** — Backs up your entire `wp-content` (themes, plugins, uploads) AND the complete database, so nothing is missed.
* **You stay in control** — Keep multiple restore points. Delete old backups whenever you want.

= Key Features =

* **Automatic pre-update backup** — A snapshot (files + database) is created automatically before every WordPress core, plugin, or theme update.
* **One-click rollback** — Restore files and database to any previous snapshot with a single click.
* **Manual backup anytime** — Create a backup on demand from Tools → UKH Pre-Update Backup, even when no update is running.
* **Complete snapshots** — Captures your whole `wp-content` directory (themes, plugins, uploads) plus a full database dump.
* **Multiple restore points** — Keep several backups so you can go back to any point in time.
* **Protected storage** — Backups live in `wp-content/upbk-backups/`, blocked from direct web access.
* **Lightweight & free** — No external services, no bloat, GPLv2+ open source, 100% free forever.

= How it works =

1. Before an update runs, the plugin automatically creates a full snapshot (files + database).
2. Run the update as you normally would.
3. If anything looks wrong afterward, go to Tools → UKH Pre-Update Backup and click **Rollback**.
4. Your site returns to its exact pre-update state — in seconds.

= Perfect for =

* **Business & e-commerce sites** that cannot afford a minute of downtime.
* **Agency and freelance developers** updating client sites safely.
* **Bloggers and creators** who want peace of mind, not manuals.
* **Anyone** who has ever lost a site to a bad plugin update.

== Installation ==

1. Upload the `ukh-pre-update-backup-rollback` folder to `/wp-content/plugins/`, or search for "UKH Pre-Update Backup" in Plugins → Add New.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Open **Tools → UKH Pre-Update Backup** to see your snapshots.
4. Done — the plugin now protects every future update automatically.

== Frequently Asked Questions ==

= Is a backup created automatically before every update? =

Yes. The plugin hooks into WordPress update events, so a full snapshot (files + database) is created automatically before every core, plugin, and theme update. You can also create manual backups anytime from the admin page.

= How does the one-click rollback work? =

Rollback restores the complete snapshot — your entire `wp-content` directory and the full database — so your site returns to exactly how it was before the update. Just click "Rollback" on the backup you want to use.

= What happens if an update breaks my site? =

Don't panic. Log in (or use your hosting file manager), go to Tools → UKH Pre-Update Backup, and click Rollback on the latest backup. Your site is back online in seconds.

= Where are the backups stored? =

In `wp-content/upbk-backups/`, protected from direct web access by `.htaccess`. Only site admins can reach them through the plugin's admin page.

= How much disk space do backups use? =

It depends on your site size. A snapshot includes your full `wp-content` directory plus a database dump. You can delete old backups from the admin page to free up space — keep only the ones you need.

= Is this plugin really free? =

Yes. UKH Pre-Update Backup Rollback is 100% free and open source under GPLv2+. No premium tier, no upsells, no feature limits. Only the protection you need.

= Does it work with my hosting? =

Yes. It works on standard shared hosting, VPS, and managed WordPress hosts. It uses standard WordPress APIs and WP_Filesystem, with no special server requirements.

= Can I restore a single file instead of everything? =

No. Rollback restores the complete snapshot (files + database) so your site returns exactly to its pre-update state. This preserves consistency between your files and database.

== Upgrade Notice ==

= 1.0.3 =
Security hardening and reliability fixes per WordPress.org review. Recommended for all users.

== Changelog ==

= 1.0.3 =
* Fixed Plugin URI to resolve correctly (ukhtechnologies.my.id).
* Replaced any remaining ZIP extraction with strict per-file validation and path containment (zip-slip safe).

= 1.0.2 =
* Updated Plugin URI and Author URI to the live landing page (ukhtechnologies.my.id).
* Landing page redesigned with standalone navbar, bilingual toggle (ID/EN), and professional layout.

= 1.0.1 =
* Renamed plugin to a distinctive, brand-prefixed name (UKH Pre-Update Backup Rollback).
* All functions, classes, globals, and option names now use the `upbk_` prefix to avoid collisions.
* Hardened rollback/restore against path traversal (strict backup-ID sanitization + realpath containment + zip-slip guard).

= 1.0.0 =
* Initial release.
* Automatic pre-update backup for core, plugins, and themes.
* Manual backup and one-click rollback.
* Full wp-content + database snapshots.
