Ever think about hosting WordPress sites on Heroku? Think again. It’s not as easy as deploying Rails applications. In fact, it’s a headache. Besides the limits you find in the official document, I am showing you some of my thoughts on Heroku WordPress hosting. Heroku’s Ephemeral Filesystem
Each dyno(Heroku’s term on its servers) gets its own ephemeral file system. When you uploaded an image, the image is stored on one of the dyno only. The images will be erased after dyno restart. Worse still, Dynos crash if you try to write to its file systems.
Here comes the solution: Offload media files to Amazon S3. Delicious Brains have written an excellent plugin for hooking S3 into WordPress’ media library seamlessly.
Besides, you need to stop editing the source code from WP admin. Add these two lines intowp-config.php
Also, auto WordPress core / theme / plugin updates should be disabled. This handy plugin does the job. Managing the updates by Git or Dropbox is necessary.
Moreover, the ephemeral filesystem might break your caching and minifying plugins. You have to Batcache with the Memcachier add-on, or plugins that write to an external server.
Heroku doesn’t
Source: https://managewp.org/articles/14079/hosting-wordpress-on-heroku-think-again-typist-tech
source https://williechiu40.wordpress.com/2016/12/26/hosting-wordpress-on-heroku-think-again-typist-tech/
No comments:
Post a Comment