Fix: Neve Child Theme Causes a Critical Error or Site Crash
If your site becomes inaccessible after activating the child theme or after editing child theme files, the crash is almost always caused by custom code in the child theme — not by Neve itself.
Common causes:
- A syntax error or invalid PHP in
functions.php - A copied template file that is outdated after a Neve or WordPress update
- A conflict between custom code in
functions.phpand an active plugin - A child-theme snippet that references
NEVE_VERSIONbefore the parent Neve theme finishes loading
In this article
Recovering access when you cannot reach wp-admin
Use your hosting file manager or an SFTP client to regain access without needing to log in to WordPress:
- Log in to your hosting control panel or connect via SFTP.
- Navigate to
wp-content/themes/. - Rename the child theme folder — for example, rename
neve-childtoneve-child-disabled. WordPress will fall back to the parent Neve theme and your site will become accessible again. - Once you have access to wp-admin, rename the folder back to
neve-child, then diagnose and fix the cause before reactivating the child theme.
Isolating the cause
- In wp-admin, go to Appearance > Themes and switch temporarily to the parent Neve theme to confirm the child theme is the source of the problem.
- Deactivate plugins one by one to rule out a plugin conflict.
- Open
functions.phpinside your child theme folder using your hosting file manager or SFTP client, and comment out recently added code blocks by wrapping them in/* ... */. Save and test after each change. - Check your PHP error log if your hosting provider makes it available — it will usually identify the exact file and line number that triggered the error.
⚠️ Important: Reinstalling Neve or upgrading to Neve Pro will not repair errors inside your child theme. The child theme folder is separate from Neve's files and is never overwritten by Neve updates or the Neve Pro plugin.
For safe alternatives to editing functions.php directly, see Theme File Editor Missing from WordPress Dashboard.
Undefined NEVE_VERSION on PHP 8+
If your PHP error log shows Undefined constant "NEVE_VERSION" after you activate the child theme or edit its functions.php file, the child theme is trying to use a Neve constant too early.
WordPress loads your child theme's functions.php before it loads the parent Neve functions.php. Because Neve defines NEVE_VERSION in the parent theme, the constant is not available yet when child-theme code runs at global file scope.
On PHP 8 and later, this stops execution with a fatal error. Depending on where the error happens, you may see:
- A WordPress critical-error message
- A blank block editor
- An inaccessible wp-admin area
- A fatal error entry in your PHP log
📝 Note: This is different from the neve-gutenberg-style blank-editor issue covered in Block Editor Is Blank or Shows Invisible Content with Neve Theme. If your PHP error log mentions Undefined constant "NEVE_VERSION", fix the child-theme code below.
If the fatal error prevents you from opening wp-admin, first follow the recovery steps above to temporarily disable the child theme and regain access.
Safe style-enqueue pattern
If you are enqueueing your child theme stylesheet, do not reference NEVE_VERSION at the top of functions.php. Instead, hook the enqueue code to wp_enqueue_scripts and read the version inside the callback, after the parent theme has loaded:
function neve_child_enqueue_styles() {
$version = defined( 'NEVE_VERSION' )
? NEVE_VERSION
: wp_get_theme()->get( 'Version' );
wp_enqueue_style(
'neve-child-style',
get_stylesheet_uri(),
array(),
$version
);
}
add_action( 'wp_enqueue_scripts', 'neve_child_enqueue_styles' );This pattern safely waits until Neve has loaded. If NEVE_VERSION is still unavailable for any reason, the defined() check falls back to the active theme version instead of causing a fatal error.
Verify the fix
- Remove or comment out any global child-theme code that references
NEVE_VERSIONoutside a hooked function. - Save the updated
functions.phpfile and reactivate the child theme if you disabled it during recovery. - Open a post or page in the WordPress editor and confirm it loads normally.
- Check your PHP error log again to make sure no new fatal errors are being reported.
