Hi blackemper0r,
Thank you for reaching out with your question.
Currently, LearnPress does not have a one-click button in the admin interface to perform this action. However, you can achieve this easily by running a simple SQL query directly on your database.
Please note: Before you proceed, it is highly recommended that you back up your database. This will ensure you can restore your data if anything goes wrong.
You can use the following SQL command in your phpMyAdmin or another database management tool:
DELETE FROM wp_learnpress_user_items
WHERE item_id = 'ENTER_COURSE_ID_HERE'
AND item_type = 'lp_course';
Instructions:
- Log in to your phpMyAdmin.
- Select your website’s database.
- Go to the “SQL” tab.
- Replace
'ENTER_COURSE_ID_HERE' with the actual ID of the course you want to reset.
- Run the query.
This command will delete all entries related to that course from the wp_learnpress_user_items table, effectively unenrolling all users from it.
Best regards,
Brianvu-tp
Hey,
I have done theses steps but it still showa that i have students.
Does it have something with orders
Re. i figured it out you just have to clear cache after sql update
Hi blackemper0r,
Thank you for the update!
We are very glad to hear that solved the problem.
This is a great tip for other users who might encounter the same issue, and we appreciate you sharing your findings with the community.
If you are satisfied with LearnPress, we would greatly appreciate it if you could leave us a 5-star review. A nice rating is a big motivation for us to keep up the hard work, and it’s really important to us.
Thank you very much for your feedback.
Best regards,
Brianvu-tp