• Resolved lewiswp

    (@lewiswp)


    I didn’t see a WPCLI command in there to update the remote assets on our CDN. It would be nice if we could update the assets on our CDN buckets using some WPCLI command rather than having to go to the dashboard and click on the links to upload certain assets to the CDN.

    Use Case:

    I update a set of images that had previously existed on my site and on the s3 bucket, but I want to regenerate the thumbnails and update those assets on the CDN.

    What I have to do: rsync the files up to the remote server, SSH into the server run wp media regenerate and then login to my site and click the links to update the assets on the CDN.

    What I’d like to do: rsync the files up to the remote server, SSH into the server run wp media regenerate and wp w3tc update-cdn --assets=theme or something along those lines.

    Any chance we can see some additional WPCLI commands introduced into the plugin to update the assets on the CDN a bit easier?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello,

    For this you can use the following:
    wp w3-total-cache cdn_purge
    i.e.

    wp w3-total-cache cdn-purge wp-content/uploads/my-file1.jpg wp-content/uploads/my-file2.jpg

    Thread Starter lewiswp

    (@lewiswp)

    @vmarko

    Great! Thank you – I will take a look at using this in future releases up to the server.

    Does this also push the assets up to the CDN?

    • This reply was modified 5 years, 1 month ago by lewiswp.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WPCLI command to update CDN assets’ is closed to new replies.