Skip to main content

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/{}"