મુખ્ય સામગ્રીને બાયપાસ કરો

Bundling WordPress for the browser

The web bundler Dockerfile turns a vanilla WordPress into a browser-optimized one:

  • Makes WordPress run on SQLite using the official drop-in plugin as MySQL is unsupported in the browser.
  • Reduces the WordPress website size from about 70MB to about 10MB, or 5MB compressed.
  • Runs the WordPress installation wizard.
  • Bundles WordPress into a minified ZIP that the build process converts into a .tar.zst archive via build-tar-zst.mjs (for versioned builds, the intermediate ZIP file is deleted after conversion).

Build a new bundle with nx bundle-wordpress playground-wordpress-builds --wp-version=<version>, e.g.:

nx bundle-wordpress playground-wordpress-builds --wp-version=6.1

For a versioned build, the ZIP is an intermediate file that the build deletes after conversion. The bundler outputs:

  • packages/playground/wordpress-builds/src/wordpress/wp-<version>.tar.zst – minified .tar.zst WordPress archive
  • packages/playground/wordpress-builds/public/wp-<version>/ – a directory with static assets for the specified WordPress version

Consult the web bundler Dockerfile to customize the default WordPress installation, and see wp-versions.json for the list of bundled WordPress versions.