I use the following code in my PHP script to automatically download the latest version of WordPress…
$wordpress_zip_file_url="https://wordpress.org/latest.zip";
file_put_contents("wordpress.zip", file_get_contents($wordpress_zip_file_url));
Does this work for plugins the same way? For example, I’d like to automatically download the latest backupwordpress plugin version –> https://wordpress.org/plugins/backupwordpress/
Is there a generic link to download the latest version of a plugin?