Cloud Storage
Cloud Storage offloads your gallery images from your web server to a cloud storage provider. Images are uploaded to the cloud automatically as they're added to galleries, and URLs are seamlessly rewritten so everything continues to work. This reduces server disk usage and can improve image loading speed.
Supported Providers
- Amazon S3 — The most widely used cloud storage. Reliable and scalable.
- DigitalOcean Spaces — Simple, affordable S3-compatible storage.
- Google Cloud Storage — Google's cloud storage platform.
- Bunny.net — Fast, affordable storage with a built-in CDN.
- Wasabi — Budget-friendly S3-compatible storage with no egress fees.
- Backblaze B2 — Low-cost S3-compatible storage.
- Cloudflare R2 — S3-compatible storage with no egress fees.
- Linode Object Storage — S3-compatible storage from Akamai.
- Custom S3-Compatible — Any service that supports the S3 API.
Each provider has its own setup guide with instructions for creating credentials and connecting to Sunshine. See the individual provider articles for step-by-step setup.
How It Works
You don't upload images directly to your cloud provider. Your workflow stays exactly the same as without cloud storage — upload images to your gallery through the WordPress admin (drag-and-drop or FTP) just like you normally would.
Here's what happens behind the scenes:
- You upload images to a gallery in your WordPress admin
- Sunshine processes them (resizes, applies watermark if enabled, generates thumbnails)
- The Cloud Storage addon automatically uploads the processed files to your cloud storage bucket
- The URLs in your gallery are rewritten to point to the cloud copies
You don't need to log into your cloud provider's dashboard, manage files in a bucket, or do anything differently. The addon handles everything automatically after the normal upload.
Full-size originals are kept private. They're served through secure, time-limited signed URLs that expire after one hour. This prevents anyone from accessing the full-resolution file directly. Thumbnails and display-size images are served publicly for fast loading.
If your storage provider or account doesn't allow public object access (for example, Wasabi trial accounts), all images — including thumbnails — are automatically served through signed URLs instead. This is detected during the connection test, so everything works without any extra configuration on your part.
If you later need to apply watermarks or regenerate images, the addon re-uploads to the same cloud paths so nothing breaks.
General Settings
After connecting your provider (see the individual provider guides), these settings apply to all providers.
Scope
Choose what gets offloaded:
- Sunshine galleries only (default) — Only images uploaded to Sunshine Photo Cart galleries are sent to cloud storage.
- Entire WordPress site — Every image uploaded to your WordPress media library is offloaded. Use this if you want all your site's images in the cloud.
Remove Local Files After Upload
When enabled, local copies of images are deleted from your server after they're uploaded to the cloud. This frees up disk space but means the files only exist in your cloud storage.
Note: Only enable this after confirming your cloud storage is working correctly. If something goes wrong with your cloud provider, you won't have local copies to fall back on.
Bucket Path Options
These settings control how files are organized inside your bucket:
- Add Prefix to Bucket Path — Adds a prefix like
wp-content/uploads/to all file paths in the bucket. Useful if the bucket is shared with other applications. - Bucket Path Prefix — The prefix text to use (default:
wp-content/uploads/). - Add Year & Month to Bucket Path — Organizes non-gallery media library images into year/month folders (e.g.,
2025/02/photo.jpg). Gallery images are always organized by gallery ID regardless of this setting. - Add Object Version to Bucket Path — Adds a timestamp to the path for cache busting. Useful if you frequently update images and need CDN caches to refresh.
Gallery images are always stored under sunshine/{gallery-id}/ within your bucket, so they stay organized by gallery.
Custom Domain
If you use a CDN (like CloudFront or a custom domain pointed at your bucket), enter the CDN URL in your provider's settings. All public image URLs will use this domain instead of the default storage provider URL. Each provider has its own Custom Domain field, so you can configure it as part of the same settings group as your credentials and bucket.
Note: This only affects images uploaded after the custom domain is set. Existing images keep their original URLs. If you add a CDN later, use the migration tool to re-upload existing images with the new URLs.
Credential Storage
You can store your cloud credentials in two ways:
Database (Default)
Enter your credentials directly in the Sunshine settings page. Simple to set up but credentials are stored in your WordPress database.
wp-config.php (Recommended)
Define your credentials as a PHP constant in your wp-config.php file. This is more secure because:
- Credentials are never stored in the database
- They can't be accessed through the WordPress admin
- They're version-controlled if you manage
wp-config.phpin source control
When you select "wp-config.php" as the connection method, the settings page shows the exact code snippet to add to your wp-config.php file based on your selected provider.
Testing Your Connection
After entering your credentials and selecting a bucket, click the Test Connection button. This performs a full test cycle:
- Uploads a small test file to your bucket
- Downloads it back and verifies the contents match
- Deletes the test file
- Checks whether your bucket supports per-object access controls (ACLs)
- Verifies that public URLs are accessible (uploads a public file and checks if it can be fetched)
If the test passes, you'll see a success message. If there are warnings about ACL support or public access, see the troubleshooting section below.
If public URL access is blocked by your provider (common with trial accounts or restricted policies), the addon automatically switches to signed URLs for all images. Everything still works — images just load through temporary signed URLs instead of direct public links.
Migrating Existing Images
If you already have galleries with images before installing Cloud Storage, you'll need to migrate them. Go to Sunshine Photo Cart > Tools > Cloud Storage Migration.
The migration tool shows:
- Total number of images in your library
- How many are already offloaded
- How many need migration
- Estimated total file size
Click Start Migration to begin. Images are processed in batches of 10, with a real-time progress bar showing how far along you are. You can stop the migration at any time and resume later.
If any images fail to upload, you'll see a count of failures at the end with a Retry Failed Uploads button.
Media Library Integration
When Cloud Storage is active, the WordPress media library shows a Cloud column indicating which images have been offloaded. You can also:
- Click Offload to Cloud on individual images from the row actions
- Select multiple images and use the Offload to Cloud Storage bulk action
These options only appear for images within your configured scope (Sunshine galleries only or entire site).
ACL Support
ACLs (Access Control Lists) allow the addon to make full-size gallery images private while keeping thumbnails public. Some providers require ACLs to be enabled in their bucket settings.
If your bucket doesn't support ACLs, you'll see a warning after testing your connection. The addon still works — images upload successfully — but your bucket's default access policy applies to all files. This means full-size images may be publicly accessible if your bucket defaults to public.
To fix this for Amazon S3:
Go to your S3 bucket > Permissions > Object Ownership and select "ACLs enabled" with "Bucket owner preferred."
To fix this for Google Cloud Storage:
Go to your bucket > Permissions > Access Control and switch from "Uniform" to "Fine-grained."
Bunny.net does not use ACLs. Privacy is handled through CDN Token Authentication instead — see the Bunny.net setup guide.
Volume Galleries Integration
If you have the Volume Galleries add-on installed, you can use your cloud storage bucket as a source for bulk gallery creation. Instead of uploading images via FTP, select your cloud storage as the image source on the bulk gallery creation screen. The plugin imports images directly from your bucket, following the same folder structure rules for creating gallery hierarchies.
WP Offload Media Compatibility
If you previously used WP Offload Media (formerly WP Offload S3), Cloud Storage recognizes images that were offloaded by that plugin and continues serving them from the cloud. You don't need to re-upload anything.
However, you should not run both plugins at the same time. Deactivate WP Offload Media before activating Sunshine Cloud Storage. Your existing offloaded images will continue to work.
Troubleshooting
Images not offloading after upload
- Check that your connection test passes in Sunshine > Settings > Cloud Storage.
- Verify your scope setting matches what you're uploading (gallery images vs. media library).
- If you use the Delay Image Processing setting in Sunshine, images won't offload until background processing completes. Make sure WP-Cron is running on your server.
Broken images after enabling "Remove Local Files"
If images appear broken, your cloud storage connection may have an issue. Check your credentials and bucket settings. Unfortunately, if local files were already deleted, you'll need to restore them from a backup or re-upload the originals to your galleries.
Connection test fails
- Double-check your access key and secret key for typos.
- Verify the bucket exists and your credentials have permission to read and write to it.
- For provider-specific troubleshooting, see the individual provider setup guides.
Still need help?
If you have not yet found your answer in the documentation articles, please contact support