Each WordPress VIP Platform environment is supported by a unique database. Unique databases per-environment allows testing to be performed on non-production environments without impacting the production environment.
- Data syncs from a production environment to a non-production environment can be performed in the VIP Dashboard’s Data Sync panel or with the VIP-CLI command:
vip sync [options]
- Databases for production environments are backed up every hour, and databases for non-production environments are backed up daily. Database backups include all tables including custom tables and are available for download in the VIP Dashboard or with VIP-CLI.
- Most WP-CLI
wp db *commands are disallowed on VIP.
- The default setting for
DB_COLLATEis defined as
utf8mb4_unicode_ci. In order for a SQL file to successfully be imported to a VIP database, it must use supported collation and character sets.
- VIP uses Automattic’s HyperDB
db.php. No other
db.phpdrop-ins can be used on the platform.
- HyperDB is configured to send writes to an environment’s master database and sends reads to database replicas.
- Direct database queries in code should be avoided whenever possible. WordPress API functions for fetching and manipulating data should be used instead.
- Slow queries that should be optimized in order to improve database efficiency can be reviewed in the Health – Slow Query Logs panel in the VIP Dashboard.
- Database queries that run for longer than 60 seconds are automatically terminated. This is a default platform setting that is subject to change, and is not customizable per application.
Use caution when adding custom tables to a VIP Platform environment’s database.
- To prevent unexpected issues, all tables should begin with the
dbDeltaas part of an upgrade routine to add/update the table.
- Do a thorough analysis of the schema and indexes and validate against the queries being run to ensure they match up.
- Add caching to queries where it makes sense.
Last updated: August 31, 2023