julie-ng / wordpress-on-azure

Reference Cloud Native Architecture for Wordpress on Azure App Service
MIT License
25 stars 23 forks source link

Plugins lost after rebooting server #2

Open ollyando opened 3 years ago

ollyando commented 3 years ago

Hi, I found when I restart the app service / database, the system looses my plugins. I still see uploaded files to the azure storage, but the themes and plugins seem to vanish.

julie-ng commented 3 years ago

Hi @ollyando,

yes they would be lost because plugins are in the wp-content folder. This reference architecture focuses on static content like uploads, which would be handled on the application code side to push those files directly to the cloud.

For your scenario about plugins, if you need to persist the wp-content/plugins folder, then you have a stateful application, In these scenarios you could mount storage to that path. If you're deploying a container to app service, you can try this https://docs.microsoft.com/azure/app-service/configure-connect-to-azure-storage?tabs=portal&pivots=container-linux

Keep in mind that's all still less than ideal because your app is stateful and thus not cloud native. In a cloud native solution you would bundle your plugins into the Docker image.

Does that help you understand the problem?