Sign inBlogSupportContact
Workflow

Startup commands: set it once, forget it forever

Commands that run on every page load. No cron, no plugins, no code. Just always-on behavior.

5 min read May 2026

Some things should just always be on

You installed a tracking pixel. You want it on every page, always. You set a revision limit. You want it enforced on every save, always. You password-protected the staging site. You want the wall up on every visit, always.

These aren't one-time tasks. They're persistent behaviors. In a normal WordPress setup, each one requires its own plugin, its own settings page, or a code snippet pasted into functions.php. Startup commands replace all of that with a single concept: commands that run automatically on every page load.

How startup commands work

When you run certain commands in the navigator — tracking pixels, password protection, revision limits, maintenance mode, discounts — TrueCommander auto-registers them as startup commands. On every subsequent page load, the startup system re-runs the command before the page renders.

The command doesn't know or care that it's running as a startup. It just runs its handle() method like it would from the navigator. But because it runs on every page load (via wp_loaded), hooks like add_action('wp_head') and add_action('template_redirect') fire at the right time.

No cron required. Startup commands run on every page load, not on a schedule. They're instant — no waiting for WP-Cron to fire, no missed intervals on low-traffic sites.

1. Tracking pixels that survive theme changes

You run enable ga4 -mid=G-AB12CD34EF in the navigator. TrueCommander registers it as a startup command. On every frontend page load, the GA4 script is injected into wp_head.

Switch themes? Still there. Update the theme? Still there. The tracking script lives in the startup command system, not in theme files. It persists until you explicitly remove the startup entry.

This works for all 11 tracking platforms: GA4, Facebook, TikTok, Clarity, Hotjar, Snapchat, Pinterest, LinkedIn, X, Bing, and GTM.

2. Password protection without a plugin

You're building a client site on a live URL. You run password protect -password=clientpreview. The startup system intercepts every frontend request with a password wall. Logged-in admins bypass it. Everyone else enters the password.

When the site is ready to launch, you remove the startup command. The wall disappears. No plugin to deactivate, no settings to reset, no leftover database entries.

3. Revision limits that actually stick

WordPress has no admin UI for limiting revisions. The only built-in option is adding a constant to wp-config.php. With TrueCommander, you run limit revisions -total=5 and it auto-registers as a startup command. On every page load, WordPress's revision system is told to keep a maximum of 5 revisions per post.

No wp-config editing. No plugin. Just a startup command that enforces the limit silently, forever.

4. Maintenance mode during deployments

You're migrating a database at 2am. You enable maintenance mode with a custom message. The startup system intercepts every frontend request and shows a branded 503 page. Search engines see "temporarily unavailable" and come back later. Your SEO rankings are unaffected.

You finish the migration, remove the startup entry. The site is live again. The 503 page is gone.

5. Sitewide discounts for flash sales

Black Friday. You want 25% off everything. You run discount -percent=25 and it registers as a startup command. On every product page load, WooCommerce's price filters apply the discount at render time. Original prices stay untouched in the database. Customers see strikethrough pricing and sale badges.

Monday morning, you remove the startup command. Prices revert to their originals. No bulk editing, no spreadsheet of "what was the old price?", no cleanup.

Conditions: not just "always on"

Startup commands don't have to run on every single page load. The Startup Commands module supports conditions — 29 condition types with AND/OR logic groups. You can set a startup command to run only:

  • On specific pages or post types
  • For certain user roles
  • During a date range (start a sale on Friday, end it on Monday automatically)
  • On mobile or desktop only
  • When a specific plugin is active

A discount that only runs between November 25 and November 28. A password wall that only applies to non-logged-in visitors on specific URLs. A tracking pixel that only fires on product pages. Conditions make startup commands surgical instead of global.

Managing startup commands

All startup commands are visible in TrueCommander → Startup Commands. You can see what's running, edit parameters, toggle conditions, or delete entries. It's a single list of everything that runs on page load — no hunting through plugin settings, theme files, or wp-config.php.

Delete to disable. Removing a startup command entry immediately stops the behavior. No "deactivate" step, no leftover settings, no orphaned database rows. It's gone.

Ready?

Set it once. It runs forever.

Startup commands, macros, scheduling, and 91 commands — all included.

Cookies. The short version.

Essential cookies keep the cart and theme working. Analytics only fire if you say yes. Read our policy.