Change PHP version

Change the PHP version for a site.


POST/api/servers/{server}/sites/{site}/php-version

Change PHP version

This endpoint allows you to change the PHP version for a specific site.

Required parameters

  • Name
    php_version
    Type
    string
    Description

    The PHP version to set. Example: 8.1, 7.4.

Request

POST
/api/servers/{server}/sites/{site}/php-version
curl -X POST "https://ploi.io/api/servers/{server}/sites/{site}/php-version" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"php_version": "8.1"}'

Response

{
  "data": {
    "id": 1,
    "status": "active",
    "server_id": 52,
    "domain": "wordpress.examplehosting.com",
    "test_domain": null,
    "deploy_script": "cd /home/ploi/wordpress.examplehosting.com\ngit pull origin master...",
    "web_directory": "/public",
    "project_type": "wordpress",
    "project_root": "/",
    "last_deploy_at": null,
    "system_user": "ploi",
    "php_version": "8.1",
    "health_url": null,
    "disable_robots": false,
    "has_repository": false,
    "zero_downtime_deployment": false,
    "has_staging": false,
    "fastcgi_cache": false,
    "created_at": "2022-11-08 13:43:23"
  }
}