# Read Only Modes in Discourse

**URL:** https://meta.discourse.org/t/read-only-modes-in-discourse/296976
**Category:** Site Management
**Tags:** how-to, explanation, read-only
**Created:** [February 27, 2024, 10:13pm UTC](https://meta.discourse.org/t/read-only-modes-in-discourse/296976 "2024-02-27T22:13:14Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![Discourse](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/discourse/32/148734_2.png) [@Discourse](https://meta.discourse.org/u/Discourse)
#### Post date: [February 27, 2024, 10:13pm UTC](https://meta.discourse.org/t/read-only-modes-in-discourse/296976/1 "2024-02-27T22:13:14Z")

</div>

> 🔖 This guide explains the various read-only modes available in Discourse, how to enable and disable them, and the scenarios in which you might want to use each mode.
> 
> 🙋 Required user level: Administrator

Managing a vibrant online community on Discourse occasionally requires administrators to temporarily limit user activities. These situations can range from performing server maintenance, facilitating backups, or transitioning servers. During such times, it’s crucial to restrict forum activities without entirely shutting down user access.

Discourse offers various **Read-Only Modes** administrators can enable to temporarily freeze different types of interactions within a site.

This guide explores these modes, specifically focusing on how to enable and disable them, including handling situations where certain modes intersect.

## Understanding Read-Only Modes

Discourse supports two different levels of Read-Only modes tailored to fit various administrative needs. These are:

1. **Full Read Only-Mode**

- Restricts all write operations in the forum, preventing any users from creating or modifying content, such as posting, commenting, or liking.
- Allows the forum to essentially be “frozen” in its current state, making it so that users can still read and navigate through existing content without impacting the database.
- Disable changing any Admin site settings or site customizations so that the current state of the database is preserved.
- Disables new forum logins for regular users. Admins can still log in using the admin email login flow (`/u/admin-login`).
- API calls can read (GET), but cannot write (POST/PUT/DELETE)
- Queued outgoing webhooks will be delivered, but no new webhooks will be triggered since the actions triggering them will be blocked.
- Incoming webhooks (email bounce) will be blocked with a 503 response. Email providers will retry per their own backoff schedules.

1. **Staff Writes Only-Mode**

- Restricts _standard users_ from write operations in the forum, such as posting, commenting, or liking. Non-staff users are limited to read-only operations, but can still log in to their accounts.
- Allows Admin and Moderator activities to continue normally. Admins can change site settings, and staff users can perform write operations like posting, liking, or modifying profiles.
- API calls can read (GET). Only staff API keys can write (POST/PUT/DELETE).
- Queued outgoing webhooks will be delivered. Staff actions can trigger new outgoing webhooks which will also be successful, but no non-staff user actions will trigger webhooks.
- Incoming webhooks (email bounce) will be blocked with a 503 response. Email providers will retry per their own backoff schedules.

These modes ensure flexibility in managing the forum’s operability during critical administrative periods.

## How to Enable/Disable Read-Only Modes

> ⚠ Admins should carefully manage the transition between different read-only modes. Before enabling any read-only mode, ensure that any previously activated one is disabled.

### Full Read-Only Mode

#### Via Rails Console

If you have access to your Discourse installation, use the Discourse rails command line interface to execute the following command after entering your Docker container with `./launcher enter app` and then the rails console with `rails c`:

```plaintext
Discourse.enable_readonly_mode(Discourse::USER_READONLY_MODE_KEY)

```

#### Via Admin Panel

If you have administrative access through the web interface, you can navigate to `Admin` \> `Backups` \> `Enable Read-Only Mode` to enable read-only mode.

 ![image](https://global.discourse-cdn.com/meta/original/4X/8/a/6/8a6f043d5af7859632dd3b280ae9137f187af2ac.png)

To disable Read-Only Mode, execute the following rails command:

```plaintext
Discourse.disable_readonly_mode(Discourse::USER_READONLY_MODE_KEY)

```

Or, use the admin panel by navigating to `Admin` \> `Backups` \> `Disable Read-Only Mode`.

 ![image](https://global.discourse-cdn.com/meta/original/4X/a/3/0/a30dd57bef661b0deb1f45b3d24984334ad640f4.png)

### Staff Writes Only Mode

> :discourse: Staff Writes Only mode can only be enabled / disabled from the Discourse rails console. If your site is hosted by Discourse, please reach out to [team@discourse.org](mailto:team@discourse.org) if you would like to enable or disable either of this mode.

To enable Staff Writes Only Mode, use the following rails console command:

```plaintext
Discourse.enable_readonly_mode(Discourse::STAFF_WRITES_ONLY_MODE_KEY)

```

To disable:

```plaintext
Discourse.disable_readonly_mode(Discourse::STAFF_WRITES_ONLY_MODE_KEY)

```

## Best Practices

- **Timely Communication** : Inform your community about scheduled read-only periods in advance to set proper expectations.
- **Testing** : Before implementing these modes during critical operations, conduct tests during low-traffic periods to understand their impact.
- **Documentation** : Keep detailed records of when and why each mode was enabled or disabled to assist in future operational planning.

## FAQs

- **How long does it take to enable/disable Read-Only Mode?**

- **Help! I’m locked out of my site because of read only mode - what can I do to access my site again?**

- **I noticed that there are other `READ-ONLY` modes listed in [discourse/lib/discourse.rb](https://github.com/discourse/discourse/blob/main/lib/discourse.rb#L746-L754), what do these modes do?**

> Last edited by @southpaw 2026-05-01T21:35:11Z
> 
> > **Check document**
> >
> > Perform check on document:

---

_[View the full topic](https://meta.discourse.org/t/read-only-modes-in-discourse/296976)._
