=== TroubleFree ===
Contributors: idesolutions
Tags: updates, maintenance, rollback, client reports, multiple sites
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Update every WordPress site you look after from one dashboard, with a backup first and an automatic rollback if an update breaks something.

== Description ==

TroubleFree connects this site to your [TroubleFree](https://troublefreewp.com/) dashboard, where you can look after many WordPress sites in one place.

**Safe updates.** Before each plugin or theme update, the site keeps a copy of the current version. Afterwards the homepage, wp-admin and the pages you choose are checked, and if any of them shows a PHP or server error, the old version is put back automatically.

**Everything in one place.** See every site's plugins, themes, WordPress and PHP versions, waiting updates and known vulnerabilities on one dashboard, and update one site, a few, or all of them at once.

**Backups.** Start and see backups from the backup plugin you already use: UpdraftPlus, WPvivid, BackWPup, Duplicator, All-in-One WP Migration or Jetpack VaultPress Backup.

**For agencies.** Review each round of updates on one board, send clients a branded report of what was done, monitor uptime, show this plugin under your own name or hide it, and put a site in maintenance mode, all from the dashboard.

TroubleFree is free on up to 100 sites. Paid features are switched on per site and can be tried free for 14 days.

= Remote management =

Connecting this site gives the people using your TroubleFree account the ability to manage it from the dashboard: update, install, activate, deactivate and delete plugins, update themes and WordPress, undo updates, start backups, switch maintenance mode and white label on or off, and sign into wp-admin as an administrator you choose. Only connect sites you're responsible for, and use "Disconnect Site" in Settings > TroubleFree to end that access at any time.

= What this plugin does on your site =

* Adds a settings page (Settings > TroubleFree) with the access token your dashboard uses to connect.
* Adds REST API routes under `/wp-json/tfwp/v1/` that only answer requests carrying that access token.
* Offers an optional Rescue Helper, which you can install or remove from Settings > TroubleFree. It's a small must-use plugin (`wp-content/mu-plugins/tfwp-rescue.php`) that can put the previous version of a plugin or theme back even if an update leaves the site unable to load. Nothing is added to mu-plugins unless you install it, and it's removed when this plugin is deactivated.
* Keeps copies of plugins and themes from right before each update for 7 days, so an update can be undone. They're kept in a randomly named `wp-content/tfwp-backups-...` folder that is blocked from the web, and deleted when this plugin is deactivated.

== External services ==

This plugin is the connector for the TroubleFree service at [troublefreewp.com](https://troublefreewp.com/), run by IDE Solutions LLC. It doesn't contact troublefreewp.com by itself: your TroubleFree dashboard connects to this site's REST API, using the access token you copy from Settings > TroubleFree.

When the dashboard connects, the site sends it: the site's name and address, its WordPress and PHP versions, the installed plugins and themes with their versions and available updates, the names and dates of backups made by your backup plugin, and the results of page checks after updates. When you use Log Into Site, it also sends the names, usernames and email addresses of the site's administrators so you can choose who to sign in as; the dashboard shows them and doesn't store them. It never sends your posts, pages, media, other users' details or database contents. Signing into wp-admin from the dashboard uses a single-use link that expires after 2 minutes. With maintenance mode on, only TroubleFree's own page checks, signed with the site's access token, can see past the maintenance page.

Installing a plugin from the dashboard downloads it from wordpress.org, the same way Plugins > Add New does.

To offer updates to this plugin, WordPress checks https://troublefreewp.com/plugin/update.json about twice a day, sending only the request itself (no site data), and downloads new versions from troublefreewp.com.

* [Terms of Use](https://troublefreewp.com/terms/)
* [Privacy Policy](https://troublefreewp.com/privacy/)

== Installation ==

1. Install and activate the plugin. On a multisite network, network-activate it.
2. Go to Settings > TroubleFree (Network Admin > Settings on a network) and copy the access token.
3. Sign up or sign in at [troublefreewp.com](https://troublefreewp.com/), choose Add Site, and paste the site's address and the token.

== Frequently Asked Questions ==

= What happens if an update breaks my site? =

The plugin keeps a copy of the current version before every plugin or theme update. If the homepage, wp-admin or a page you choose shows a PHP or server error afterwards, the old version is put back automatically.

= Do I need a backup plugin? =

Updates are protected without one, because the plugin keeps a copy of whatever it updates. A backup plugin is still recommended for full-site backups, and TroubleFree can start and list them for you.

= How do I disconnect a site? =

Remove it from your TroubleFree dashboard, or click "Disconnect Site" in Settings > TroubleFree, which also replaces the access token so the old one stops working. Deleting the plugin removes its token, settings and saved copies.

= Does it work with multisite? =

Yes. Network-activate it and add the main site to your dashboard; every site in the network is covered.

== Screenshots ==

1. The dashboard: every site, its waiting updates, security issues and last backup.
2. A round of updates, sorted into sites that need a look and sites that look good.
3. A branded report emailed to a client after a round of updates.
4. Settings > TroubleFree on the site: the access token to connect it, its connection status, and the optional Rescue Helper.

== Changelog ==

= 1.0.0 =
* First release.
