# Tasks app — go-live steps

**Needs:** PHP 8.2 or newer, a MySQL (or MariaDB) database, and HTTPS.
Normal cPanel hosting is fine. Plain PHP: no Composer, no npm, nothing to build.

The zip has two folders: `app/` (private code and settings) and `public/`
(the website). **Only `public/` may be the website folder.**

---

**1. Upload**
Upload the zip and extract it to `/home/USER/task-app/`.
Put it next to `public_html`, **not inside it**.

**2. PHP version**
cPanel > MultiPHP Manager > set PHP **8.2 or newer**.

**3. Database**
cPanel > MySQL Database Wizard > create a database and a user,
and give the user **ALL PRIVILEGES**. Note the database name, user and password.

**4. Subdomain**
cPanel > Domains > create e.g. `tasks.example.com`
with **Document Root** = `task-app/public`.

**5. Settings file**
In `task-app/app/`, copy `config.sample.php` to **`config.php`** and fill in:

```php
'host'      => 'localhost',
'name'      => 'database name from step 3',
'user'      => 'database user from step 3',
'pass'      => 'database password from step 3',
'setup_key' => 'any long random text, 20+ characters',
'debug'     => false,
```

**6. HTTPS**
cPanel > SSL/TLS Status > tick the subdomain > **Run AutoSSL**.

**7. Open the site**
Go to `https://tasks.example.com`. You should see **"Set up Tasks"**.
The database tables are created automatically.

> **Do not create the login yourself.** Send the owner the website address
> and the **setup_key**. The owner enters it with their own email and password.

**Done.**

---

**If something goes wrong**

- **Blank page or error:** check PHP is 8.2+ and the database details in `config.php`.
- **"Setup is switched off":** change `setup_key` in `config.php` to a long random text.
- **You can see the files or a folder list:** the Document Root is not `task-app/public` (step 4).

**Updating later:** replace the files with the new version, but keep `app/config.php`.
