# Putting Webb Capitals live on cPanel (webbcapitals.com)

You do not need SSH. The site has a built-in installer.

## 1. Before you upload
1. In cPanel open **Select PHP Version** (or MultiPHP Manager) and choose **PHP 8.2** for `webbcapitals.com`.
2. In **Select PHP Version → Extensions** make sure these are ticked: `pdo_mysql`, `mbstring`, `openssl`, `tokenizer`, `xml`, `ctype`, `json`, `fileinfo`, `curl`.
3. In **MySQL Databases** create a database, create a user, and add the user to the database with **ALL PRIVILEGES**. Write down the database name, user and password (cPanel adds a prefix such as `cpuser_`).
4. Turn on **SSL** for the domain (SSL/TLS Status → Run AutoSSL). The site forces https.

## 2. Upload
1. In **File Manager** go to your home folder (the one that contains `public_html`).
2. Upload `webbcapitals.zip` there and **Extract** it. You will get a folder called `webbcapitals`.

## 3. Point the domain at the `public` folder (recommended)
- **cPanel → Domains** (or Addon Domains) → edit `webbcapitals.com` → set **Document Root** to `webbcapitals/public`.

If your cPanel does not let you change the Document Root, upload and extract the zip **inside `public_html`** instead. A root `.htaccess` file then sends visitors to the `public` folder automatically.

## 4. Run the installer
1. Open `https://webbcapitals.com/install`.
2. Every line in the server check must be green. If not, fix it as the message says and reload.
3. Enter the company name, the database details from step 1, and the admin email and password you want.
4. Click **Install**. You are taken to `https://webbcapitals.com/admin/login`.

The installer locks itself afterwards. To run it again you would have to delete `storage/app/installed`.

## Updating to a newer version (no reinstall)
Each release comes as two files: `webbcapitals.zip` (first install) and `webbcapitals-update.zip` (updates).
1. In File Manager open your `webbcapitals` folder (the one that contains `app`, `public`, `storage`, `.env`).
2. Upload `webbcapitals-update.zip` there, choose **Extract** and allow it to overwrite files.
3. Delete the zip. Open the site once: the database is updated automatically. Your `.env`, uploads, settings and customers are untouched.
Only run the installer again if a release note says so.

## 5. Turn on the scheduled job (interest, deposits, automatic saving, news)
Investment interest, fixed-deposit maturity, automatic saving and the news headlines run from a scheduled job. Without it they still catch up whenever a customer opens the app, but they will not run on time.

cPanel → **Cron Jobs** → add one job, **every minute**:

```
/opt/cpanel/ea-php82/root/usr/bin/php /home/YOUR_CPANEL_USER/webbcapitals/artisan schedule:run >> /dev/null 2>&1
```

Replace `YOUR_CPANEL_USER` with your cPanel username. Admin → Settings → System shows the exact line for your server and tells you whether the cron job is running. If you put the site inside `public_html`, change the path to `/home/YOUR_CPANEL_USER/public_html/webbcapitals/artisan`.

## 6. Set up email (needed for sign-up codes)
1. In cPanel → **Email Accounts** create `no-reply@webbcapitals.com` (and `support@webbcapitals.com`, `info@webbcapitals.com` if you want them).
2. Sign in to the admin area → **Settings → Email**. Use host `mail.webbcapitals.com`, port 465 with SSL (or 587 with TLS), and the mailbox login.
3. Save, then press **Send a test email**.

Until SMTP is set, verification codes are only written to `storage/logs` and customers will not receive them.

## 7. Before you invite customers, fill in the admin area
- **Crypto addresses**: your own deposit addresses and the network fee for each. They are switched OFF until you add real ones and turn them on. **Double-check every address**: money sent to a wrong address cannot be recovered.
- **Payment apps**: your Cash App, PayPal, Venmo or Zelle details, switched on only when real.
- **Settings**: bank name, routing number and SWIFT code shown on bank-deposit instructions.
- **Limits**: every limit in one place: what each tier can send per payment, per day and per month, loan sizes, the best card each tier can order, card limits and fees, free withdrawals on Savings accounts, the amount above which a joint-account payment needs another holder to approve it, gift-card limits, smallest amounts, PIN lock and the referral reward. Changes apply straight away.
- **Rates & fees**: EUR and GBP rates, conversion margin, transfer fees.
- **Team & permissions**: add support, finance or compliance staff with their own sign-in, and choose which pages each role can open. Every admin change is recorded in the **Audit log**.
- **Email templates**: reword any email customers receive.
- **News**: headlines from Yahoo Finance, BBC, Guardian and CNBC are fetched every 30 minutes. Post your own, with a picture, and pin it.
- **Investment packages, Fixed-deposit plans, Loan terms, Billers, Gift-card brands**: review the starter lists.
- **Notices**: post a welcome or maintenance banner if you want one.

## 8. How the daily work flows
- **Deposits**: customers pay you outside the site, then tell us. You confirm in **Deposits** and the wallet is credited.
- **Transfers & bills**: payments to bank accounts, payment apps and billers leave your system. Send them yourself, then mark them sent. If you cannot, reverse them and the customer is refunded.
- **Identity checks, loans, card requests, gift-card sales, support tickets** each have their own review page.
- Customers must pass an identity check before investing, opening fixed deposits, ordering cards, borrowing or selling gift cards.
- **Joint accounts:** a payment above the approval limit is held, and the other holders get an email with Approve and Decline links. Email must be working for this.
- **Two-factor sign-in:** customers and staff can turn on an authenticator app under Security. If someone loses their phone, open their page under Customers and press Turn off two-factor.
- **Check deposits:** customers send photos of both sides. You see them on the deposit and credit the wallet when the check clears.
- **Referrals:** customers share a link. The reward is paid when the friend's identity is approved. Set the amount (or 0 to switch referrals off) under Limits.

## 9. Changing the name or domain later
Admin → **Settings** (tabs: General, Branding, Features, Wallets, Email, API keys, Custom code, System). The company name, colour, website domain and the contact emails (info@, support@, no-reply@) all change across the website, the app and emails. If you want a different address from the default, type it in the matching box.
When you move to a new domain also change `APP_URL` in the `.env` file in the `webbcapitals` folder.

## Troubleshooting
- **500 error:** make sure `storage` and `bootstrap/cache` are writable (permissions 755, or 775), and the PHP version is 8.2.
- **Blank page or missing styles:** the domain (or subdomain) must point to the `public` folder (step 3). A subdomain can use any folder: in cPanel → Domains → Manage, set its Document Root to `/webbcapitals/public` (a folder outside `public_html` is fine). If you cannot, upload into the subdomain's own folder and the root `.htaccess` forwards visitors to `public`.
- **Codes not arriving:** check Settings → Outgoing email, then your spam folder.
- **Translations:** the language button translates pages automatically with Google Translate (29 languages, Arabic, Hebrew, Persian and Urdu switch to right-to-left). Turn languages on or off in Admin → Settings → Languages. Visitors' browsers must be able to reach Google; if translation does nothing, check that the visitor's network or ad blocker is not blocking translate.google.com.
- **Photo upload fails:** raise `upload_max_filesize` and `post_max_size` to at least 8M in Select PHP Version → Options.
- Logs are in `storage/logs`.
