GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com β€” GitHub - harunsekmen/woo-deadlock-vacuum: Safe, non-blocking WooCommerce database cleanup tool. Purges expired transients and orphaned store data in small background batches.

BranchesTags
Open more actions menu

Latest commit

 

History

5 Commits
5 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
assets
assets
 
 
docs/assets
docs/assets
 
 
includes
includes
 
 
templates
templates
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
README.tr.md
README.tr.md
 
 
composer.json
composer.json
 
 
woo-deadlock-vacuum.php
woo-deadlock-vacuum.php
 
 

Repository files navigation

πŸ—„οΈ WooCommerce Deadlock-Free Database Vacuum

πŸ‡¬πŸ‡§ English Β· πŸ‡ΉπŸ‡· TΓΌrkΓ§e

WooCommerce HPOS Ready License: GPL-3.0 PHP: 8.1+

A safe, non-blocking background cleanup tool that purges expired transients and orphaned store data in small batches without locking database tables or interrupting active shoppers.

Developed and maintained by Harun Sekmen β€” E-Commerce Systems Engineer & WooCommerce Developer.

βœ‰οΈ Discuss Database Optimization Β· πŸ’Ό Upwork Profile Β· πŸ”— Main GitHub Profile


πŸ“Έ Visual Previews & Operational Interface

WordPress Admin Vacuum & Maintenance Dashboard

Store administrators can view the count of safely cleaned rows, monitor pending expired transients, adjust batch chunk sizes, or trigger on-demand maintenance:

WooCommerce DB Vacuum Dashboard


⚑ The Problem It Solves

As a WooCommerce store grows and handles thousands of orders or frequent inventory updates, it accumulates massive amounts of temporary data:

  • Expired Transients: Stale session fragments, cached calculations, and expired API tokens cluttering the wp_options table.
  • Orphaned Item Records: Lingering data rows left behind in order item and metadata tables after past order modifications.
  • The Table Lock Trap: When store owners run standard database cleanup plugins on a busy store, those tools often execute a single massive deletion query (e.g., DELETE FROM wp_options WHERE...). This can lock the entire database table for several seconds. If a customer attempts to place an order at that exact moment, their checkout crashes with a database lock error.

WooCommerce Deadlock-Free Database Vacuum solves this by cleaning records in small, indexed batches (default: 500 rows at a time) managed quietly in the background via WooCommerce Action Scheduler. It introduces a brief pause between batches so active customer checkouts always maintain top database priority.


πŸ› οΈ Key Architectural Features

  • Chunked Batch Deletions: Deletes records in manageable micro-batches using indexed primary key lookups instead of locking entire tables.
  • Paced Micro-Pauses: Includes a brief pause between chunks to ensure live customer checkouts and cart updates never compete for table locks.
  • Asynchronous Background Runs: Automatically schedules periodic maintenance through Action Scheduler during off-peak hours.
  • High-Performance Order Storage (HPOS) Ready: Built with native support for WooCommerce custom order tables and modern schemas.
  • Clear Admin Visibility: See exactly how many expired records were safely cleared without needing manual phpMyAdmin intervention.

πŸ’Ό Database Optimization & Store Maintenance

Managing an established WooCommerce store with a large database or slow backend queries?

  • Database Health Audits: Identify bloated tables, missing indexes, and un-optimized query patterns.
  • HPOS Migration & Cleanups: Safe migration from legacy wp_posts tables to High-Performance Order Storage tables.
  • Scheduled Automated Maintenance: Non-blocking background routines to keep transient and session bloat under control.
  • Performance Tuning: MySQL/MariaDB query optimization and object cache configuration (Redis/Memcached).

πŸ“© Get in touch: Contact me at [email protected] or connect on Upwork.


πŸš€ Developer Setup & Local Testing

  1. Clone into plugins directory:

    git clone https://github.com/harunsekmen/woo-deadlock-vacuum.git wp-content/plugins/woo-deadlock-vacuum
  2. Activate via WP-CLI:

    wp plugin activate woo-deadlock-vacuum
  3. Review maintenance status: Open WooCommerce > DB Vacuum in WordPress Admin to review pending transients and trigger a test cleanup.


πŸ“„ License

This open-source project is licensed under the GNU General Public License v3.0.

About

Safe, non-blocking WooCommerce database cleanup tool. Purges expired transients and orphaned store data in small background batches.

github.com/harunsekmen/woo-deadlock-vacuum

Topics

action-schedulerdatabase-cleanupdatabase-optimizationdeadlock-preventionhpos-readymysqlperformancetransientswoocommercewordpress

Resources

Readme
License
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 β€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Γ—600. No cookies required.