VESSOT Secure Portable Data provides a secure way to store and retrieve encrypted data via the VESSOT API. All encryption happens client-side before data is transmitted, ensuring true zero-knowledge data storage.
You need to create an account at https://vessot.tech/ before you can use this plugin.
Read about the simple account creation steps at https://vessot.tech/how-it-works.
Technical implementation is quick and easy – see the setup guide at https://vessot.tech/setup.
The plugin requires two environment variables to be set at the server level. This approach ensures credentials never touch your filesystem or version control.
Your VESSOT API integration token for authentication.
A 32-byte encryption key for client-side encryption.
You can generate a secure encryption key using the plugin’s helper function. Run this once in your WordPress environment:
`php
$vessotData = vessot_secure_portable_data();
$encryptionKey = $vessotData->cryptKeyGenerate(); // Copy this value to use as VESSOT_CRYPT_KEY
`
Choose the method that matches your server setup:
Add to your virtual host configuration or .htaccess:
`apache
SetEnv VESSOT_INT_TOKEN “your-integration-token-here”
SetEnv VESSOT_CRYPT_KEY “your-encryption-key-here”
`
Add to your PHP-FPM pool configuration (usually /etc/php/8.2/fpm/pool.d/www.conf):
`ini
env[VESSOT_INT_TOKEN] = your-integration-token-here
env[VESSOT_CRYPT_KEY] = your-encryption-key-here
`
Then add to your Nginx server block:
`nginx
location ~ .php$ {
fastcgi_param VESSOT_INT_TOKEN $VESSOT_INT_TOKEN;
fastcgi_param VESSOT_CRYPT_KEY $VESSOT_CRYPT_KEY;
# … other fastcgi_param directives
}
`
Add to your docker-compose.yml:
`yaml
services:
wordpress:
environment:
– VESSOT_INT_TOKEN=your-integration-token-here
– VESSOT_CRYPT_KEY=your-encryption-key-here
`
Or use a .env file (excluded from version control):
`bash
VESSOT_INT_TOKEN=your-integration-token-here
VESSOT_CRYPT_KEY=your-encryption-key-here
`
Many hosting providers offer environment variable management through their control panel. Check your hosting provider’s documentation for “Environment Variables” or “PHP Configuration”.
For local development, you can use:
Option 1: System environment variables
bash
export VESSOT_INT_TOKEN="your-dev-token"
export VESSOT_CRYPT_KEY="your-dev-key"
Option 2: PHP-FPM configuration (see Nginx section above)
`php
// Get an instance
$vessotData = vessot_secure_portable_data();
// Store encrypted data
$result = $vessotData->store(‘your_unique_storage_key’, [
‘theme’ => ‘dark’,
‘notifications’ => true,
’email’ => ‘[email protected]’
]);
// Retrieve and decrypt data
$result = $vessotData->show(‘your_unique_storage_key’);
if ($result[‘success’]) {
$settings = $result[‘value’];
echo $settings[‘theme’]; // ‘dark’
}
// Update data
$result = $vessotData->update(‘your_unique_storage_key’, [
‘theme’ => ‘light’,
‘notifications’ => false,
’email’ => ‘[email protected]’
]);
// Partial update (update specific attributes)
$result = $vessotData->update(‘your_unique_storage_key’, null, [
‘theme’ => ‘light’
]);
// Retrieve specific attribute
$result = $vessotData->show(‘your_unique_storage_key’, ‘theme’);
// Delete data
$result = $vessotData->destroy(‘your_unique_storage_key’);
`
`php
// Store user preferences on profile update
add_action(‘profile_update’, function($user_id) {
$vessotData = vessot_secure_portable_data();
$preferences = get_user_meta($user_id, ‘preferences’, true);
$result = $vessotData->store("user_preferences_{$user_id}", $preferences);
if (!$result['success']) {
error_log('Failed to store preferences: ' . $result['error']);
}
});
// Retrieve preferences on login
add_action(‘wp_login’, function($user_login, $user) {
$vessotData = vessot_secure_portable_data();
$result = $vessotData->show(“user_preferences_{$user->ID}”);
if ($result['success']) {
update_user_meta($user->ID, 'preferences', $result['value']);
}
}, 10, 2);
`
Store encrypted data with a unique key.
Parameters:
– $key (string): Unique identifier for the data
– $value (mixed): Data to encrypt and store (can be string, or data array)
Returns: Array with success, error, code, and value keys
Retrieve and decrypt stored data.
Parameters:
– $key (string): Unique identifier for the data
– $attribute (string|null): Optional specific attribute to retrieve
Returns: Array with success, error, code, and value keys
Update existing encrypted data.
Parameters:
– $key (string): Unique identifier for the data
– $value (mixed): New value (for full update)
– $attributes (array|null): Specific attributes to update (for partial update)
Returns: Array with success, error, code, and value keys
Delete stored data.
Parameters:
– $key (string): Unique identifier for the data
– $attributes (mixed|null): Optional specific attributes to delete
Returns: Array with success, error, code, and value keys
Generate a new encryption key. Returns empty string if key already exists in environment.
Returns: Encryption key or empty string
This plugin connects to the VESSOT API (https://vessot.tech/api) to store and retrieve encrypted data.
VESSOT is a third-party encrypted data storage service that provides zero-knowledge data storage. The service is provided by VESSOT.
The plugin sends the following data to the VESSOT API:
Data is transmitted to the VESSOT API when you use any of these functions:
vessot_secure_portable_data()->store() – Sends encrypted data to be storedvessot_secure_portable_data()->show() – Retrieves encrypted datavessot_secure_portable_data()->update() – Sends encrypted data updatesvessot_secure_portable_data()->destroy() – Requests data deletionYou must create a VESSOT account at https://vessot.tech before using this plugin. See https://vessot.tech/how-it-works for account creation steps and https://vessot.tech/wordpress for WordPress-specific setup instructions.
For issues and support, visit: https://vessot.tech
This plugin is licensed under the GNU General Public License v2 or later.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
VESSOT – https://vessot.tech