Update hosting plan

This function edits a hosting plan (package).

Note:

  • The Access Control List (ACL) restricts some of the function's parameters, which limit the features that WHM users can access.
  • This function applies any changes you make to all accounts that exist on the hosting plan.
  • This function cannot modify hosting plan names.
Authorizations:
query Parameters
name
required
string

The hosting plan's name. If the hosting plan does not exist, the system will create it.

Example: name=package1
_PACKAGE_EXTENSIONS
string

The hosting plan's package extensions.

If you do not provide a value, the hosting plan will not include package extensions.

Note:

  • We strongly recommend that you manage package extensions through WHM API 1's addpkgext and delpkgext functions.
  • You can include the extension's variables in your function call, in key=value format. Consult the extension's documentation for a list of possible variables.
  • Extension names and variables are case-sensitive.
  • Use space-delimited format to add multiple package extensions.
Examples:
_PACKAGE_EXTENSIONS=_PACKAGE_EXTENSIONS='extension1 extension2 extension3'
_PACKAGE_EXTENSIONS=extension1
integer or string Nullable
Default: 1048576

The hosting plan's maximum bandwidth use, in megabytes (MB).

  • 0, unlimited, or null — The hosting plan allows unlimited bandwidth.

Note:

The 0, unlimited, or null values are only available to users that possess the corresponding unlimited ACL permission.

Example: bwlimit=1048576
cgi
integer
Default: 1

Whether CGI access is enabled for the hosting plan.

  • 1 — Enabled.
  • 0 — Disabled.

Note:

When a server profile disables the Web Server role, this parameter defaults to 0. On these servers, you cannot enable CGI access.

Enum: 1 0
Example: cgi=1
cpmod
string

The hosting plan's cPanel theme.

This parameter defaults to the server's default cPanel theme.

Example: cpmod=jupiter
digestauth
integer
Default: 0

Whether to enable Digest Authentication for accounts on the hosting plan.

  • 1 — Enable.
  • 0 — Disable.
Enum: 1 0
Example: digestauth=1
featurelist
string
Default: "default"

The hosting plan's feature list.

If you do not use this parameter, the function assigns the default feature list to the hosting plan's accounts.

Example: featurelist=default
frontpage
integer
Deprecated
Default: 0

Whether Microsoft® FrontPage Extensions are enabled for the account.

Note:

cPanel & WHM ignores all FrontPage settings and parameters.

Enum: 1 0
Example: frontpage=0
hasshell
integer
Default: 0

Whether the hosting plan allows shell access.

  • 1 — The hosting plan allows shell access.
  • 0 — The hoting plan does not allow shell access.
Enum: 1 0
Example: hasshell=1
ip
string
Default: "n"

Whether the hosting plan uses a dedicated IP address.

  • y — The hosting plan uses a dedicated IP address.
  • n — The hoting plan does not use a dedicated IP address.
Enum: "y" "n"
Example: ip=n
language
string <ISO-3166-1 (alpha-2)>

The hosting plan's default locale.

This parameter defaults to the server's default locale.

Example: language=en
integer or string
Default: "unlimited"

The percentage of failed or deferred email messages that an account on the hosting plan can send per hour before outgoing mail is rate-limited.

  • 0 or unlimited — The hosting plan allows unlimited email messages per hour.
Example: max_defer_fail_percentage=unlimited
integer or string
Default: "unlimited"

The maximum number of emails that the hosting plan allows accounts to send in one hour.

  • 0 or unlimited — The hosting plan allows unlimited emails per hour.
Example: max_email_per_hour=unlimited
integer or string Nullable
Default: 1024

The hosting plan's maximum email account quota size, in megabytes (MB).

  • 0, null, orunlimited` — The hosting plan allows unlimited quota.

Note:

  • This parameter does not affect any existing email accounts.
  • The unlimited value is only available to users that possess the corresponding unlimited ACL permission.
Example: max_emailacct_quota=1024
integer or string Nullable
Default: 0

The hosting plan's maximum number of addon domains.

  • unlimited or null — The hosting plan allows unlimited addon domains.
Example: maxaddon=unlimited
integer or string Nullable
Default: "unlimited"

The hosting plan's maximum number of FTP accounts.

  • unlimited, or null — The hosting plan allows unlimited databases.
Example: maxftp=unlimited
integer or string Nullable
Default: "unlimited"

The hosting plan's maximum number of mailing lists.

  • unlimited, or null — The hosting plan allows unlimited mailing lists.
Example: maxlst=unlimited
integer or string Nullable
Default: 0

The hosting plan's maximum number of parked domains (aliases).

  • unlimited or null — The hosting plan allows unlimited parked domains.
Example: maxpark=unlimited
integer or string Nullable
Default: "unlimited"

The hosting plan's maximum number of email accounts.

  • unlimited, or null — The hosting plan allows unlimited email accounts.
Example: maxpop=unlimited
integer or string Nullable
Default: "unlimited"

The hosting plan's maximum number of each available type of SQL database.

For example, if you set this value to 5 and the system administrator allows MySQL® and PostgreSQL® databases, users with this hosting plan can create up to five MySQL databases and up to five PostgreSQL databases.

  • unlimited, or null — The hosting plan allows unlimited databases.
Example: maxsql=unlimited
integer or string Nullable
Default: "unlimited"

The hosting plan's maximum number of subdomains.

  • unlimited, or null — The hosting plan allows unlimited subdomains.
Example: maxsub=unlimited
integer or string Nullable
Default: 10240

The hosting plan's disk space quota, in megabytes (MB).

  • 0, unlimited, or null — The hosting plan allows unlimited disk space quota.

Note:

The 0, unlimited, or null values are only available to users that possess the corresponding unlimited ACL permission.

Example: quota=10240

Responses

Response Schema: application/json
object
object

Request samples

whmapi1 --output=jsonpretty \
  editpkg \
  name='package1'

Response samples

Content type
application/json
{
  • "data": {
    • "pkg": "package1"
    },
  • "metadata": {
    • "command": "editpkg",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}