[SOLVED] Change next order number (post_id) woocommerce

Issue

I want to change the sequence of next new order number ( post_id ) in woocommerce because of some number conflicts with our accounting software who is integrated with woocommerce.

Our latest order number is 51249 and i want the next and newer to start with 70000.

Is it safe to run following sql query?:
ALTER TABLE wp_posts AUTO_INCREMENT = 70000;

Solution

Your question has the solution.

Yes, it is safe to increase AUTO_INCREMENT as long as you are sure you can never go back. The opposite (reducing) is not as easy and safe as increasing it. I would recommend you check the AUTO_INCREMENT value just in case before running the query.

In conclusion, this is the correct answer to achieve what you asked. Remember making a backup before just in case.

ALTER TABLE wp_posts AUTO_INCREMENT = 70000;

Answered By – Eduhud

Answer Checked By – Pedro (BugsFixing Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *