Title: Trigger reindex programatically
Last modified: December 23, 2021

---

# Trigger reindex programatically

 *  Resolved [kornelappstract](https://wordpress.org/support/users/kornelappstract/)
 * (@kornelappstract)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/trigger-reindex-programatically/)
 * Hello. I would like to reindex my products programmatically after I’d changed
   their status. Is there a way for doing it in current version of ElasticPress?

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Felipe Elia](https://wordpress.org/support/users/felipeelia/)
 * (@felipeelia)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/trigger-reindex-programatically/#post-15253814)
 * Hi,
 * It should happen automatically if done using the WooCommerce and WordPress functions.
   If that is not the case, you can use something like this:
 * `\ElasticPress\Indexables::factory()->get( 'post' )->index( $post_id, true );`
 * As [we don’t provide support here](https://wordpress.org/support/topic/read-before-posting-12/),
   please ask any further questions in our [GitHub Repository](https://github.com/10up/ElasticPress).
   Thanks

Viewing 1 replies (of 1 total)

The topic ‘Trigger reindex programatically’ is closed to new replies.

 * ![](https://ps.w.org/elasticpress/assets/icon-256x256.jpg?rev=2458479)
 * [ElasticPress](https://wordpress.org/plugins/elasticpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/elasticpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/elasticpress/)
 * [Active Topics](https://wordpress.org/support/plugin/elasticpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/elasticpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/elasticpress/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Felipe Elia](https://wordpress.org/support/users/felipeelia/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/trigger-reindex-programatically/#post-15253814)
 * Status: resolved