Publii
Publii copied to clipboard
Suggestion: Allow bulk site secret export
TL;DR: Add a global feature to export all site secrets to a file, and import from a file, to make reinstalling less painful.
I understand why we don't want the server secrets to be synched with the Sites folder, this is clear. However, there is a common use case for me where I believe there is room for improvement.
Currently, I have the following workflow when moving to a new PC or reinstalling Windows (which is something I do regularly):
- Manually go through each site in Publii and copy/paste the id/secret into a text document
- Reinstall OS/etc
- Install Publii on new OS - it automatically picks up the sites in the default location: Documents\Publii (synched with OneDrive)
- Manually go through each site in Publii and copy/paste the id/secret from my text document
This was not so much of an issue when I only had a couple of sites, but I now manage a lot of different sites, each with their own credentials (mostly Netlify), and it gets tedious to do this each time. I can save some time if I can remote into a PC where Publii is configured, and copy/paste directly between instances, but that is still a long manual process.
I would love to see a button in the global settings somewhere that allowed me to export all of my secrets to a file (possibly into an encrypted zip or something) that I could then import into another instance of Publii, and it would set the id/secret for any matching sites. This would allow the above process to be much more streamlined.
Hi, I will consider such feature - file encrypted with AES and with password should be enough for such operations.
Both of the machines I have Publii on were rebuilt within days of each other, and I managed to end up in a position where I didn't have active credentials inside Publii to copy/paste any more. Cue having to regenerate all my Netlify access keys. Due to this, I spent some time putting a script together - which backs up my Netlify credentials from Credential Manager and puts them in a JSON file.
It is unencrypted at this time, to make it easy and portable, but it solves the immediate need for this function. Posting here in case anyone else is actually wanting a workaround to this feature. Currently hard-coded for Netlify credentials (as that's all I use in Publii at the moment) but it could be modified to support more reasonably easily.
https://gist.github.com/JyeGuru/e8fa1f2d91e48d04c8e1260531dc041f