# Apply auto-close to existing topics

**URL:** https://meta.discourse.org/t/apply-auto-close-to-existing-topics/70450
**Category:** Self-Hosting
**Tags:** how-to
**Created:** [September 20, 2017, 2:44pm UTC](https://meta.discourse.org/t/apply-auto-close-to-existing-topics/70450 "2017-09-20T14:44:41Z")
**Posts on this page:** 1
**Page:** 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: [September 20, 2017, 2:44pm UTC](https://meta.discourse.org/t/apply-auto-close-to-existing-topics/70450/1 "2017-09-20T14:44:41Z")

</div>

> 🔖 This documentation provides instructions on how to apply the auto-close feature to existing topics using a specific script.

When you configure categories in Discourse to auto-close topics, this setting applies only to new topics. However, you can apply this setting to existing topics as well through a simple script. Topics closed using this script are closed silently to avoid unnecessary notifications.

## Accessing your site

To begin, connect to your server via SSH and enter the Docker container for your Discourse instance by executing the following commands:

```bash
cd /var/discourse
./launcher enter app

```

## Applying the auto-close settings

Once inside the container, run the following command to apply the auto-close settings to existing topics:

```plaintext
rake topics:apply_autoclose

```

> Last edited by @tshenry 2025-01-22T04:37:11Z
> 
> > **Check document**
> >
> > Perform check on document:
