• I have a test site and my production site. I’m looking to set things up so that I can periodically refresh my test site from production, which I have a script for using WP CLI. In the case of this plugin, I want to use one S3 bucket & Cloudfront distribution, and use custom prefixes so that the production prefix is prod-wp-content/uploads and test is test-wp-content/uploads. The refresh script would sync the files to S3 using the AWS CLI and then do a database search & replace to change all instances of prod-wp-content to test-wp-content.

    However, I’m not able to see a config option in WP CLI to adjust the prefix settings. ChatGPT was suggesting something like wp option update as3cf_settings "$(wp option get as3cf_settings | jq --arg prefix 'test-' '. + {object_prefix: $prefix}')", but that seems to no longer be accurate with 3.2.11, as I don’t see an as3cf_settings option in the list when doing wp options list.

    Can you advise as to how to go about this? I’m very leery of pointing both sites at the same bucket/distribution without using different prefixes, that seems somewhat risky to me. While I could set up a different bucket and distribution, I can’t see how I would change those settings, either.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Refresh test from prod’ is closed to new replies.