Skip to content

Instantly share code, notes, and snippets.

@JacobDB
Last active November 18, 2021 15:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save JacobDB/130eb6e3a148c1cfff301daccc3958ad to your computer and use it in GitHub Desktop.
Save JacobDB/130eb6e3a148c1cfff301daccc3958ad to your computer and use it in GitHub Desktop.
Download and install ACF Pro via a bash script – to be used with WP CLI. Set an environemnt variable ACF_KEY first!
#!/bin/sh
# Adapted from https://support.advancedcustomfields.com/forums/topic/download-acf-with-wp-cli-on-clean-install/#post-26191
# get plugin path
acf_zip_file="$(wp plugin path)/advanced-custom-fields-pro.zip"
# get acf zip file
wget -O ${acf_zip_file} "http://connect.advancedcustomfields.com/index.php?p=pro&a=download&k=$ACF_KEY"
# install & activate acf
wp plugin install ${acf_zip_file} --activate
# remove zip file
rm ${acf_zip_file}
@BidmarkBM
Copy link

Awesome... thanks!

@rrr3da
Copy link

rrr3da commented Nov 18, 2021

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment