Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4252052
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T04:44:37+00:00 2026-05-21T04:44:37+00:00

My client wants me to make a plugin and sell it through a membership

  • 0

My client wants me to make a plugin and sell it through a membership subscription system. They asked how they can roll out updates for this plugin. Typically I have had the plugin intercept the dashboard viewing after a login into wp-admin. It then checks if a newer version of the plugin is on the server. If so, it notifies the user so that they can download it again with a click. The problem is that they must unzip the files, copy them over, and resave the plugin settings.

Is there a way to code a one-click update for the plugin when it’s due for an update? That way, it eliminates the other steps where they download the plugin, unzip, copy over the old files, and rerun an admin panel save for the plugin.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T04:44:38+00:00Added an answer on May 21, 2026 at 4:44 am

    There are a few steps that you’d probably want to take, most of which can be easily borrowed from how wordpress handles it’s own internal updates.

    Don’t run it every time the admin page is loaded, write your own version of _maybe_update_plugins() and have it check on a timed interval, probably only once per day or so.

    the WordPress WP_Upgrader class in ‘wp-admin/includes/class-wp-upgrader.php’ (I believe you will need to include that in your plugin) do what you want. Take a look at wp-admin/update.php and make sure that you emulate the security precautions here very closely as you could introduce huge security holes if not done carefully.

    Once you’ve sorted out your notifications and made sure that the process is secure, it’s as easy as passing the url for the new version of your plugin to the code below as “$download_link”.

    $upgrader = new WP_Upgrader;
    $upgrader->run(array(
      'package' => '', //this should be the name of your plugin
      'destination' => '', //this should be defined to the directory you want to install the plugin to
      'clear_destination' => false, //set this if you want to remove the old version first
      'clear_working' => true, //change this if you want to leave a copy of the zip file
      'is_multi' => false, //only change this if you're calling the function multiple times
    ));
    

    If that doesn’t do the trick (I’ve not the time or motivation to test it), dig around a bit more in the WP_Upgrader class and borrow their functions for downloading and extracting files.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My client wants me to make a plugin that intercepts the banner on a
Basically, my client wants to make new visitors enter the site I'm working on
my client wants to play a flash video in their website. just to make
I'm a relatively inexperienced programmer looking to make a plugin for the IM client
I want to make a P2P Chat client, all I want it to do
I want to start to make a chat client that runs in web browsers,
I am going to make a client-server application using Node.js, and I want to
Client wants to edit DotNetNuke skin and he is not a programmer, so I'm
A client wants me to do some maintenance work to a VB 6.0 application
My client wants to send email announcements and reports for customers. Now. The python-side

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.