Last active
July 23, 2024 10:28
-
-
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!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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} "https://connect.advancedcustomfields.com/v2/plugins/download?p=pro&k=$ACF_KEY" | |
# install & activate acf | |
wp plugin install ${acf_zip_file} --activate | |
# remove zip file | |
rm ${acf_zip_file} |
@BidmarkBM sorry for the late response, but I've updated the script, URL just needed changing.
@BidmarkBM sorry for the late response, but I've updated the script, URL just needed changing.
Brilliant, thanks - much appreciated!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Long shot @JacobDB , but this doesn't seem to be working for me anymore. Having had a play around with anything I can find online I cant get anything else to work either.
Don't suppose you have an updated solution you could share?!