=== SiteHealth Installer ===
Contributors: justinshinn
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 8.2
Stable tag: 1.0.5
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Installs SiteHealth on hosts where the full plugin is too large to upload. Removes itself when it is done.

== Description ==

SiteHealth's build is about 4 MB. WordPress's "upload a plugin" screen is limited by
your server's PHP upload size, and PHP's own default for that is 2 MB — so on a host
left at the default, uploading SiteHealth directly fails with a message about
`upload_max_filesize` and nothing else to go on.

This installer is a few kilobytes, so it uploads anywhere. It then asks sitehealth.net
for the current build and lets WordPress download and unpack it **on the server**, which
is exactly how WordPress installs any plugin update — a path that is not affected by the
upload limit.

When SiteHealth is installed and active, this installer deactivates and deletes itself.

== Installation ==

1. Download this installer from https://sitehealth.net/download/
2. In WordPress, go to Plugins → Add New → Upload Plugin, choose the zip, and activate it.
3. Nothing else. Activating it opens the installer and the download starts by itself.

The installer reports exactly what happened if anything goes wrong, rather than failing
quietly.

== Frequently Asked Questions ==

= Why not just make SiteHealth smaller? =

We did. Releases 3.21.27 and 3.21.28 took the build from around 16 MB to about 4 MB,
which is enough for any host allowing 8 MB or more to take the full SiteHealth zip
directly.

It is still not enough for a host left on PHP's 2 MB default, and not quite enough for
one set to exactly 4 MB. Getting under 2 MB would mean halving the build again, so
downloading on the server stays the approach that works everywhere, rather than one
that has to stay a step ahead of the limit.

= Which version does it install? =

Whatever sitehealth.net is currently offering. It reads the same feed that installed
copies poll for updates, so a fresh install and an existing site are always given the
same build. No version is hardcoded here.

= Does it send anything about my site? =

No. It makes one outbound request, to sitehealth.net, asking which version is current.
It sends nothing about your site in that request.

= What if it cannot reach sitehealth.net? =

It says so, and names the underlying error — usually a host that blocks outgoing
requests. You can still install SiteHealth by uploading the full zip if your host's
upload limit allows it.

== Changelog ==

= 1.0.5 =
* The installing screen no longer quotes a download size. It said "about 16 MB", which
  was correct when it was written and four times too high from SiteHealth 3.21.27
  onward, once the build dropped to about 4 MB. It now says what it is doing and how
  long to expect without naming a number that can drift again.
* The description and the "Why not just make SiteHealth smaller?" answer said the
  problem was hosts limited to 8 MB. Those hosts can take the full SiteHealth zip now.
  What remains is PHP's 2 MB default and hosts set to exactly 4 MB, and the text says
  so instead.
* The installation steps still told you to press a button on the installer screen.
  Version 1.0.4 removed that button — activating the installer starts the download by
  itself — and the steps now match.
* Removed a version number in the code that nothing read and that duplicated the one in
  the plugin header.

= 1.0.4 =
* Installs SiteHealth by itself. Activating the installer now takes you straight to it
  and starts the download, instead of showing a notice and waiting for you to find and
  press a button. The button only ever added a step - the work and the risks were the
  same either way.
* The screen tells you it is working and roughly how long it takes, rather than
  appearing to hang while 16 MB downloads.
* After a failure it stops and shows the reason with a Try again button, rather than
  retrying a failing download on every page view.

= 1.0.3 =
* A successful install no longer finishes on "Sorry, you are not allowed to access this
  page". The installer was removing itself a moment before sending you to its own
  confirmation screen, so the screen was gone by the time your browser asked for it —
  the install had worked, and the only thing you were shown was an error. It now reports
  success first and removes itself immediately afterwards.
* The confirmation screen offers a link straight into SiteHealth.

= 1.0.1 =
* An interrupted install no longer leaves the site showing "Briefly unavailable for
  scheduled maintenance". WordPress sets that flag while it installs and clears it when
  it finishes; if the install was cut short, the flag stayed and the whole site answered
  that message until someone deleted a file they had no way to see. Every failure now
  clears it, including a fatal error or a timeout part-way through the download.
* Refuses to start while another update is already running on the site, instead of
  starting a second one on top of it.

= 1.0.0 =
* First release.

Versions 1.0.0 through 1.0.2 were never published; each was superseded during testing.
