How to Connect a DigitalOcean Space with WP Cloud Media
Follow these steps to connect your DigitalOcean Space with WP Cloud Media for efficient file storage and delivery:
1. Generate Access Credentials #
- Log in to the DigitalOcean Control Panel.
- Navigate to the API section in the left-hand menu.
- Under Spaces Access Keys, click Generate New Key.
- Provide a name for the key and click Generate Key.
- Copy the Access Key and Secret Key displayed. Keep these credentials secure as you’ll need them for the plugin configuration.
2. Create a DigitalOcean Space #
- Navigate to the Spaces section in your DigitalOcean account.
- Click Create a Space and:
- Enter a unique name for your Space.
- Select a region where you want your Space to be created.
- Choose whether the Space is public (accessible via URL) or private.
- Click Create Space to finish.
3. Install and Activate WP Cloud Media #
- Install WP Cloud Media on your WordPress site.
- Activate the plugin and your license.
4. Configure WP Cloud Media for DigitalOcean Spaces #
Step 4.1: Select Provider #
In the plugin settings, choose DigitalOcean Space as your cloud storage provider.
Step 4.2: Choose Connection Type #
Define Key File Path in wp-config.php (Recommended):
Add the following code to your wp-config.php file:
php
Copy code
define( ‘WPHOOP_CLOUD_MEDIA_CONFIG’, [
‘provider’ => ‘do_space’,
‘access-key-id’ => ‘YOUR_ACCESS_KEY’,
‘secret-access-key’ => ‘YOUR_SECRET_KEY’,
]);
- Replace YOUR_ACCESS_KEY and YOUR_SECRET_KEY with your actual credentials.
- Store Access Keys in the Database (Not Recommended):
Enter your Access Key and Secret Key directly in the plugin settings interface.
5. Select Storage Space #
After adding credentials, the plugin will fetch a list of your existing Spaces. Select the Space you created earlier from the dropdown menu.
6. Set File Settings and Start Sync #
- Configure Bucket Path, Auto Upload, Deliver From, and Rewrite URL in the File Settings section.
- Use Sync Options to upload media and static files to the Space.
Your DigitalOcean Space is now connected, and WP Cloud Media is fully configured to optimize your file delivery and website performance.