HTTP Server Log

// HTTP Server Log / Kiri Vadivelu / 2026 // Log HTTP requests to a file define( ‘HTTP_LOG_FILE’, WP_CONTENT_DIR . ‘/http-requests.log’ ); function my_log_http_request( $response, $request, $url ) { $log_entry = [ ‘time’ => current_time( ‘mysql’ ), ‘method’ => $request[‘method’],…Continue reading

SMTP Email Log

// SMTP Email Log / Kiri Vadivelu / 2026 // Register the Admin Menu add_action(‘admin_menu’, ‘register_all_menus’); function register_all_menus() { add_menu_page( ‘Email Log’, ‘Email Log’, ‘manage_options’, // Access for Admin Only ‘smtp-log’, ‘render_smtp_log_page’, ‘dashicons-email-alt’, 99 ); } // Render the Email…Continue reading

Simple HTTP Debug

// Simple HTTP Debug / Kiri Vadivelu / 2026 function simple_http_debug( $response, $context, $class, $parsed_args, $url ) { error_log( ‘http_debug: ‘.$url ); } add_action(‘http_api_debug’, ‘simple_http_debug’, 10, 5);Continue reading

Admin Debug Log

// Admin Debug Log / Kiri Vadivelu / 2026 add_action( ‘admin_menu’, function () { add_menu_page( ‘Debug Log’, ‘Debug Log’, ‘manage_options’, ‘view-debug-log’, ‘render_debug_log_page’, ‘dashicons-clipboard’, 99 ); }); function render_debug_log_page() { $log_file = WP_CONTENT_DIR . ‘/debug.log’; if ( ! file_exists( $log_file )…Continue reading

Exclude Cache Page

// Exclude Cache Page / Kiri Vadivelu / 2026 function exclude_cache_page() { $excluded_urls = array( ‘/client-portal/’, ‘/checkout/’, ‘/cart/’, ); $uri = parse_url( $_SERVER[‘REQUEST_URI’], PHP_URL_PATH ); foreach ( $excluded_urls as $url ) { if ( strpos( $uri, $url ) !== false…Continue reading

Exclude Caching Page

// Exclude Caching Page / Kiri Vadivelu / 2026 function exclude_caching_page() { $excluded_pages = array( 6, 57, 103 ); // ← your page IDs here if ( is_page( $excluded_pages ) ) { if ( ! defined( ‘DONOTCACHEPAGE’ ) ) {…Continue reading