- Open a DigitalOcean Account
- Create A DigitalOcean Space
- Restrict File Listing
- Enable File Listing
- How To Connect Your DigitalOcean Space with Media Storage to Cloud
- How To Generate an API Key for a DigitalOcean Space
- How To Connect DigitalOcean Space to Media Storage To Cloud
- Step 1:
- Step 2:
- Space Access Key and Secret
- Space Name
- Space Region
- Step 3:
- Step 4:
- Step 5:
- Serve Media File From Bucket
- Upload Media Files On Bucket When Uploaded On Media Library
- Delete Media From Bucket When Deleted From The Media Library
You can connect your DigitalOcean Spaces with WordPress Media Storage to Cloud and start serving your website media files directly from your DigitalOcean Spaces.
Before connecting your DigitalOcean Spaces with WordPress Media Storage to Cloud plugin, you have to:
- Open a DigitalOcean account.
- Create a Space on your DigitalOcean account.
Open a DigitalOcean Account #
If you already have a DigitalOcean account, visit this page to login.

If you don’t have a DigitalOcean account, visit this link to sign up for DigitalOcean.

Now follow these steps to open a DigitalOcean account.
1. You can sign up for DigitalOcean using your email address, Google account or GitHub account.
To sign up with your email, you have to:
- Enter your full name.
- Enter your email address.
- Set a password.

2. Now click on the Sign up button.
3. A confirmation link will be sent to your provided email address.
Click on it to confirm and verify your email address.
4. Now, you’ll be taken to the second step of your account creation: Set Up Billing.

5. You can use one of the following as the billing information:
- Credit or Debit Card
- Paypal account
6. Next, you have to set up your Project Goals.
And that’s it.
7. Once you’ve created your DigitalOcean account, it’ll look as follows:

Create A DigitalOcean Space #
To create a DigitalOcean Space, follow the instructions below.
1. Click on the green Create button on the top-right corner of your DigitalOcean dashboard.

2. A dropdown menu will appear. Click on the Spaces option.
3. The following page will appear where you can setup the preferences for your new space.

4. Under Choose a datacenter region, select the datacenter you would like to use (nearest to your location recommended).
5. If you want to use CDN, you can enable it under CDN (Content Delivery Network).
6. Under Allow file listing, you have two options:
Restrict File Listing #
This will restrict the contents of your new Space within only the users who are connected to this Space using access keys.
Enable File Listing #
This will allow anyone to list the contents of this space.
Though listing files won’t make your files visible to the public, it is recommended to select Restrict File Listing for further security.
7. Scroll down and you’ll find the Finalize and Create section.

8. Set a unique name for your Space and choose the Project where this new Space belongs to.
9. Click on the Create a Space button below and now your DigitalOcean space is created.
How To Connect Your DigitalOcean Space with Media Storage to Cloud #
To connect your DigitalOcean Space to Media Storage to Cloud, you will need to do the following:
- Generate API Key for DigitalOcean Space.
- Connect DigitalOcean Space to Media Storage To Cloud.
How To Generate an API Key for a DigitalOcean Space #
To generate API Key for your preferred DigitalOcean Space, follow the instructions below:
1. Click on the API option on the left sidebar of your DigitalOcean dashboard.

2. The following page will appear:

3. Here, under the Space access keys section, click on the Generate New Key on the right side.
4. Give a unique name to it.

5. Then click on the tick mark beside the name to save it.

6. Once created, you will be able to view the Key beside it.

7. You will need this key when connecting your Space to Media Storage to Cloud in your WordPress site.
Keep this page open on a tab when following the next step, as you will need to collect the key(s) from here.
How To Connect DigitalOcean Space to Media Storage To Cloud #
Follow the steps below to Connect your DigitalOcean Space with Media Storage to Cloud.
Step 1: #
Go to Dashboard > WP Media Storage to Cloud > Settings.

Go to the Storages menu on the right side, and under Select Storage, click on the DigitalOcean logo.
Step 2: #
Here, you have to provide the following credentials:
- Space Access Key.
- Space Access Secret.
- Space Name.
- Space Region.
Space Access Key and Secret #
1. Go to your DigitalOcean account dashboard, and on the left sidebar, click on API.

2. You will be taken to the Applications & API page.
3. Here, under the Space Access Keys, you will find the API key that you generated earlier.

4. For the API you created, on the right side, click on More.

5. Then click on the Regenerate Key.

6. It will ask to confirm the regeneration. Click on the blue button saying Regenerate Key.
7. The keys will be regenerated.

8. Copy the keys and paste them in the respective fields in Media Storage to Cloud.
Space Name #
When you created the Space, you gave a name to it. You need to input that name in the Space Name field in the Media Storage To Cloud.
To find out the name of your Space(s), go to your Digital Ocean account Dashboard, and on the left sidebar, click on Spaces.

It will take you to the Spaces section where all your existing Spaces are listed.

Copy the name of the Space you will use offload your WordPress media files, and paste it in the Space Name field in the Media Storage to Cloud.
Space Region #
To find the Space Region, click on your desired Space in the Spaces section.

Here, right under the space name, you will see the Space link. The region will be the portion just before the portion ‘.digitaloceanspaces.com’.
As you can see in the image, marked red, the region for this space is ‘nyc3’.
You can also find the Space Region in the settings of your desired Space.
Click on the Settings tab.
Below, under Endpoint, you will find the term in the format, region.digitaloceanspaces.com.
As you can see in the image below, its nyc3.digitaloceanspaces.com. The region is ‘nyc3’.

Input the region in the respective field in Media Storage To Cloud.
Step 3: #
When you’ve filled all four fields, click on the blue Save button.

You’ll see a confirmation message that will ensure you that you are successfully authorized.

A green Ready To Sync text will also appear.
Step 4: #
Go to the Sync tab and go to the DigitalOcean Space tab.

Click on the Sync button on the right side and your media files will start syncing with your DigitalOcean Space.

A progress bar will appear to show the progress of the live sync.
The time required will vary depending on the number of media files to sync from your site.
Step 5: #
Go to the Settings tab and choose DigitalOcean Space.

You’ll find the following three options:
Serve Media File From Bucket #
Turning on this option will serve all the media files on your website directly from the DigitalOcean Space.
It will automatically switch the links of the media files from your website domain to your Digitalocean space domain.
Upload Media Files On Bucket When Uploaded On Media Library #
Turning on this option will auto-sync your website media with your DigitalOcean Space for new files.
Any new media files you upload on your website media library will automatically be uploaded on your DigitalOcean Space as well.
Delete Media From Bucket When Deleted From The Media Library #
Turning on this option will mean that any media file you delete from your website media library, will also be deleted from your DigitalOcean Space automatically.
You can turn on or off these options according to your preferences and click on the Save button to save the changes.
That’s it.