Ploi API
Ploi API

Change PHP version

Change PHP version for a site

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

Parameters

Parameter Type Status Description
php_version string required Which PHP to be set, e.g. 8.1, 7.4

Example request:

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

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "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\ncomposer install --no-interaction --prefer-dist --optimize-autoloader\necho \"\" | sudo -S service php8.0-fpm reload\n\necho \"🚀 Application deployed!\"\n",
        "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"
    }
}