Forums

Plugin: How to download and upate plugin files? (3 posts)

  1. Alexandre Vallières-Lagacé
    Member
    Posted 3 years ago #

    Hi,

    I want to write a plugin and one of the functionality would be to connect to a website, download a zip file and extract it to the plugin folder.

    How can I achieve that in PHP? Any plugin you know already does it so I can check out how they do it?

    Thanks!

  2. MichaelH
    Volunteer
    Posted 3 years ago #

    Isn't that what the native ability to update plugins does?

    Also look at the WordPress Automatic Upgrade Plugin for ideas--though the plugin in no longer necessary.

  3. Alexandre Vallières-Lagacé
    Member
    Posted 3 years ago #

    Not exactly. I do not want the plugin itself to update, but the plugin to update on of the files (datafile) it needs to work.

    It's a small data file that gets updated once in a while, so it would check a website at regular interval (set in options) and update this file.

Topic Closed

This topic has been closed to new replies.

About this Topic