View Categories

Configure Cloud Storage with WP Cloud Media

How to Configure Cloud Storage with WP Cloud Media

After installing and activating WP Cloud Media, follow these steps to configure your cloud storage:

1. Select Provider #

Navigate to the WP Cloud Media settings in your WordPress admin dashboard. Choose your preferred cloud storage provider, such as AWS S3, Google Cloud Storage, or DigitalOcean Spaces.

2. Select Connection Type #

Choose how you want to manage your access credentials:

  • Define Key File Path in wp-config.php (Recommended): Enter the file path to your access credentials in the wp-config.php file. This method is more secure as it keeps your keys out of the database.
  • Store Access Keys in the Database (Not Recommended): Opt for this only if you fully understand the risks. Your keys will be stored directly in the WordPress database, which could be less secure.

3. Add Credentials #

You will have two options for managing your credentials:

For Define Key File Path in wp-config.php  #

For added security, credentials are stored outside the database in the wp-config.php file. Add the following code snippet for AWS S3 or DigitalOcean Spaces:

define( ‘WPHOOP_CLOUD_MEDIA_CONFIG’, [

‘provider’ => ‘do_space’, // or ‘aws_s3’ for AWS S3

‘access-key-id’ => ‘********************’,

‘secret-access-key’ => ‘***********************’,

]);

Replace the placeholders with your actual Access Key ID and Secret Access Key.

Following code snippet for Google Cloud Storage:
Upload the JSON key file for your Google Cloud Service Account to your hosting server. Then, define the file path in your wp-config.php file:

define( ‘WPHOOP_CLOUD_MEDIA_CONFIG’, [

    ‘provider’ => ‘gcp_storage’,

    ‘key-file-location’ => ‘/path/to/key-file.json’,

]);

 

Replace /path/to/key-file.json with the actual path to your uploaded key file.

 

For Store Access Keys in the Database  #

If you opt to store credentials in the database:

  • AWS S3 & DigitalOcean Spaces: Enter your AWS Access Key ID and AWS Secret Access Key directly in the plugin settings.

 

  • Google Cloud Storage: Input your Google Cloud JSON key file in the plugin settings.

 

4. Select Storage Bucket #

Once credentials are verified, the plugin will fetch a list of existing buckets from your cloud storage provider. Select the bucket you want to use from the dropdown menu.

  • If you don’t see the desired bucket, ensure it has been created in your cloud provider’s dashboard and that your credentials have access to it.

 

5. Finalize Configuration #

After selecting a bucket, save your settings. Your WP Cloud Media plugin is now configured and ready to sync files, delivering enhanced website performance!

 

Submit a Comment

Your email address will not be published. Required fields are marked *