# Putting your site online

## Where your files go

Each domain on your account has its own folder, and its site is served from the `public_html` folder inside it:

```
/home/USERNAME/domains/your-domain.com/public_html
```

`USERNAME` is your account login, shown in your client area. An `index.php` or `index.html` file placed in `public_html` becomes your site's home page.

## Uploading your files

Three paths lead to the same folder; choose the one that suits you.

### The file manager

In the panel, **File Manager**: upload your files from your browser, including a `.zip` archive, which you extract on the spot. It is the quickest path for a few files.

### Encrypted FTP (FTPS)

In an FTP program such as FileZilla:

| Setting      | Value                                                               |
| ------------ | ------------------------------------------------------------------- |
| **Protocol** | FTP, with **explicit TLS encryption** (FTPS)                        |
| **Host**     | your server's name, for example `web1.simafri.cloud`                |
| **Port**     | `21`                                                                |
| **Login**    | your account login, or an FTP account created in **FTP Management** |
| **Password** | the panel's, or the FTP account's                                   |

TLS encryption protects your password and your files during the transfer; in FileZilla, choose **Require explicit FTP over TLS**. An FTP account created in **FTP Management** takes the form `name@your-domain.com` and can be limited to one folder, for a contractor for example.

### SSH and SFTP

SSH access uses a **key**, which you add in the panel:

1. No key yet? On your computer, run `ssh-keygen -t ed25519`, then open the file ending in `.pub`: that is your **public** key.
2. In the panel, open **SSH Keys**, then paste your public key.
3. Connect:

```
ssh USERNAME@web1.simafri.cloud
```

The same key opens **SFTP** (port `22`) in FileZilla or WinSCP. Only the public key is added: your private key stays on your computer.

## Choosing the PHP version

Each domain chooses its PHP version in **PHP Version Selector**. Available today are **PHP 8.4**, **8.3** (the default version), **8.1** and **7.4**, with OPcache and the common extensions: intl, mbstring, gd, curl, zip, xml, sodium, bcmath, soap, PDO for MySQL and SQLite. Your application needs another version? Write to support: our team adds it.

## Creating a database

1. In the panel, open **MySQL Databases**, then create a database: its name and its user take the form `USERNAME_name`.
2. Note the user's password.
3. In your application, enter:

| Setting                   | Value                                                       |
| ------------------------- | ----------------------------------------------------------- |
| **Host**                  | `localhost`                                                 |
| **Port**                  | `3306`                                                      |
| **Database** and **user** | the ones you have just created, for example `USERNAME_site` |

**phpMyAdmin**, opened from the same section, imports a `.sql` file, exports your database and browses your tables.

## Composer, Node.js and frameworks

Over SSH, your hosting runs:

* **Composer 2**: `composer install`, `composer update`;
* **Node.js 24** and **npm**: `npm install`, `npm run build` to build your front end or your assets;
* **Git**, **Python 3** and **Perl**.

For **Symfony** or **Laravel**, the domain's web root is the project's `public/` folder. Place your project next to `public_html`, then replace `public_html` with a link to its `public/` folder:

```
cd ~/domains/your-domain.com

mv public_html public_html.original

ln -s my-project/public public_html
```

The framework's commands (`php bin/console`, `php artisan`) run in the project folder. For an **Angular**, **React** or **Vue** front end, place the output of `npm run build` in `public_html`, with an `.htaccess` file that sends the routes to `index.html`.

An application that must stay running continuously, such as a Node.js server or a message queue, belongs on a [VPS Pro](https://docs.simafri.com/en/vps-pro/).

## Scheduling a task

In **Cron Jobs**, enter the frequency and the command, for example every day at 3 a.m.:

```
0 3 * * * /usr/local/bin/php /home/USERNAME/domains/your-domain.com/my-project/bin/console app:cleanup
```

## HTTPS for your domains

Each domain and subdomain receives its Let's Encrypt **HTTPS certificate**, requested and renewed automatically as soon as the domain points to your server. **SSL/TLS Certificates** shows each domain's certificate. To always send your visitors to the `https://` address, add at the top of the `.htaccess` file in `public_html`:

```
RewriteEngine On

RewriteCond %{HTTPS} off

RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
```

## Frequently asked questions

### My site still shows the default page.

Your home page must sit directly in `public_html`, named `index.php` or `index.html`, rather than in a subfolder. Delete the default page if it is still there.

### How do I install WordPress?

Write to support stating the domain: our team installs WordPress on your hosting and hands you access to its administration.

### My SSH connection is refused.

Check that your **public** key is listed in **SSH Keys** and that you connect with your account's **Login**. The SSH connection uses a key: your program must use the private key that matches the one you added.
