Pengguna baharuPelan DNS dan CDN percuma untuk setiap akaun baharu.Cipta akaun anda

Sites, domains and databases

Bind domains to your Shared Hosting account, upload site files, connect to MySQL and set up cron jobs.

4 minit bacaan Dikemas kini 20 Okt 2026

This guide covers day-to-day use of Shared Hosting: binding domains, uploading site files, connecting to the MySQL database and setting up cron jobs. You do all of this on the hosting management page. To open it, click Manage on a hosting account in the Shared hosting list.

Overview

The Overview tab shows how much of your disk and traffic allowance you've used, along with basic details: account name, primary domain, status (Normal or Suspended), node and region.

Warning

Traffic is counted per calendar month. If you go over your plan's monthly traffic allowance, your site may be suspended until the start of the next month. A hosting account is also suspended when its subscription expires and isn't renewed.

Binding domains

Adding a domain

  1. Switch to the Domain management tab and click Add domain.

  2. Fill in the form:

    FieldDescription
    DomainsThe domain to bind. Lowercase letters, digits, - and . only, e.g. www.example.com
    TypePrimary domain or Additional domains. You can have only one primary domain, and it can't be deleted
    Bind directoryThe site directory for this domain, relative to the hosting root (the / you see in File manager), e.g. / or /public
    Origin protocolLeave this at HTTP for a normal website
  3. Click OK. The domain then appears in the list.

A domain can be bound to only one hosting account on the platform. If you see "Domain already exists", that domain is already bound somewhere else. If you go over the number of domains your plan allows, you'll see a message about the limit.

Tip

You can bind example.com and www.example.com to the same directory. You can also bind subdomains such as blog.example.com to separate subdirectories and run several sites from one hosting account.

Pointing DNS at your hosting

After you bind a domain, you also need to point it at your hosting server in DNS by adding an A record with the hosting server's IP address. If your domain uses Yeap Cloud DNS, see DNS zones and records for how to add the record. Until the DNS change takes effect, visitors to the domain won't reach your hosting.

Editing and deleting

  • Edit: change the directory. If you change the domain name itself, the old domain is unbound before the new one is bound.
  • Delete: additional domains can be deleted. The primary domain can't.

The SSL status column shows whether a certificate is deployed for each domain. To deploy one, see SSL certificates.

Uploading site files

Switch to the File manager tab. The root / is the hosting root, the same root that domain directories are relative to.

The toolbar has these buttons:

  • Upload file: upload a local file into the current directory.
  • Create folder / Create file: create one in the current directory.
  • Remote download: the server fetches a file from a URL straight into your hosting. This is handy for large application packages.
  • Refresh: reload the list.

Each file's action menu lets you Edit, Download, Rename, Change permissions, Compress and Extract. Select several files to Compress or delete them in one go.

Tip

To install an application such as WordPress, pack it as a .zip on your computer, open the domain's directory, upload the archive and Extract it there. This is much faster than uploading files one by one.

Note

If visiting your domain shows "403 You don't have permission to browse", the directory usually has no index file yet. Upload an index.html or index.php.

Database

A MySQL database is created automatically when your hosting account is provisioned, so you don't need to create one. The Manage databases tab shows:

ItemDescription
Database nameSame as the account name
UsernameSame as the account name. It can't be changed
Database typeMySQL
Database size / QuotaCurrent usage and your plan's limit
phpMyAdminWhen available, click Open phpMyAdmin to manage the database in the browser

Connecting from your code

Your site and its database run on the same server. Use these connection settings:

php
<?php
$pdo = new PDO(
    'mysql:host=localhost;port=3306;dbname=<account-name>;charset=utf8mb4',
    '<account-name>',
    '<password-set-at-provisioning>'
);

In WordPress's wp-config.php, set DB_NAME and DB_USER to the account name, DB_PASSWORD to the password you set at provisioning, and DB_HOST to localhost.

Note

The database password is the password you set when you provisioned the hosting account. Keep it safe, and never commit it to a public code repository.

Cron jobs

Cron jobs on Shared Hosting work by requesting a URL on a schedule, which then runs your code. Use them for scheduled scripts such as cron.php.

  1. Switch to the Scheduled tasks tab and click Create task.
  2. Enter a Cron expression in the form minute hour day month weekday. For example, 0 2 * * * means every day at 02:00.
  3. Enter the Request URL. It must start with http:// or https://, e.g. https://example.com/cron.php.
  4. Save. The top of the page shows how many tasks you're using and your limit.
Tip

Anyone can reach the script your cron job calls. Add a parameter that only you know (e.g. cron.php?key=<random-string>) and check it in the script, so other people can't trigger it.

Managing through the API

These endpoints are the ones the console uses. Send your login token in the Authorization: Bearer <token> header. {id} is the id returned by the hosting list.

bash
# List shared hosting accounts
curl -H "Authorization: Bearer $TOKEN" \
  https://api.yeap.cloud/api/user/host_shared/vhosts

# List bound domains
curl -H "Authorization: Bearer $TOKEN" \
  https://api.yeap.cloud/api/user/host_shared/vhosts/{id}/domains

# Bind an additional domain
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  https://api.yeap.cloud/api/user/host_shared/vhosts/{id}/domains \
  -d '{"domain": "blog.example.com", "type": "alias", "document_root": "/blog"}'

# Delete an additional domain ({domainId} is the id from the domain list)
curl -X DELETE -H "Authorization: Bearer $TOKEN" \
  https://api.yeap.cloud/api/user/host_shared/vhosts/{id}/domains/{domainId}
Adakah halaman ini membantu?