Reputation: 416
I have a working wordpress deployed on azure as a web app. After I make certain changes to web.config or face some performance issue I restart the web app. But the file system reverts to some old version!! So all the media + plugins etc. are immediately gone!
When I check the actual file system in Kudu, they really are gone. But not everything, it goes back to a specific point in time that I have no control over. Is there a way to persist file system that I'm missing?
I get a list of extensions, telling me the plugin files do not exist so they are deleted from everywhere!
Strange thing is as soon as I reinstall the plugins they come back with custom data I entered from before.
I'm incredibly confused and I appreciate any help,
Thanks,
Upvotes: 1
Views: 1680
Reputation: 1
This helped me to set the cache options because I did not find them in the portal. I have limited coding expertise, so I use the portal lol.
Go to configuration and add this application setting:
WEBSITE_LOCAL_CACHE_OPTION : Never
I hope this helps.
Upvotes: 0
Reputation: 942
Full original thread here: https://social.msdn.microsoft.com/Forums/azure/en-US/dc7a83b4-e73c-48ac-8361-9f6b0ea4e7d7/wordpress-web-app-restart-deletes-wordpress-files?forum=windowsazurewebsitespreview
Did not solve my problem. I found out, that for some reason, the app was restarted:
"Around 8/2/2018 8:16:05 AM (UTC), On Instance xxx, Your application was recycled due to an intermittent Azure infrastructure issue while accessing remote file storage. This can happen due to multiple reasons like platform instances getting upgraded or instance(s) experiencing high latencies accessing the remote storage. In case the instance(s) where your application is running is experiencing high latencies accessing remote storage, platform tries to heal your application by switching to different remote storage which is having low latency. This can also cause the application process to restart. If this is a one off occurrence, then no further action plan is needed from your side. But if you see it occur frequently, then enabling local cache feature can help reduce dependency on storage file servers to some extent."
Because the application was configured (see application settings) with LOCAL_CACHE_OPTION always
the current snapshot (that was altered with updated versions of WP core and plugins) was deleted, and replaced with another cached version of the original files (a.k.a. "recycled"). More on that here: https://learn.microsoft.com/en-us/azure/app-service/app-service-local-cache-overview#enable-local-cache-in-app-service
Solved it by removing the LOCAL_CACHE_OPTION rule.
Note: the rule might also be part of your deployment configuration.
Upvotes: 1
Reputation: 3050
But not everything, it goes back to a specific point in time that I have no control over. Is there a way to persist file system that I'm missing?
Its possible that Azure has set some kind of a system restore point, and its going back to it. If you wish to persist your file system, then why not use the recovery systems to back up your server files. link here -
https://learn.microsoft.com/en-us/azure/app-service-web/web-sites-backup
Strange thing is as soon as I reinstall the plugins they come back with custom data I entered from before
This makes sense because your data is coming from a database. When you are restarting the app, it only affects the Wordpress files. These plugins are storing their custom data in the db, which have nothing to do with the site reset. So, they come back.
Upvotes: 0