WordPress/wordpress-playground

Support SQL dump import (to enable complex setups, e.g. for WooCommerce)

adamziel opened this issue · 2 comments

There's no easy way to set up Playground for a complex plugin like WooCommerce:

  • WXR doesn't support custom tables
  • Preparing an entire custom SQLite file is tedious and may not be portable between WordPress versions

The ability to import entire SQL files was requested by multiple developers. Let's support it, or something equally expressive and convenient.

This shouldn't be too hard with the SQLite integration plugin:

  1. Read SQL dump
  2. Consume a single query, remember the offset where the parser finished
  3. Translate to SQLite and run
  4. Go back to step 2 until there are no more queries

cc @aristath

Shipped in #745