• Resolved joe5wp

    (@joe5wp)


    Hi!
    I have a website such as abc.com, I setup an s3 bucket named just “abc” and setup WPOML and all works great. I’ve uploaded a lot on my hobby site for a number of years. I recently wanted to turn on cloudflare CDN so I can use a custom domain instead of the long s3 name.

    Well according to this wpoml guide (https://deliciousbrains.com/wp-offload-media/doc/cloudflare-setup/), “Cloudflare requires that the bucket name be the same as the CNAME you wish to use.”

    So a long time ago, I didn’t have the foresight to name my bucket “cdn.abc.com”, instead I just named my bucket “abc”. This does not match enough I guess.

    Is there anyway to work around this issue? I don’t suppose I can easily rename my bucket and keep wpoml linked? Is my only option to start completely from scratch and delete the old bucket, make a new one, and reconfigure everything, and re-upload everything?

    • This topic was modified 4 years, 11 months ago by joe5wp.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Delicious Brains

    (@deliciousbrains)

    With WP Offload Media (Pro) you can “Change” bucket, create (or select) the new “cdn.abc.com” bucket name you need, and then let WP Offload Media copy the objects from the current bucket to the new bucket.

    https://deliciousbrains.com/wp-offload-media/doc/how-to-copy-media-between-buckets/

    After that, just configure the Cloudflare Delivery Provider as per the guide.

    -IJ

    Thread Starter joe5wp

    (@joe5wp)

    Thank you so much for your helpful response. I will keep that in mind as a clear advantage to the Pro version.

    Can I ask what steps would roughly be required for the Lite version? Would i need to follow the entire amazon setup and permissions linking etc? Or just create a new bucket within amazon and point Lite there? If I point wpom Lite at the new bucket then, will new items go there? And old items continue to work in the old bucket? As of now my website is still just a hobby, so not quite ready to jump to Pro.

    Plugin Author Delicious Brains

    (@deliciousbrains)

    Would i need to follow the entire amazon setup and permissions linking etc?

    Sort of …

    Or just create a new bucket within amazon and point Lite there?

    … just “Change” bucket in WP Offload Media Lite and “Create new bucket” with the name you want. That’s an easy way to create it with correct permissions for Cloudflare to access it.

    If I point wpom Lite at the new bucket then, will new items go there?

    Yes.

    And old items continue to work in the old bucket?

    Hmm, no, because WP Offload Media Lite will try and use the custom domain for them too, but Cloudflare will not pull from the old bucket.

    You could manually copy the old bucket’s objects across to the new bucket via the AWS Console, and then update the data in WP Offload Media Lite’s as3cf_items table to reflect the new bucket. But you need to be very carefull about that to ensure you don’t break the data or change the paths for the objects when copied across to the new bucket. Please make sure you take database backups and know how to restore it etc before manually updating the table data.

    WP Offload Media does all that copying and updating for you when you change the bucket and say “Yes” to copying across the existing offloads.

    -IJ

    Thread Starter joe5wp

    (@joe5wp)

    THANK YOU!

    So, creating a new bucket is really easy and works. CDN and cname now working for all new uploads. It does orphan all my old links. So I went thru the manual process of deleting all old media and re-uploading it all fresh… actually still working on that. A saturday project.

    Thanks for your help, points me in the right direction. Paid version would be a lot easier, but for now the manual process works.

    Very please with your product and help.

    Plugin Author Delicious Brains

    (@deliciousbrains)

    Excellent, glad I could help.

    -IJ

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘bad bucket name – can’t match cname for cdn.’ is closed to new replies.