How to handle "planned maintenance" for a Softr-hosted app. Any ideas?

I have an interesting situation I am trying to solution for and wondering if anyone has any suggestions. We are planning to make some big changes to improve the way our data are structured in Airtable. We have done all the “prep work” to setup the new structure but we need to relink tables in Airtable so that information comes from a different source. Long story, short it will probably take a few hours to make this switch and double check everything. During that time, it’s going to break a bunch of lookup fields that are used in our Softr front end, so I was trying to figure out an (easy) way I could take my softr app down for a few hours while doing this and replace it with a “Planned maintainance” page or something similar and then put it back up again after we are done.

So far, my thought was, maybe I could make the 404 page a maintanance page and “unpublish” (i.e., mark not visible) all the other pages in the app, but I have over 150 pages in my app so this does not fall into the “easy” category. I might be able to get away with only doing this for a limited number of pages that will be most affected but still feels like an annoying solution.

Has anyone else done something like this before or have any other ideas for how to do this?

Hi Derek,

Just create a maintenance page with whatever you want inside. No header, no footer. Give this url path to the newly created page: /maintenance

Insert this simple script in the header custom code at app level:

<script>
    window.onload = function() {
        if (window.location.pathname !== '/maintenance') {
            window.location.replace('/maintenance');
        }
    };
</script>

That should do the trick

2 Likes