WP-CLI

To download all attachment files from a remote site: from your local uploads directory:

wp post list --post_type=attachment --field=_wp_attached_file | xargs -I {} wget -x -nH --cut-dirs=2 "https://$DOMAIN/wp-content/uploads/{}"

Revision #1
Created 21 September 2023 10:32:41 by Sander
Updated 21 September 2023 10:33:33 by Sander