I have deployed a wordpress application on heroku. Now I have installed some plugins on the server. That have added some files in the wordpress folder. Now I want those files to be back ported in my git repository. Reason behind this is that I want to keep my dev environment as same state as production code for development. How can i do this? Because if i do git push heroku master without doing this, all my plugins and new files would be lost other wise. Any help would be appreciated.
2 Answers 2
This is something you can't do with Heroku. Files written to the file system will only persist for the life of the individual dyno they were written to. If you scale up dyno's these new dyno's wouldn't contain your previously written files - rather the code as you original deployed via git push heroku.... Also, restarting a dyno/application will use the original code so changes would be again lost.
Indeed, you may find the files have already be lost because Heroku will restart dyno's every 24 hours.
1 Comment
John's answer has it right, you can't depend on filesystem changes on Heroku.
I wanted to add that there are several custom buildpacks that make possible running Wordpress on Heroku in a semi-workable fashion. Examples: