aws-samples / eb-php-wordpress

Configuration files and instructions for installing WordPress securely and running it in a load balanced AWS Elastic Beanstalk environment with an EFS file system for shared assets.
Apache License 2.0
165 stars 95 forks source link

Best way to install plugins persistently? #23

Open rcoppy opened 5 years ago

rcoppy commented 5 years ago

Hello!

I'm a bit of a noob with both AWS and WordPress; I've been wrangling with the setup (routing to a custom domain, through HTTPS, etc.) for the last four days and finally have Vanilla WordPress setup and running as laid out in this guide--

BUT, I've noticed that whenever I install plugins through the admin panel they're wiped every time my EC2 instance reboots.

I'm assuming this is because the plugin source isn't bundled in with the deployment code and is only stored locally, so with every reboot it's gone forever and takes a reinstall. It appears though that plugin preferences are stored persistently in my RDS database, so even if I lose the plugins, as long as I reinstall them I don't lose their configurations.

I'm assuming in order to make my plugins persistent, I need to stick them in the root folder that I deploy the whole site with; but that feels like it could make updating the plugins tricky. (Or at least, a lot trickier than managing them through the admin panel--right now getting them into root means navigating everything through the command line.)

I guess I'm being lazy, but I'm just curious--is there a way to get close to the ease of functionality the admin panel offers both in terms of installing and updating plugins, while maintaining the persistence of bundling plugins in directly with your deployment?

Thank you!!

pajtai commented 5 years ago

@rcoppy The plugins files are part of the deploy zip, so the way to update them is to update them in your local source code and then create a new deploy.

In terms of a convenient workflow, the way to do this would be to:

  1. setup a local dev envinronment
  2. startup the app locally and login as admin
  3. click the update buttons locally
  4. deploy the newly changed files to elastic beanstalk uzing eb deploy or zip them up and upload them

    setup a local dev environment