WSOD on Register/Activity/etc Pages with Custom Theme Override
-
Hello everyone,
I’m trying to create a simple custom theme to override the BuddyPress (Nouveau) registration page, but I’m consistently running into a White Screen of Death (WSOD). I’ve been troubleshooting for a while and would appreciate any help you can offer.
My Goal:
To create a custom theme that overrides register.php from the BP Nouveau template pack.My Environment:
OS: Windows
Local Development Tool: DevKinsta
Plugin: BuddyPress (latest version)
The Problem:
When I activate my custom theme, I get a WSOD when trying to access the site (e.g., mysite.local/register/).Here is a summary of the troubleshooting steps I have already tried:
Enabled WP_DEBUG: I have set WP_DEBUG, WP_DEBUG_LOG, and WP_DEBUG_DISPLAY to true in my wp-config.php. However, no errors are ever displayed on the screen or written to the debug.log file. The page is just completely blank.
Checked for PHP Errors: I initially had parse errors (an extra } bracket) in my functions.php and register.php files. These have been found and corrected.
Checked for BOM: I have verified with my code editor (VS Code) that all my theme files are saved with UTF-8 encoding and do not have a Byte Order Mark (BOM).
Reset Permalinks: I have gone to Settings > Permalinks and clicked “Save Changes” multiple times to rebuild the rewrite rules.
Theme Deactivation Test: When I rename my theme’s folder to force WordPress to deactivate it, I can access wp-admin again. This confirms the issue is within my theme’s code.
File Permissions: I received a security warning that /wp-content/ was too writeable. I have reset the permissions for my entire site folder on my Windows machine to ensure they are not too permissive.
My Theme Structure and Code:
My theme is very simple.
1. Directory Structure for the Override:
wp-content/themes/kfluxtheme/buddypress/members/register.php
(The register.php file is an exact, unmodified copy from wp-content/plugins/buddypress/bp-templates/bp-nouveau/buddypress/members/)/* Theme Name: K-Flux Theme Author: My Name Version: 1.0 */
<?php /** * Theme functions and definitions. */ if ( ! function_exists( 'kfluxtheme_setup' ) ) { /** * Basic theme setup. */ function kfluxtheme_setup() { // Add support for BuddyPress (ESSENTIAL) add_theme_support( 'buddypress' ); // Let WordPress manage the document title. add_theme_support( 'title-tag' ); // Enable support for Post Thumbnails. add_theme_support( 'post-thumbnails' ); } } add_action( 'after_setup_theme', 'kfluxtheme_setup' ); /** * Enqueue scripts and styles. */ function kfluxtheme_enqueue_scripts() { wp_enqueue_style( 'kfluxtheme-style', get_stylesheet_uri(), array(), '1.0' ); } add_action( 'wp_enqueue_scripts', 'kfluxtheme_enqueue_scripts' );
Despite all these steps, the WSOD persists when my theme is active. Since WP_DEBUG is not showing any errors, I’m running out of ideas on how to debug this further.
Has anyone encountered a similar issue with DevKinsta or have any suggestions for what I might be missing?
Thanks in advance for any help.
- You must be logged in to reply to this topic.