Linux 软件免费装
Banner图

WP to Firebase – Sync WooCommerce & WordPress to Firestore and Realtime Database

开发者 imalinawaz
更新时间 2026年11月15日 05:41
捐献地址: 去捐款
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

woocommerce sync mobile app firebase firestore

下载

2.1.0 2.1.1 2.0.0 2.0.1

详情介绍:

WP to Firebase keeps Cloud Firestore or a Firebase Realtime Database in step with your WordPress site. Use it to power a mobile app built with Flutter, FlutterFlow, or React Native, a dashboard, or any service that reads from Firebase, without writing your own export code. New in 2.1: Cloud Firestore, free. Firebase recommends Cloud Firestore for new apps, and FlutterFlow works with Firestore. Each product, order, and user becomes a document in a products, orders, or users collection. Items that have not changed since the last sync are skipped, so scheduled syncs stay inside Firestore's free daily write quota. What it syncs You choose which of these to sync. Products are on by default. Users and orders contain personal data, so they stay off until you turn them on. How it works Data structure In Cloud Firestore, each item is a document in its own collection, with an optional collection prefix: products/product_42 orders/order_1057 users/user_7 Numbers, true/false values, lists, and nested details such as billing addresses and line items are stored with their proper Firestore types, so you can query and sort them. In the Realtime Database, records are written under the path you choose (default wordpress), with keys prefixed by type: wordpress/products/product_42 wordpress/orders/order_1057 wordpress/users/user_7 Custom development Need extra fields, posts and custom post types, push notifications, a different data structure, or a mobile app built on this data? The plugin is built and maintained by Ali Nawaz, a WordPress & Shopify developer who builds custom WordPress plugins.

安装:

  1. Install and activate the plugin.
  2. In the Firebase console, create a Cloud Firestore database, or a Realtime Database and copy its URL.
  3. In the Firebase console, open Project settings → Service accounts and click Generate new private key. A JSON file downloads.
  4. In WordPress, go to Settings → WP to Firebase. Choose Cloud Firestore or Realtime Database, paste the full contents of the JSON file (and the database URL for the Realtime Database), choose what to sync, and save.
  5. Click Test connection, then Sync now.

升级注意事项:

2.1.1 Translation and right-to-left language improvements. Nothing to change. 2.1.0 Adds Cloud Firestore as a database option. Realtime Database sites keep working as before; nothing to change. 2.0.1 The plugin is now called WP to Firebase. No action needed; your settings are kept. 2.0.0 Complete rebuild with background syncing, live updates, and secure service account authentication. Add a service account key in Settings → WP to Firebase after updating.

常见问题:

Should I use Cloud Firestore or the Realtime Database?

For a new app, Cloud Firestore. Firebase recommends it for new projects, it has richer queries, and FlutterFlow works with it. Choose the Realtime Database if your app already reads from one. You can switch at any time; the next full sync writes everything to the new database.

Will syncing use up my Firestore free quota?

Firestore's free tier allows 20,000 document writes a day. The plugin skips items that have not changed since they were last written, so after the first sync, a scheduled full sync only writes what changed. Live updates write one document per change. A daily schedule is enough for most stores, with live updates on.

Can I use a named Firestore database or a prefix for the collections?

Yes. Enter the database ID under Firestore database ID (leave (default) for the default database), and an optional collection prefix such as wp_ to write to wp_products, wp_orders, and wp_users.

Is it safe to store the service account key in WordPress?

The key is stored in your WordPress database, like other plugin credentials, and is never displayed after saving. Anyone with access to your database could read it, so keep your site and database secure. You can remove the key at any time from the settings page, and you can revoke it in the Google Cloud console.

Does the plugin send passwords?

No. Passwords, password reset keys, and other credentials are never sent. User records contain only email, names, roles, and registration date.

Why did the full sync not finish straight away?

The sync runs through WP-Cron, which runs when your site receives visits. On a quiet site, or a site with WP-Cron disabled, it continues as soon as cron runs. For large stores, configure a real server cron job for WP-Cron.

Does deleting an item in WordPress remove it from Firebase?

Yes, when live updates are on. Trashing or deleting a product, order, or user removes its record from Firebase a few seconds later.

Why are keys prefixed with product_, order_, and user_?

The Realtime Database treats objects with sequential numeric keys as arrays, which makes data harder to read and update. The prefix keeps every record addressable by its key, and the same document IDs are used in Cloud Firestore. Each record also includes its WordPress ID in the id field.

Does it work without WooCommerce?

Yes, for users. Product and order syncing requires WooCommerce.

Can you customize the plugin for my project?

Yes. Custom fields, other Firebase services and full integrations with your app are available as paid custom work; see Custom development above.

Is the plugin available in my language?

The plugin is ready for translation, and translations are made by volunteers on WordPress.org. You can help translate it into your language at translate.wordpress.org. Once a language is 90% translated, WordPress installs the translation automatically through language packs. A translation template, languages/wpw-to-firebase.pot, is included for tools such as Poedit and Loco Translate.

更新日志:

2.1.1 (2026-11-15) 2.1.0 (2026-11-15) 2.0.1 2.0.0 1.0