📌 Overview

WPTubeBot is a fast, flexible video importer for WordPress. It pulls feeds from multiple providers (KVS, TubeCorp & more), creates clean posts with embeds, thumbnails, tags, and model/site taxonomies, and automates everything with a robust cron queue.

  • Provider Registry with per-provider filters (categories, tags, models).
  • One-click Add KVS wizard & dynamic URL parameter builder.
  • Job Queue with wptb_every_minute, wptb_5min, wptb_15min.
  • Quick actions: Harvest, Import, Maintenance, Purge.

📥 Installation

  1. Download wptubebot.zip.
  2. WordPress → PluginsAdd NewUpload Plugin.
  3. Activate. Go to WP-Admin → WPTubeBot.
WP Admin → Plugins → Add New → Upload Plugin
Choose wptubebot.zipInstall Now → Activate

🖥️ Admin UI Tour

AreaWhat it does
Provider CardsEach provider shows status, last sync, and quick actions.
Add KVSOpens a modal to build a KVS feed quickly.
FiltersPer-provider include/exclude by categories, tags, models.
Purge VideosOptional cleanup tool to remove imported posts (by provider/site).

🌐 Providers

Add multiple providers and let the queue run them round-robin. You can pause a provider, change limits, or edit filters without breaking the queue.

🏷️ TubeCorp: Find your User ID

Some TubeCorp feeds require your numeric User ID to authenticate or personalize results. Here are two simple ways to find it:

  1. From the Feeds/API page: TubeCorp → Feeds/API. Look for a URL containing source=123456.
Where to find TubeCorp User ID (profile & feeds page)
Example: the number in source=123456 value in your feed URLs.
Tip: copy the exact digits only. If you paste a slug/nickname, the feed may return error.

🧩 KVS: Add a feed with Add KVS

  1. Go to WP-Admin → WPTubeBot and click Add KVS.
  2. Enter your KVS site Site URL (e.g., https://example.com).
  3. Enter your KVS Feed Feed URL (e.g., https://example.com/admin/feeds/feed).
  4. Fill the parameters using the builder.
  5. Set a Site Slug (e.g., kvs_example) to tag imported posts.
  6. Save and click Test to preview 1–2 items. If OK → Enable.

⏱️ Cron & Jobs

WPTubeBot uses an internal queue and three cron rhythms to process jobs safely without overloading your server.

HookFrequencyRole
wptb_every_minuteevery 60sImport worker: creates/updates posts from the queue.
wptb_5minevery 5 minHarvest: reads provider feeds, paginates, and enqueues new items.
wptb_15minevery 15 minMaintenance: retries, orphan cleanup, metrics.
Why doesn’t “1000” import everything at once? Feeds are paginated (e.g., 100 per page) and the queue limits “max per run” to protect memory/CPU. It’s incremental: Harvest discovers and enqueues, Import consumes at a steady pace, and Maintenance keeps the system healthy.

WP-Cron vs System Cron

You can run scheduled jobs either with WordPress’s built-in WP-Cron or with a system cron job. If you choose system cron, disable WP-Cron and call wp-cron.php (or trigger via WP-CLI).

# Disable WP-Cron in wp-config.php define('DISABLE_WP_CRON', true);
# Crontab (every minute) via HTTP * * * * * curl -s https://yoursite.com/wp-cron.php?doing_wp_cron > /dev/null 2>&1
# Alternative with WP-CLI * * * * * cd /var/www/html && php wp-cli.phar cron event run --due-now > /dev/null 2>&1

Admin Quick Actions

  • Harvest Now: run discovery (enqueue only, no import).
  • Import Now: force the worker to consume the queue immediately.
  • Maintenance: run cleanup/retries now.
  • Purge Videos: delete imported posts (by provider or site_slug). Irreversible.

⚙️ Import Settings

  • Limit per Harvest: max items to enqueue per pass.
  • Limit per Import: max posts created/updated per cycle.
  • Import Thumbnails & Featured Image (WordPress sideload).
  • Import Tags / Categories: create/map taxonomy terms.
  • Skip Duplicates by provider URL/UID (persistent hash).
  • Taxonomy binding: assign wptb_site and wptb_models.
  • Status: publish or draft imported posts.
  • Post Type: choose your CPT if not using default post.

🏷️ Taxonomies

  • wptb_site: tracks the source site/provider (useful for filtering, purge by site, archives).
  • wptb_models: optional model tags if the feed provides them.
  • Native categories & tags: can be imported/mapped per provider.

🛠️ Troubleshooting

“Set to 1000 but only a few are imported.”

That’s expected. Feeds are paginated and the queue enforces per-run limits. Let the cron cycles run; items will be imported progressively.

Nothing imports / stuck at 0

  • Check WP-Cron or your system cron is actually firing.
  • Ensure provider is Enabled and limits > 0.
  • Open browser console/network to confirm the feed returns JSON items.

Thumbnails not saving

  • Server allows outbound HTTPS (firewall/proxy).
  • Increase PHP max_execution_time and memory_limit if importing many images.
  • wp-content/uploads must be writable.

Avoid “Uncategorized”

Enable category import or set a default category in WordPress. You can also map per-provider categories.

❓ FAQ

Is WPTubeBot free?

Yes, free to use. Future premium placements may be optional.

Can I sell sites built with it?

Yes. You can build and sell sites using WPTubeBot.

Where do I see progress?

Provider cards show last sync and counts. Logs indicate harvest/import/maintenance activity.

Does it store third-party media?

No. It embeds media from providers; thumbnails can be sideloaded if enabled.