Support

Account

Home Forums ACF PRO Download ACF with WP-CLI on clean install

Solved

Download ACF with WP-CLI on clean install

  • Hello !

    I wanted to make a script to automatically install WP with WP-CLI.
    Very powerful by the way.

    Everything works fine (create DB, DL and install WP, install plugins, change some options, DL and activate theme…)

    The only thing remaining is to automatically download and install ACF-PRO

    I tried :

    wp plugin install http://connect.advancedcustomfields.com/index.php?p=pro&a=download&k=<MYKEY>

    but it’s not working, I think because this is not the direct URL.

    Have you got an Idea ?

    Thanks

  • If someone is looking for a solution, here’s how I did with bash script :

    # get plugin path
    acf_zip_file=”$(wp plugin path)/acf-pro.zip”

    # get acf zip file
    wget -O ${acf_zip_file} “http://connect.advancedcustomfields.com/index.php?p=pro&a=download&k=<YOUR_KEY>”

    # install & activate acf
    wp plugin install ${acf_zip_file} –activate

    # remove zip file
    rm ${acf_zip_file}

  • Thank you for the help 🙂

  • There is an easier way to install ACF via WP-CLI now since wp plugin install accepts “<plugin|zip|url>” as a first parameter. Docs here.

    Just run wp plugin install “http://connect.advancedcustomfields.com/index.php?p=pro&a=download&k=<YOUR_KEY>” and that’s it. You can also add --activate flag to activate ACF after installation.

  • This method doesn’t work for me, or doesn’t work anymore.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.