CaptainCore Update #23 โ€“ SSH Environment Vars ๐Ÿ—’๏ธ

Ever have intentions of working on a new feature and then end up creating something completely different? Well that’s describes last month. I suppose that’s what it’s all about. โš—๏ธ๐Ÿงช

For a weekend project I explored creating a hybrid mode of WordPress. Something between a standalone site and a multisite network. I’m calling it stackable WordPress and wrote about it here. To allow CaptainCore to work with stackable sites I added support for shell environment variables.

Adding environment variables within CaptainCore

If you’re not familiar with what shell environment variables are, then I recommend this great guide by Digital Ocean. These environment variables are arbitrary key and value pairs which are automatically set on each SSH request.

Shell environment variables opens up new WordPress management possibilities.

In PHP you can read environment variables using getenv. This could be used for a wide range of configurations. Might be a good place to store unique per site info. Or maybe a way to use one time application secrets or password credentials which would prevent them from being stored within WordPress. I’m not really sure :). But the fact that SSH requests can now carry unique information within the SSH request itself is pretty awesome.

Until next month, onward!