VOOZH about

URL: https://deepwiki.com/Automattic/BuddyPress-VIP-Go/5-installation-and-configuration

⇱ Installation and Configuration | Automattic/BuddyPress-VIP-Go | DeepWiki


Loading...
Menu

Installation and Configuration

Purpose and Scope

This document provides technical guidance for installing and configuring the BuddyPress VIP Go plugin on WordPress VIP environments. It covers system prerequisites, installation procedures, activation sequence requirements, environment detection mechanisms, and verification steps. For information about plugin architecture and how it integrates with VIP Go FHS, see System Architecture. For development setup including local testing environments, see Local Development Setup.


System Prerequisites

The plugin has strict version and environment requirements that must be met before installation.

Software Requirements

ComponentMinimum VersionLocation in Code
WordPress6.6buddypress-vip-go.php14
PHP8.2buddypress-vip-go.php15
BuddyPressAny compatible versionDetected via bp_loaded hook

VIP Go Environment Requirements

The plugin performs runtime detection of three VIP-specific environment markers. All three must be present for the integration layer to load:

RequirementTypeDetection MethodCode Reference
VIP Files ClientPHP Classclass_exists( 'A8C_Files' )buddypress-vip-go.php28
Site ID ConfigurationPHP Constantdefined( 'FILES_CLIENT_SITE_ID' )buddypress-vip-go.php28
Access TokenPHP Constantdefined( 'FILES_ACCESS_TOKEN' )buddypress-vip-go.php28

Note: These environment markers are automatically provided by WordPress VIP infrastructure. They cannot be manually configured. If running outside VIP Go, the plugin remains dormant and does not interfere with normal BuddyPress operation.

Sources: buddypress-vip-go.php14-15 buddypress-vip-go.php28 README.md5-8


Installation Procedure

Critical Activation Order Requirement

The plugin must be activated before BuddyPress to prevent fatal errors during BuddyPress initialization. This is because the plugin registers hooks that modify BuddyPress's media handling behavior before BuddyPress attempts filesystem operations that would fail on VIP Go.


Title: Installation Activation Sequence

Sources: README.md50-53

Step-by-Step Installation

  1. Upload Plugin Files

    • Place the buddypress-vip-go directory in /wp-content/plugins/
    • Ensure all files are readable by the web server
  2. Verify Environment (VIP Go Only)

    • Confirm the site is running on WordPress VIP infrastructure
    • The plugin will self-detect VIP environment markers
  3. Activate in Correct Order

    • If BuddyPress is already active, deactivate it first
    • Activate the BuddyPress VIP Go plugin
    • Activate (or reactivate) BuddyPress
  4. No Configuration Required

    • The plugin requires no settings or options
    • All behavior is automatic based on environment detection

Sources: README.md48-53


Environment Detection Mechanism

The plugin uses a defense-in-depth approach to environment detection, only loading the VIP integration layer when all conditions are satisfied.

Detection Flow


Title: VIP Environment Detection Logic Flow

Sources: buddypress-vip-go.php25-34

Code Entity Mapping

The detection logic maps to specific code constructs in buddypress-vip-go.php25-34:

Detection CheckPHP CodePurpose
BuddyPress Readyadd_action( 'bp_loaded', ... )Waits for BuddyPress to initialize
VIP Files Clientclass_exists( 'A8C_Files' )Confirms VIP Files API is available
Site Configurationdefined( 'FILES_CLIENT_SITE_ID' )Verifies site is registered with VIP FHS
Authenticationdefined( 'FILES_ACCESS_TOKEN' )Confirms API authentication credentials exist
Integration Loadrequire_once __DIR__ . '/files.php'Loads core integration layer

The variable $vip_available at buddypress-vip-go.php28 contains the combined boolean result of all three checks.

Sources: buddypress-vip-go.php25-34


Installation Verification

Confirming Successful Activation

After activation, verify the plugin is functioning correctly:


Title: Plugin Activation Verification Sequence

Verification Checklist

CheckExpected ResultIndicates
Plugin listed as active"BuddyPress VIP Go" appears in active pluginsPlugin files loaded correctly
No PHP errors on activationNo error messages displayedDependencies met, syntax valid
BuddyPress settings accessibleSettings pages load without errorsCompatible BuddyPress version
Avatar upload testUpload succeeds without filesystem errorsVIP integration active (VIP only)
No opendir() errorsSystem logs show no filesystem warningsHooks registered before BP operations

Sources: buddypress-vip-go.php25-34 README.md50-53

Non-VIP Environment Behavior

On standard WordPress installations (non-VIP), the plugin exhibits the following behavior:

  1. Activation succeeds - Plugin appears active in WordPress admin
  2. No functionality loads - buddypress-vip-go.php28-32 conditions fail
  3. No interference - BuddyPress operates with default media handlers
  4. No errors generated - Silent dormancy is intentional design

This design allows the plugin to be safely present in version control repositories used across multiple environments (local development, staging, production).

Sources: buddypress-vip-go.php25-34


Configuration

Zero-Configuration Design

The plugin implements a zero-configuration architecture. All operational parameters are derived automatically from:

  1. Environment Detection - VIP Go infrastructure markers
  2. BuddyPress Settings - Reads existing BP configuration
  3. WordPress Metadata - Uses standard user/group meta tables

No WordPress admin screens, settings pages, or configuration constants exist for this plugin.

Configuration-Free Operation


Title: Zero-Configuration Architecture Flow

Sources: buddypress-vip-go.php25-34 README.md50-53

What Gets Configured Automatically

AspectConfiguration MethodCode Reference
VIP FHS integrationDetected via A8C_Files classbuddypress-vip-go.php28
File upload pathsHandled by VIP wp_handle_upload()files.php
CDN delivery URLsGenerated via VIP Files APIfiles.php
Image transformationsQuery parameters appended to URLsfiles.php
Metadata storage keysHardcoded: vipbp-avatars, vipbp-group-avatars, etc.files.php

Sources: buddypress-vip-go.php28 README.md32-35


Post-Installation Considerations

Multisite Installations

In WordPress multisite networks:

  • Activate the plugin network-wide for consistent behavior across all sites
  • Metadata storage automatically uses the root blog (blog ID 1) for all sites
  • No per-site configuration is required or supported

Plugin Updates

Updates follow standard WordPress plugin update mechanisms:

  1. Automatic Updates - Safe to enable automatic updates
  2. Manual Updates - Replace plugin files while plugins are inactive, then reactivate
  3. No Data Migration - Updates never modify database structure (plugin uses standard WP meta tables)

Deactivation Behavior

Deactivating the plugin:

  • Does not delete stored media files - Files remain in VIP FHS
  • Does not remove metadata - User/group meta keys remain in database
  • Restores default BuddyPress handlers - BuddyPress reverts to standard filesystem operations (which will fail on VIP Go)

Warning: Deactivating this plugin on WordPress VIP will immediately break all BuddyPress media functionality.

Sources: buddypress-vip-go.php1-35 README.md48-53


Troubleshooting Installation Issues

Common Installation Problems

SymptomCauseSolution
Fatal error on BuddyPress activationWrong activation orderDeactivate BuddyPress, activate VIP Go plugin first, then reactivate BuddyPress
opendir() errors in logsVIP Go plugin activated after BPDeactivate both plugins, activate in correct order
Media uploads fail on VIPEnvironment constants missingContact VIP support to verify FHS provisioning
Plugin shows as active but has no effectNot running on VIP infrastructureExpected behavior - plugin is dormant outside VIP

Debug Information Collection

To diagnose installation issues, check the following values (via debug logging or temporary diagnostic code):


All checks should return true on a properly configured VIP Go environment with BuddyPress active.

Sources: buddypress-vip-go.php25-34


Related Documentation

For topics beyond basic installation and configuration:

Sources: README.md1-62 buddypress-vip-go.php1-35