I have a WordPress installation and some plugins installed and activated. But I have lost the original plugins .zip
files. I would like to install some of the plugins into a new WordPress.
I do not want to migrate/move/backup-restore the whole current WP installation. I just want to re-create the original plugin .zip
files for some of the plugins that are installed. I do have access to the whole file tree as well as the database. Is there any method for doing that?
Yes, first add a download link to the plugin action links:
Then style and attach JS actions:
Capture the custom
$_POST
ed data and process the plugin directory to zip:And finally, using a zipping function found here on the Stack
Funnily enough, it’s actually trivial to create a zip file from an existing plugin.
Simply create a zip file containing the plugin folder. The unix commands to do that are:
You can then download the resulting my-plugin.zip file which can then be used in WordPress plugin install via upload on new sites (ie: WP Admin -> Plugins -> Add New -> Upload).
Obviously the zip file won’t contain any database tables/mods, but most plugins test for this on install and perform any needed database upgrades at install time. Unfortunately there’s no way to know whether this will be a problem without testing or checking the plugin source code, or both.
The easiest, code-less way is with another plugin, such as WordPress Downloader.