Title: database management
Last modified: February 14, 2020

---

# database management

 *  Resolved [jocelynll](https://wordpress.org/support/users/jocelynll/)
 * (@jocelynll)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/database-management-3/)
 * Hi
    We have quite a few products that are replaced regularly by updated versions.
   I wondered if there is a way to run a query on products that have upsells on 
   them, so I can change the upsells to the most recent product. Otherwise I have
   to go into each product individually and see if there is an upsell – which is
   a tall order! How do I query the products? Thanks 🙂
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fdatabase-management-3%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [seank123](https://wordpress.org/support/users/seank123/)
 * (@seank123)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/database-management-3/#post-12446542)
 * You could maybe export as a CSV and do a find/replace in Excel to the new product
   IDs?
 *  Thread Starter [jocelynll](https://wordpress.org/support/users/jocelynll/)
 * (@jocelynll)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/database-management-3/#post-12454338)
 * Yeah I thought that, just wondering if there wasn’t a cleaner way. Thanks for
   replying. 🙂
 *  [Phillip C. a11n](https://wordpress.org/support/users/phillipwoo/)
 * (@phillipwoo)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/database-management-3/#post-12461806)
 * Hello [@jocelynll](https://wordpress.org/support/users/jocelynll/),
 * A CSV is definitely a good way to update this information. You may also be able
   to do this via the WooCommerce REST API: [https://woocommerce.github.io/woocommerce-rest-api-docs/#update-a-product](https://woocommerce.github.io/woocommerce-rest-api-docs/#update-a-product)
 * I hope this helps!
 *  [Phillip C. a11n](https://wordpress.org/support/users/phillipwoo/)
 * (@phillipwoo)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/database-management-3/#post-12487878)
 * Hi,
 * We haven’t heard from you on this. I am going to mark this issue as <b>Resolved
   </b> at this time. If you have more on this or anything else, feel free to open
   a new forum post.
 * Take care!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘database management’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [Database queries.](https://wordpress.org/support/topic-tag/database-queries/)
 * [reports](https://wordpress.org/support/topic-tag/reports/)
 * [upsells](https://wordpress.org/support/topic-tag/upsells/)

 * 4 replies
 * 3 participants
 * Last reply from: [Phillip C. a11n](https://wordpress.org/support/users/phillipwoo/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/database-management-3/#post-12487878)
 * Status: resolved