Skip to content

Performance & Utilities ​

Orbit includes high-performance asset handlers, development environment media hotlinking, uptime health check endpoints, error log noise suppression, and environment indexing safeguards.

Fast 404 Static Asset Response ​

When a browser or crawler requests a missing static file (such as a missing .png, .jpg, .woff2, or .js file), WordPress normally boots the entire PHP application stack and executes database queries just to render a 404 page.

Orbit's Fast 404 module intercepts missing static asset requests early in the request lifecycle (at muplugins_loaded or plugins_loaded) and terminates immediately with a lightweight 404 Not Found HTTP status code.

Enabling Fast 404 ​

Fast 404 is opt-in via a constant defined in your wp-config.php:

php
define( 'ORBIT_ENABLE_FAST_404', true );

Remote Production Media Hotlinking ​

When pulling a production database down to local or staging environments, the /app/uploads/ directory often lacks media asset files.

Orbit hotlinks missing media attachments directly from your production server so images render cleanly on non-production environments without needing gigabytes of local uploads.

How It Works ​

  • Active only in non-production environments (development, local, staging).
  • Checks if the file exists locally first. If present locally, the local file is served.
  • If missing locally, Orbit rewrites attachment URLs, srcset image attributes, and REST JSON responses to fetch the media asset from the remote production host.

Configuration ​

Define ORBIT_REMOTE_FILES_URL in .env or wp-config.php:

php
// In wp-config.php or environment variables
define( 'ORBIT_REMOTE_FILES_URL', 'https://example.com' );

Orbit also supports SATELLITE_PRODUCTION_URL as a fallback, or you can use a filter hook:

php
add_filter( 'orbit_remote_files_url', function() {
    return 'https://media.example.com';
} );

Website Health Check REST Endpoint ​

Orbit registers a lightweight REST API health check endpoint:

http
GET /wp-json/orbit/up

Response ​

json
"ok"

This endpoint confirms that PHP is running, WordPress core initialised, and the database connection is healthy. It is ideal for HTTP uptime monitors (e.g. UptimeRobot, Pingdom) and cloud load balancer target group checks.

Error Log Noise Control ​

To keep PHP error logs clean and actionable, Orbit filters non-critical PHP warnings and deprecation notices according to your environment type:

  • Development: Suppresses E_DEPRECATED and E_USER_DEPRECATED notices.
  • Staging / Production: Suppresses E_WARNING, E_USER_WARNING, E_NOTICE, E_USER_NOTICE, E_DEPRECATED, and E_USER_DEPRECATED.
  • Fatal Errors & Exceptions: Fatal errors, parse errors, and exceptions always pass through to your error logger.

Custom Error Bitmask ​

Customise Orbit's error reporting bitmask in wp-config.php:

php
// Set a custom PHP error reporting bitmask
define( 'ORBIT_ERROR_REPORTING', E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED );

// Or disable Orbit's error-reporting handler entirely
define( 'ORBIT_ERROR_REPORTING', false );

Non-Production Indexing Safeguards ​

To prevent staging or development sites from accidentally being indexed by Google or search engine crawlers, Orbit automatically forces blog_public = 0 whenever wp_get_environment_type() is not production.

Orbit also displays an informational warning notice in the WordPress admin bar informing developers that search engine indexing is currently suppressed.