Refresh test from prod
-
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/uploadsand test istest-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 ofprod-wp-contenttotest-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 anas3cf_settingsoption in the list when doingwp 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.
The topic ‘Refresh test from prod’ is closed to new replies.