• Resolved parakeet

    (@parakeet)


    Hi,
    If I have the plugin upload my 9,000 images to S3 with particular settings set (notably – “Year/Month” off), but subsequently change that setting to on, what happens?
    ie. Does the plugin tell S3 to create a new date folder structure and move all the images to the appropriate folders?

    I note the docs page linked from the setting switch – https://deliciousbrains.com/wp-offload-media/doc/settings/

    If you have existing offloads and are turning on the Year/Month setting, then WP Offload Media will offer to move the existing offloads to the new storage path and ensure its records are kept up-to-date (not available in the Lite version).

    If you have existing offloads and are turning off the Year/Month setting, then WP Offload Media will show a warning that explains why it will not offer to move existing offloads to the new storage path (not applicable to the Lite version).

    Explained further at https://deliciousbrains.com/wp-offload-media/doc/how-to-move-media-to-a-new-bucket-path/

    However, I don’t fully understand the last paragraph… if I understand it correctly, the plugin will only move the images IN to a Year/Month folder structure, but not OUT (?).

    Why would there be a risk of overwrite if the same set of images is just changing folders?

    • This topic was modified 1 year, 10 months ago by parakeet.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter parakeet

    (@parakeet)

    And also…
    What if my images are NOT stored in year/month folders?

    😔 (I wish I had done so, but I’ve a) got one big uploads folder and b) got some image type-specific subfolders, because not everything is a post).

    The docs for the Year/Month setting (https://deliciousbrains.com/wp-offload-media/doc/settings/?utm_medium=insideplugin&utm_source=OS3%2BFree&utm_campaign=support%2Bdocs&utm_content=media%2Byear%2Bmonth#use-yearmonth-folders) say:

    Organize the uploads in year and month folders in the bucket. For example, /2016/02/my-file.jpg.

    The year and month used for each offload will match the year and month that the Media Library item was added to WordPress.

    Does this mean the plugin will organise images by YYYY/MM in the S3 bucket, even if I didn’t store them as such in my WordPress site?

    I’ve noticed this does organise images by YYYY/MM in the S3 bucket, even if I didn’t store them as such in my WordPress site. 😍

    If so, is there a way I can use this feature to (re-)impose such a date-based folder structure back on the local site? eg. upload all to S3, delete all from site, re-download to site? 🙏🏻 Or would they only go back to their original folder locations?

    Thinking aloud, I would possibly only want to do that for a specific set of images – the ones attached to posts.

    And how about the object versioning timestamp, which seems to manifest as a child folder on S3? If I re-synced images back to the local server, would this folder get created each time?

    (Testing with Lite, with a view to going Pro).

    • This reply was modified 1 year, 10 months ago by parakeet.
    • This reply was modified 1 year, 10 months ago by parakeet.
    • This reply was modified 1 year, 10 months ago by parakeet.
    • This reply was modified 1 year, 10 months ago by parakeet.
    • This reply was modified 1 year, 10 months ago by parakeet.
    • This reply was modified 1 year, 10 months ago by parakeet.
    • This reply was modified 1 year, 10 months ago by parakeet.
    • This reply was modified 1 year, 10 months ago by parakeet.
    • This reply was modified 1 year, 10 months ago by parakeet.
    Plugin Author Delicious Brains

    (@deliciousbrains)

    S3 setting … “Year/Month” off … but subsequently change that setting to on, what happens?
    ie. Does the plugin tell S3 to create a new date folder structure and move all the images to the appropriate folders?

    In Pro plugin, yes, Lite, no.

    … However, I don’t fully understand the last paragraph… if I understand it correctly, the plugin will only move the images IN to a Year/Month folder structure, but not OUT (?).

    Why would there be a risk of overwrite if the same set of images is just changing folders?

    If “photo.jpg” was offloaded to “2022/05/photo.jpg”, and then a month later another “photo.jpg” was offloaded to “2022/06/photo.jpg”, there’s a potential that one will overwrite the other if you ask OME to remove the YYYY/MM path from the bucket versions.

    For this reason, OME (Pro) only offers to move the objects in the bucket to the new path settings if the uniqueness of the file names is going to be the same or better.

    You can however override this safety net by asking OME to always show the “Move objects to new storage path” tool.

    https://deliciousbrains.com/wp-offload-media/doc/how-to-move-media-to-a-new-bucket-path/#show-move-public-objects-tool

    I’ve noticed this does organise images by YYYY/MM in the S3 bucket, even if I didn’t store them as such in my WordPress site. 😍

    If so, is there a way I can use this feature to (re-)impose such a date-based folder structure back on the local site? eg. upload all to S3, delete all from site, re-download to site? 🙏🏻 Or would they only go back to their original folder locations?

    The WP Offload Media setting is separate from the WordPress Core setting. So while OME will offload to a YYYY/MM path, when downloading (with Pro) it will return the files to where WP says they should be. The Media Library item’s metadata is set when you add the image to the Media Library, and if “Organize by Year/Month” was turned off when you added the image to the Media Library, that’s how WP will handle the item’s path.

    And how about the object versioning timestamp, which seems to manifest as a child folder on S3? If I re-synced images back to the local server, would this folder get created each time?

    No, the Object Versioning folder is only used in the bucket, WP Core determines where a file should be copied back to.

    -IJ

    Thread Starter parakeet

    (@parakeet)

    Thanks for the reply, IJ @deliciousbrains ..

    The WP Offload Media setting is separate from the WordPress Core setting. So while OME will offload to a YYYY/MM path, when downloading (with Pro) it will return the files to where WP says they should be. The Media Library item’s metadata is set when you add the image to the Media Library, and if “Organize by Year/Month” was turned off when you added the image to the Media Library, that’s how WP will handle the item’s path.

    I guess you mean “Organise my uploads into month- and year-based folders” in WordPress Media Settings.

    I presume, even if I enable now, that wouldn’t retrospectively reorganise my library of 9,000 images by date…

    So… if I enable that core setting and your plugin’s “Year/Month” toggle, is there any chance _that_ combination could tricky my WordPress into reorganising everything by date? Or would it still only put them back as it found them?

    If so, for the thread’s record, I think I’ll need to manually re-house images in newly-created date folders, as follows…

    * Filter the Media Library listing by month, using the date dropdown (eg. June 2020).
    * Optionally, use an additional filter on the listing (thanks to Admin Columns Pro plugin) where “Uploaded to” (attached) “is set” (ie. only images in Posts).
    * Bulk-select these posts and, using a feature of the Organize Media Library by Folders plugin, assign them to a corresponding folder (eg. /2020/06/) manually created under /uploads/.

    Still quite manual, but at least it would allow me to move only post-attached images.

    This doesn’t dilute the apparent main value of the pro plugin for me (offloading). I was just hopeful it could also pull off this additional trick.

    Plugin Author Delicious Brains

    (@deliciousbrains)

    So… if I enable that core setting and your plugin’s “Year/Month” toggle, is there any chance _that_ combination could tricky my WordPress into reorganising everything by date? Or would it still only put them back as it found them?

    No OME will not trick WordPress! WordPress Core will tell OME to put them back where it expects them, i.e. no YYYY/MM sub-folder.

    Why do you need to re-organize the local files anyway?

    -IJ

    Thread Starter parakeet

    (@parakeet)

    Why do you need to re-organize the local files anyway?

    Main aims:

        Consider switching site from WordPress to something else – near to medium term.
        Move from Siteground to a cheaper hosting plan, still on WordPress – near term. Very low-traffic site, despite size… 9,000+ images at 2Gb, 11,000+ posts, database quite small at about 90Mb. Makes sense to offload.

    Most of the 9,000 images are just sitting there in /uploads/ and it feels like a big, inflexible obstacle. There are ways that I could slice and dice them to be more manageable – eg. Folders to match certain post characteristics, folders for YYYY/MM, combination of both (eg. /uploads/post-type/YYYY/MM/image.png).

    I theorise, the more batches I can make, the more movable they become – as opposed to a massive folder of 9,000+, which is challenging to render in an FTP list. The Media Library can also be quite slow (though I suspect this may not change, as we will still be talking about 9,000+ media item entries, regardless of location).

    I kind of feel like I want to organise them as such before doing a big offload to S3. I’m looking around at some plugins for this.

    If I manage it manually (and with plugins), I guess I could leave OME’s YYYY/MM setting Off – especially if it’s a combination of the above.

    Thread Starter parakeet

    (@parakeet)

    Checking back in on this…

    On the existing site, I have taken some manual time and used plugins like https://wordpress.org/plugins/organize-media-folder/ to move my approx 9,000 images into a variety of sub-folders and further sub-folders. (Some of those have YYYY/MM child folders, though this is by no means the rule). So, the paths of many images have changed, but I presume the guids stay the same.

    I haven’t yet bought/installed OME Pro, but I have a question…

    What if I were to relocate images like this in future, after an OME sync to S3?

    • Would the plugin prompt S3 to move the image file/s, create/delete sub-folders etc?
    • And would it put them in the right place if I subsequently synced the library back to the site?

    Come to think of it, to what extent is relocating the physical file within the storage a thing, if the library is only remotely hosted on S3… ?

    I’m unclear how this would work… if I wanted to use a plugin like https://wordpress.org/plugins/organize-media-folder/ to bulk move images to a different directory, how would this work in a scenario where the library is off-site via OME? I’d still like to use plugins like that, which allow you to upload/store/move images to alternate directories.

    • This reply was modified 1 year, 9 months ago by parakeet.
    • This reply was modified 1 year, 9 months ago by parakeet.
    • This reply was modified 1 year, 9 months ago by parakeet.
    Plugin Author Delicious Brains

    (@deliciousbrains)

    Assuming the Organize Media Folder plugin is a good citizen and uses core WordPress functions for updating the Media Library metadata for items it moves, then WP Offload Media’s data will be updated so it knows where the local files for each item should be.

    This means URL rewriting should continue to work as expected, and WordPress core will tell WP Offload Media where to put the files on the server when downloaded.

    -IJ

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Question about settings updates and resync’ is closed to new replies.