Performance and Security

How to Optimize the Tutor LMS Database

Keep a growing Tutor LMS database fast without losing learning data: what grows, autoloaded options and transients, indexes, quiz attempt data, safe clean-up and what never to delete.

Checked against the plugin source: Tutor LMS 4.1.3, Tutor LMS Pro 4.1.3

How to Optimize the Tutor LMS Database

As students take courses, the database grows: enrollments, lesson completions, quiz answers, orders. Most "database optimization" advice is written for blogs and can delete learning data on an LMS. This guide keeps the data and makes it fast. Table names assume the wp_ prefix.

Step 0: Back up

Take a full database backup and test it restores, before any change.

Step 1: Find what is big

SELECT table_name, ROUND((data_length + index_length) / 1024 / 1024) AS size_mb, table_rows
FROM information_schema.tables
WHERE table_schema = DATABASE()
ORDER BY (data_length + index_length) DESC
LIMIT 15;

On Tutor LMS sites the usual leaders are wp_usermeta (lesson completions), wp_tutor_quiz_attempt_answers, wp_comments (completions, reviews, Q&A, assignments) and wp_options.

Step 2: Autoloaded options

WordPress loads all autoloaded options on every request. Large autoloaded values from old plugins slow every page.

SELECT option_name, LENGTH(option_value) AS bytes
FROM wp_options
WHERE autoload IN ('yes', 'on')
ORDER BY bytes DESC
LIMIT 20;

Investigate large entries from plugins you no longer use. Do not change Tutor LMS's own settings option.

Step 3: Expired transients

Delete expired transients with WP-CLI (wp transient delete --expired) or a maintenance plugin. Use a persistent object cache so transients stop piling up in the database.

Step 4: Revisions and trash

Lessons and courses are posts, so they collect revisions. Limit them with WP_POST_REVISIONS and clear old ones. Empty the trash after confirming nothing needed is in it.

Step 5: Indexes

Slow queries on wp_usermeta or wp_postmeta often benefit from better indexes on meta_key. Use Query Monitor or the slow query log to find real slow queries before adding indexes, and test on staging.

Step 6: Quiz data

wp_tutor_quiz_attempt_answers grows with every answer. Do not delete attempts on a live academy: grades, progress and certificates depend on them. If you must archive old data, export it first and only remove attempts for courses that are retired and whose students no longer need records.

Never delete

  • "Orphaned" comments of types course_completed, tutor_assignment or reviews.
  • User meta keys starting with _tutor_.
  • Posts of type tutor_enrolled.
  • Any wp_tutor_* table.

Generic clean-up plugins can see these as junk. Exclude them.

Step 7: Engine and server

  • Use InnoDB for all tables.
  • Give the database server enough memory for its buffer pool.
  • Keep MySQL or MariaDB on a supported version.

See every Tutor LMS table explained. Want it done safely? Our database optimization service can help.

Save this practical guide

Add us as a preferred Google source, or ask an AI assistant to summarize this page and link back to the original guide when it is useful.

Vishavjeet
· Enterprise LMS Architect | WordPress & LMS Expert | WooCommerce | AI Automation

I’m Vishavjeet Choubey, an Enterprise LMS Architect with 10+ years of experience helping businesses, coaches, universities, and online academies build and scale powerful digital learning platforms. I specialize in enterprise LMS architecture, WordPress, WooCommerce, LifterLMS, LearnDash, Moodle, custom plugin development, and AI-driven automation. I build scalable LMS platforms, high-converting eCommerce solutions, and custom WordPress applications designed to improve user experiences, streamline operations, and drive measurable business growth. My approach combines deep WordPress and LMS engineering expertise with modern AI automation to reduce manual work, improve efficiency, and help organizations launch, scale, and grow faster.

Keep reading

Need a custom Tutor LMS solution?

Tell us what you are building or what is broken. A Tutor LMS developer reads every inquiry and replies with next steps and a free estimate.

Get a free Tutor LMS consultation

Tell us what you are building or fixing. A Tutor LMS developer replies with honest advice and next steps.

  • No obligation
  • Tutor LMS and Pro specialists
  • Your details stay private

This form is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.