Note: These actions must be performed by a developer with permission to run commands on our daemon server. This article can be referenced in Jira tickets as needed.
You can use the WordPress CLI to perform a search-and-replace operation across your content. Start with a dry run to preview changes:
wp search-replace --url=d%account_id%.cms.socastsrm.com 'jpbgimages.cachefly.net' 'cloudinary.jpbgdigital.com' wp_%blog_id%_postmeta --regex --regex-flags='i' --dry-run
When you are satisfied with the results, run the command without the --dry-run flag to apply the changes:
wp search-replace --url=d%account_id%.cms.socastsrm.com 'jpbgimages.cachefly.net' 'cloudinary.jpbgdigital.com' wp_%blog_id%_postmeta --regex --regex-flags='i'
For more details, refer to the WordPress Search Replace documentation.
Notes:
wp_postmeta table.wp_%blog_id%_posts table, which stores post_title and post_content.If you are satisfied with the dry run, you can run the command without the --dry-run flag to apply the changes.
News widgets use data cached in Elasticsearch. After updating the database, you must refresh the data in Elasticsearch. Run the following command:
wp socast-elasticsearch index_create --check_exists=false --url=d%account_id%.cms.socastsrm.com
If you need to perform the same operation on multiple sites, create a Bash script containing all necessary commands. Use and update the provided sample file as needed.
Upload the script to the /socast folder on the daemon server and run the following command:
nohup ./SP14331.sh > SP14331_report.txt
You can close your terminal if needed. Use the generated report file to monitor the progress of the script until all actions are completed.