v

WordPress 6.0 6.4+
PHP 8.1 8.2+
MySQL 5.7 8.0+
Memory Limit 128MB 256MB+
KiviCare Plugin 3.0.0

  1. Add New > Upload Plugin', 'care-api' ); ?>

bash
# Install from zip file wp plugin install /path/to/care-api.zip --activate # Or install from directory wp plugin activate care-api

  • ' . esc_url( rest_url( 'care/v1/status' ) ) . '' ); ?>

  1. Permalinks', 'care-api' ); ?>

PHP
// Care API Configuration define( 'CARE_API_DEBUG', false ); // Enable debug mode define( 'CARE_API_CACHE_TTL', 3600 ); // Cache time to live (seconds) define( 'KIVICARE_JWT_SECRET', 'your-custom-jwt-secret-key' ); // Custom JWT secret // Optional: Increase memory and execution time define( 'WP_MEMORY_LIMIT', '256M' ); ini_set( 'max_execution_time', 300 );

Apache
# Enable Authorization header RewriteCond %{HTTP:Authorization} . RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] # CORS headers for API (if needed) Header always set Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS" Header always set Access-Control-Allow-Headers "Authorization, Content-Type, X-WP-Nonce"

1.

cURL
curl -X GET

2.

cURL
curl -X POST \ -H "Content-Type: application/json" \ -d '{"username":"your_username","password":"your_password"}'

3.

cURL
curl -X GET \ -H "Authorization: Bearer YOUR_JWT_TOKEN"

  • Permalinks and click "Save Changes"', 'care-api' ); ?>

PHP
// Add to wp-config.php define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'CARE_API_DEBUG', true );