Can I use WordPress on Heroku?

Resolution

Like any other application, WordPress can be made to work on Heroku but there are some considerations to take into account before deploying a WordPress site.

Like many modern hosting solutions based on containers (such as Docker), the Heroku filesystem is ephemeral - that means that any changes to the filesystem whilst the dyno is running only last until that dyno is shut down or restarted. Each dyno boots with a clean copy of the filesystem from the most recent deploy.

This ephemeral filesystem means that any framework like WordPress needs to be used with care as files shouldn't be used for permanent storage. To make WordPress work on Heroku, any uploads will need to be stored on an external service such as Amazon S3. Also, any other plugins that try to use the filesystem (such as W3TotalCache) may behave strangely as the filesystem changes are not shared between running dynos.

To run WordPress on Heroku successfully, we recommend exercising caution in the choice of plugins and storage of uploaded files. There are some more useful starting points here: