To integrate DigitalOcean Spaces with WordPress, you'll typically use a plugin that enables you to offload media files (such as images, videos, etc.) to Spaces instead of storing them on your WordPress server. Here's a general guide on how to set it up:
-
Create a DigitalOcean Space:
- Log in to your DigitalOcean account.
- Go to the Spaces section from the left-hand sidebar.
- Click on the "Create a Space" button.
- Choose a name, region, and optionally enable CDN if needed.
- Click on the "Create a Space" button to create the Space.
-
Generate Access Keys:
- Once your Space is created, go to the "Settings" tab.
- Under the "Authentication" section, click on the "Generate New Key" button.
- Copy the generated access key and secret key. You'll need these to connect your WordPress site to DigitalOcean Spaces.
-
Install a WordPress Plugin:
- In your WordPress dashboard, go to the "Plugins" section and click on "Add New."
- Search for a plugin that supports DigitalOcean Spaces integration. Some popular options include "WP Offload Media" by Delicious Brains or "DigitalOcean Spaces Sync" by WP-Time.
-
Configure the Plugin:
- Install and activate the chosen plugin.
- Go to the plugin settings page (usually under Settings > Media or a custom menu item added by the plugin).
-
Enter the access key, secret key, and Space URL (typically in the format
https://your-space-name.region.digitaloceanspaces.com
). - Choose the desired settings for media offloading, including whether to offload existing media files and how to handle new uploads.
-
Test the Configuration:
- Upload a new media file to your WordPress site (e.g., an image).
- Verify that the media file is uploaded to your DigitalOcean Space instead of your WordPress server.
- Check that the media file is displayed correctly on your website.
-
(Optional) Configure CDN:
- If you enabled CDN when creating your Space, you may want to configure CDN settings in your WordPress plugin to improve the performance of media delivery.
By following these steps, you can integrate DigitalOcean Spaces with your WordPress site, offloading media files to Spaces for improved scalability, performance, and storage management. Make sure to follow any specific instructions provided by the chosen plugin for the best results.