Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Lee Adamson
Lee Adamson
9,347 Points

Heroku Wordpress crashes after a few hours or so

I have a node app and the content is controlled by a separate Wordpress CMS, the CMS uses the rest-api plugin to output page content as JSON to then be consumed by my app.

However when i publish the CMS app (Wordpress hosted on Heroku) everything works fine for a few hours then suddenly all my page endpoints (ie example.com/homepage) will result in an error page and to get it to work again i need to reset the permalinks settings within Wordpress (ie. flick between plain and post name).

I have manually updated my .htaccess file as I know Heroku cannot write the file, I have also added a deployhook to flush rules on deployment. but the error still persists.

Is there a fix for this or should i re-write my request.get calls to request a non pretty link e.g example.com/?id=88 instead of example.com/homepage