pressable_set_php_version
Change the PHP version for a WordPress site hosted on Pressable. Specify the site ID and desired PHP version (8.0, 8.1, 8.2, or 8.3) to update the server configuration.
Instructions
Set the PHP version for a specific site.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>",
"php_version": "<php_version>"
},
"name": "pressable_set_php_version"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| php_version | Yes |
Implementation Reference
- tools/server.js:39-41 (handler)Handler function for pressable_set_php_version, which makes a POST request to update the site's PHP version.
handler: async (args) => { return await api.post(`/sites/${args.id}/php-version`, { php_version: args.php_version }); } - tools/server.js:31-38 (schema)Input schema defining the required parameters (id, php_version) for pressable_set_php_version.
inputSchema: { type: 'object', properties: { id: { type: 'string' }, php_version: { type: 'string', enum: ['8.0', '8.1', '8.2', '8.3'] } }, required: ['id', 'php_version'] }, - tools/server.js:28-42 (registration)Tool registration for pressable_set_php_version in tools/server.js.
{ name: 'pressable_set_php_version', description: 'Set the PHP version for a specific site.', inputSchema: { type: 'object', properties: { id: { type: 'string' }, php_version: { type: 'string', enum: ['8.0', '8.1', '8.2', '8.3'] } }, required: ['id', 'php_version'] }, handler: async (args) => { return await api.post(`/sites/${args.id}/php-version`, { php_version: args.php_version }); } },