Kinsta Hosting¶
Overview¶
Kinsta is a hosting platform used for Lemone WordPress projects.
Changing Webroot¶
For deploying Bedrock/Trellis websites at Kinsta, the webroot needs to be adjusted. This can be done via support, but also through an API call.
Via Kinsta API¶
Use the Kinsta API to change the webroot subfolder:
curl -i -X POST \
'https://api.kinsta.com/v2/sites/environments/XXX/change-webroot-subfolder' \
-H 'Authorization: Bearer XXX' \
-H 'Content-Type: application/json' \
-d '{
"web_root_subfolder": "/current/web",
"clear_all_cache": true,
"refresh_plugins_and_themes": true
}'
Parameters:
- web_root_subfolder: Path relative to the site root (e.g., /current/web for Bedrock)
- clear_all_cache: Clear all Kinsta cache after changing webroot
- refresh_plugins_and_themes: Refresh the plugins and themes list
Required values:
- Replace XXX in the URL with your environment ID
- Replace Bearer XXX with your Kinsta API token
Getting Your Environment ID¶
- Log in to MyKinsta
- Navigate to your site
- Go to Settings > Info
- Copy the Environment ID
Getting Your API Token¶
- Go to Kinsta Account Settings
- Create or copy an existing API key
- Store it securely (never commit to version control)
Via Kinsta Support¶
Alternatively, contact Kinsta support and request:
- Set webroot to /current/web (for Bedrock/Trellis)
- Enable symlink support (required for Trellis deployments)
Kinsta-specific Configuration¶
Trellis Deployment to Kinsta¶
When deploying Trellis-based projects to Kinsta:
- Set webroot to
/current/web - Enable symlinks (via support ticket)
- Configure SSH access in
trellis/group_vars/production/wordpress_sites.yml:
wordpress_sites:
example.com:
site_hosts:
- canonical: example.com
local_path: ../site
repo: git@codepot.nl:project/repository.git
branch: main
ssh:
host: your-site.kinsta.cloud
port: 12345 # Custom SSH port from Kinsta
user: your-site
- Deploy:
SSH Access¶
Kinsta uses custom SSH ports for each site:
Find your SSH details in MyKinsta under: Sites > Your Site > Info > SFTP/SSH
WP-CLI Usage¶
WP-CLI is pre-installed on Kinsta:
Troubleshooting¶
Determine high disk usage for sites¶
-
First check in MyKinsta which sites have the most disk usage
-
Sign in with SSH and run these commands.
Check disk usage and sort by largest folder:
Check file usage:
Resources¶
- Kinsta API Documentation
- Set Custom Webroots with Kinsta API
- Kinsta WordPress Hosting
- Kinsta MyKinsta Dashboard
See Also¶
- Exonet Hosting - Exonet deployment and management
- WordPress Roots Stack - Bedrock, Sage, Trellis
- Roots Sync Script - Database synchronization
- SSH Keys - SSH key management