New usersFree DNS and CDN plans for every new account.Create your account

Sites, domains and databases

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

4 min read Updated Oct 6, 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 主机 (Hosting) → 共享主机 (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 (正常 (Active) 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 域名管理 (Domains) tab and click 添加域名 (Add domain).

  2. Fill in the form:

    FieldDescription
    域名 (Domain)The domain to bind. Lowercase letters, digits, - and . only, e.g. www.example.com
    类型 (Type)主域名 (Primary domain) or 附加域名 (Additional domain). You can have only one primary domain, and it can't be deleted
    绑定目录 (Directory)The site directory for this domain, relative to the hosting root (the / you see in 文件管理 (Files)), e.g. / or /public
    回源协议 (Origin protocol)Leave 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状态 (SSL status) column shows whether a certificate is deployed for each domain. To deploy one, see SSL certificates.

Uploading site files

Switch to the 文件管理 (Files) 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.
  • 新建文件夹 (New folder) / 新建文件 (New 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 数据库管理 (Database) tab shows:

ItemDescription
数据库名 (Database name)Same as the account name
用户名 (Username)Same as the account name. It can't be changed
数据库类型 (Type)MySQL
数据库大小 (Size) / 配额 (Quota)Current usage and your plan's limit
phpMyAdminWhen available, click 打开 phpMyAdmin (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 计划任务 (Cron jobs) tab and click 创建任务 (Create task).
  2. Enter a Cron 表达式 (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}
Was this page helpful?