# Batch unhide posts

**URL:** <https://meta.discourse.org/t/batch-unhide-posts/27716>\
**Category:** Support\
**Created:** [April 17, 2015, 10:02pm UTC](https://meta.discourse.org/t/batch-unhide-posts/27716 "2015-04-17T22:02:46Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)\
**Post date:** [April 17, 2015, 11:29pm UTC](https://meta.discourse.org/t/batch-unhide-posts/27716/9 "2015-04-17T23:29:19Z")

</div>

Okay then, put this in a psql console:

```plaintext
discourse=# UPDATE posts
SET hidden = false, hidden_reason_id = NULL, hidden_at = NULL
WHERE user_id = (SELECT id FROM users WHERE username_lower = 'fhtzoob')
;

UPDATE 5000
discourse=# \q

```

Or, from a Rails console: (`./launcher enter app` then `rails c`)

```ruby
ActiveRecord::Base.exec_sql("UPDATE posts
SET hidden = false, hidden_reason_id = NULL, hidden_at = NULL
WHERE user_id = ?", User.find_by_username("fthzoob").id)

```

---

_[View the full topic](https://meta.discourse.org/t/batch-unhide-posts/27716)._
