Switch bucket functionality
-
While setting up our production/staging/develop environments, and some scripts that are syncing from production->Staging and production->development, we came upon the following puzzles:
We use a different bucket for each environment. We clone the bucket (So they have the same contents). We can update the public urls of the images with awp search-replace $OLD_PATH $NEW_PATH --precise --skip-columns=guid
But this leaves thebucket
field of each image still pointing to the source bucket.We tried testing updating all occurencies of the old bucket in the database, but this was breaking the sm_cloud param of the meta values (So
wp post meta get ID sm_cloud
was returning empty after the brute force replacement).Questions:
1) Why does each image need to have it’s own bucket declaration, since the system has the bucket option on a site level?
2) Is there any functionality for switching bucket of any (or all) images? (Switching all the needed data, without breaking the image, without trying to do any move).
3) Are there any dangers if we leave thebucket
field as it is, and only change the actual url of the image?
Thanks
- The topic ‘Switch bucket functionality’ is closed to new replies.