Skip to main content
PUT
/
sites
/
{site_id}
/
environments
Push a WordPress site environment
curl --request PUT \
  --url https://api.kinsta.com/v2/sites/{site_id}/environments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "source_env_id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
  "target_env_id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
  "push_db": true,
  "push_files": true,
  "run_search_and_replace": true,
  "push_files_option": "SPECIFIC_FILES",
  "file_list": [
    "wp-content/plugins",
    "wp-content/themes",
    "wp-content/uploads"
  ]
}
'
{
  "message": "Pushing environment in progress",
  "status": 202,
  "operation_id": "environments:push-54fb80af-576c-4fdc-ba4f-b596c83f15a1"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

site_id
string
required
Example:

"54fb80af-576c-4fdc-ba4f-b596c83f15a1"

Body

application/json
source_env_id
string
required
Example:

"54fb80af-576c-4fdc-ba4f-b596c83f15a1"

target_env_id
string
required
Example:

"54fb80af-576c-4fdc-ba4f-b596c83f15a1"

push_db
boolean
default:true
Example:

true

push_files
boolean
default:true
Example:

true

run_search_and_replace
boolean
default:true
Example:

true

push_files_option
enum<string>
default:ALL_FILES
Available options:
ALL_FILES,
SPECIFIC_FILES
Example:

"SPECIFIC_FILES"

file_list
string[]
Example:
[
"wp-content/plugins",
"wp-content/themes",
"wp-content/uploads"
]

Response

Pushing environment action started. Check MyKinsta for status

message
string
required
Example:

"Pushing environment in progress"

status
number
required
Example:

202

operation_id
string
Example:

"environments:push-54fb80af-576c-4fdc-ba4f-b596c83f15a1"