If you can ssh into the site host, try this :
./launcher enter app rails c Discourse.disable_readonly_mode