Skip to main content
PUT
Replace PHP ini configuration

Authorizations

Authorization
string
header
required

Personal API token, sent as Authorization: Bearer <SANDYWP_API_KEY>. Obtain one from the dashboard account menu (API keys), sandywp auth login, or POST /api/account/tokens. A missing or invalid token returns 401 auth_required. Scoped OAuth tokens are limited to the Imports family and GET /api/account/me; see the top-level conventions.

Headers

X-SandyWP-Workspace
string

Selects which of the caller's workspaces to act in, for accounts belonging to more than one (legacy alias: X-SandyWP-Organization). Defaults to the caller's own personal workspace when omitted. Every id in this API (sandboxes, Templates, repositories) is scoped to a single workspace, so this header changes which set of resources is visible.

Path Parameters

id
string
required

The sandbox id.

Body

application/json

A sandbox's PHP ini overrides. All fields are required both when read back from GET .../php-config and when written via PUT .../php-config (the PUT endpoint replaces the whole object — see that operation's description for why this differs from what the hand-written API guide says).

maxExecutionTime
integer
required

Seconds. max_execution_time.

Required range: 10 <= x <= 300
maxInputTime
integer
required

Seconds. max_input_time.

Required range: 10 <= x <= 300
maxInputVars
integer
required

max_input_vars.

Required range: 100 <= x <= 10000
memoryLimitMb
integer
required

MB. memory_limit. The static maximum is 512, but the effective ceiling for a given sandbox is usually lower — see limits.memoryLimitMaxMb on the GET response.

Required range: 64 <= x <= 512
allowUrlFopen
boolean
required

allow_url_fopen.

postMaxSizeMb
integer
required

MB. post_max_size.

Required range: 8 <= x <= 5120
uploadMaxFilesizeMb
integer
required

MB. upload_max_filesize. Must not exceed postMaxSizeMb.

Required range: 2 <= x <= 5120
sessionGcMaxlifetime
integer
required

Seconds. session.gc_maxlifetime.

Required range: 300 <= x <= 86400
outputBufferingBytes
integer
required

Bytes (0 disables). output_buffering.

Required range: 0 <= x <= 65536

Response

The applied PHP configuration and, if a change was queued, its job id.

phpConfig
object
required

A sandbox's PHP ini overrides. All fields are required both when read back from GET .../php-config and when written via PUT .../php-config (the PUT endpoint replaces the whole object — see that operation's description for why this differs from what the hand-written API guide says).

jobId
string | null
required

The queued apply_php_config job id, or null if the request was a no-op.