Overview
Your WordPress sites are configured to use DigitalOcean Spaces (everydaytech-wordpress) for media storage with CDN enabled for faster content delivery. This ensures uploaded files persist across deployments, reduces app storage costs, and serves media through edge caching.
Environment Variables Configured
All apps have these environment variables set:
Spaces Credentials
Note: Media files are served through the CDN endpoint for improved performance and reduced load times.
WordPress Plugin Compatibility
- AWS_ACCESS_KEY_ID: (same as DO_SPACES_KEY)
- AWS_SECRET_ACCESS_KEY: (same as DO_SPACES_SECRET)
- AWS_S3_BUCKET: everydaytech-wordpress
- AWS_S3_ENDPOINT: https://syd1.digitaloceanspaces.com
- AWS_DEFAULT_REGION: syd1
Setup Options
Option 1: WP Offload Media Lite (Recommended)
- Install the plugin via WordPress admin or WP-CLI:
wp plugin install amazon-s3-and-cloudfront --activate
- The plugin will automatically detect the environment variables
- Configure via Settings > Offload Media:
- Enable "Remove Files From Server" to save local storage
- CDN Benefits:
- Images load faster through edge caching
- Reduced bandwidth costs
- Better global performance
- 1-hour cache TTL (3600 seconds)
Option 2: Media Cloud Plugin
- Install Media Cloud:
wp plugin install ilab-media-tools --activate
- Navigate to Media Cloud settings
- Select DigitalOcean Spaces as provider
- Credentials will auto-populate from environment variables
Option 3: Manual Configuration (wp-config.php)
Add to wp-config.php:
define('AS3CF_SETTINGS', serialize([
'provider' => 'do',
'access-key-id' => getenv('DO_SPACES_KEY'),
'secret-access-key' => getenv('DO_SPACES_SECRET'),
]));
define('AS3CF_BUCKET', 'everydaytech-wordpress');
define('AS3CF_REGION', 'syd1');
Bucket Structure
Recommended folder structure in everydaytech-wordpress:
everydaytech-wordpress/
├── collegeo/
│ └── wp-content/uploads/
├── corne582/
│ └── wp-content/uploads/
├── handsofd/
│ └── wp-content/uploads/
└── [other-sites]/
└── wp-content/uploads/
CDN Configuration
For faster media delivery, configure Spaces CDN:
- In DigitalOcean dashboard: Spaces → everydaytech-wordpress → Settings
- Enable CDN
- Custom subdomain: cdn.everydaytech.au (requires DNS CNAME)
- Update WordPress plugin settings to use CDN URL
Migrating Existing Media
To migrate existing wp-content/uploads to Spaces:
# For each site
wp media regenerate --yes
wp s3-uploads migrate-attachments
Or use WP Offload Media's bulk upload tool in WordPress admin.
Permissions
The Spaces bucket should have:
- Public Read for uploaded media (images, PDFs, etc.)
- Private Write (only app can upload via credentials)
Configure in: Spaces → everydaytech-wordpress → Settings → File Permissions
Costs
- Storage: $0.02/GB/month (first 250GB included with $5 base fee)
- Bandwidth: $0.01/GB outbound
- CDN: Free with Spaces
Typical costs per site: $0.50-2.00/month depending on media library size.
Troubleshooting
Media not uploading to Spaces
- Check environment variables are set: ‘wp cli eval "var_dump(getenv('AWS_ACCESS_KEY_ID’));"`
- Verify bucket permissions in DO dashboard
- Check plugin error logs in WordPress admin
Old media still on local storage
Run migration command or enable "Remove Files From Server" in plugin settings
403 Forbidden errors
- Check bucket permissions (should be public read)
- Verify CORS settings allow your domain
Next Steps
- Install WP Offload Media Lite on each site
- Configure to use DigitalOcean Spaces
- Run bulk upload for existing media
- Enable CDN for better performance
- Test uploads work correctly
Support Links