[wp-trac] [WordPress Trac] #31138: Backup of a plugin / theme directory.

WordPress Trac noreply at wordpress.org
Wed Jan 28 10:20:44 UTC 2015


#31138: Backup of a plugin / theme directory.
-----------------------------+------------------------------
 Reporter:  aercolino        |       Owner:
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Upgrade/Install  |     Version:  4.1
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |     Focuses:
-----------------------------+------------------------------

Comment (by aercolino):

 The problem of recovering user's files stored in a plugin or theme
 directory has one solution and some workarounds.

 '''Solution'''
 Make `WP_Upgrader` create a '''temporary backup''' before deleting (this
 is what my patch does).
 I think this is the best way to do it. And I mean the best for everyone:
 The WordPress application, brand, community, plugin and theme developers
 and lastly end users. Users just click the ''update now'' link the way
 they are used to and it all magically works as it currently does.

 '''Workaround 1'''
 Tell the end user that '''before updating''' they have to backup their
 files themselves.
 This could be done with an upgrade notice. It's not guaranteed to work.
 Not all users read carefully all notices.
 * How can I test an upgrade notice for my yet to be released new plugin
 version?

 '''Workaround 2'''
 Make the ''update now'' link '''unavailable''' altogether.
 * How can I make this check fail?
 https://github.com/WordPress/WordPress/blob/master/wp-
 admin/includes/update.php#L283

 '''Workaround 3'''
 Put the new version in a '''different directory'''. This is possible but
 would make the update pointless. It would be a completely new plugin. It's
 really a bad workaround, IMO. Unless there is a way to preserve the
 identity of the plugin, but I doubt it.

 ---
 Please tell me how to solve this.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31138#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list