
-
AuthorPosts
-
July 18, 2025 at 11:32 pm #1487005
Hello,
I recently upgraded the PHP version to 8.3 (from 7.4) and I received the “fatal error” message. I copied the message in the private content. In fact I was not able to log in to my WordPress dashboad. I also tried to restore my site but that didn’t work and made it worse—site completely crashed. I had to revert back to PHP 7.4 to get the site back up and running. I’m currently using Enfold Child theme 7.1.1. and WordPress 6.8.2. After reading several threads, I assumed that the Enfold theme was compatible with 8.3. But that doesn’t seem to be the case.
I contacted my hosting provider and they said the theme was not compatible with PHP 8.3. Please advise what to do. I need to upgrade the PHP version so I get the security updates. I haven’t tried upgrading to 8.2 or 8.1.
July 19, 2025 at 8:07 am #1487007I have now updated all of my installations to PHP 8.3 or higher. Some of my customer providers already offer PHP 8.4. I have never had any problems switching. Therefore, I assume there is high compatibility with current PHP versions. My overloaded test site runs under PHP 8.4.7. For example, the child-theme functions.php has over 5,000 lines, and the quick CSS is already over 9,700 lines long. (webers-testseite.de).
Why don’t you try going back to smaller PHP versions one at a time? It may take a while for this to take effect. Then, see if your installation works with your provider.
July 19, 2025 at 10:56 am #1487010Hi,
The error messages are referring to code your child theme. Note that we don’t provide any code for child themes, that is added by users as they see fit. You could try to temporarily rename the child and try to login after that.
Best regards,
RikardJuly 21, 2025 at 8:42 pm #1487080Guenni007,
Thanks for the recommendation. I may try upgrading to an earlier PHP version and see what happens. Appreciate your help.
July 21, 2025 at 8:49 pm #1487081Rikard,
I’ve upgraded PHP before in the past with no problems using the child theme. So don’t understand why now there’s a conflict with the child theme. I’m not a developer so not sure if I am capable of tweaking it.
So to rename the child theme, which file do I rename? Do I do that before I upgrade to PHP 8.3…..or after? And once I login, do I rename it back to original? Thanks for your help.
July 21, 2025 at 10:22 pm #1487088Hi,
The error message says it is on: /enfold-child/functions.php on line 32
The theme editor shows line numbers, can you look for line 32 and remove that code block?
It might be in a snippet that starts above 32 and after, so remove the whole snippet.
If you are not sure, add a admin login to the Private Content area so we can look.Best regards,
MikeJuly 23, 2025 at 1:34 am #1487137Hi Mike,
I added the login info to the private content. I tried upgrading to PHP 8.0 and got this error code which crashed the site again. I believe it’s the same code as before. (ended up reverting again back to 7.4). Thanks,
An error of type E_ERROR was caused in line 32 of the file /home/88346.cloudwaysapps.com/dapmsxrmxu/public_html/wp-content/themes/enfold-child/functions.php. Error message: Uncaught Error: Undefined constant “THEMENAME” in /home/88346.cloudwaysapps.com/dapmsxrmxu/public_html/wp-content/themes/enfold-child/functions.php:32
Stack trace:
#0 /home/88346.cloudwaysapps.com/dapmsxrmxu/public_html/wp-content/themes/enfold-child/functions.php(32): avia_nav_menus()
#1 /home/88346.cloudwaysapps.com/dapmsxrmxu/public_html/wp-settings.php(695): include(‘…’)
#2 /home/88346.cloudwaysapps.com/dapmsxrmxu/public_html/wp-config.php(103): require_once(‘…’)
#3 /home/88346.cloudwaysapps.com/dapmsxrmxu/public_html/wp-load.php(50): require_once(‘…’)
#4 /home/88346.cloudwaysapps.com/dapmsxrmxu/public_html/wp-admin/admin-ajax.php(22): require_once(‘…’)
#5 {main}
thrownJuly 23, 2025 at 7:47 am #1487143Can you see your child-theme functions.php on: Dashboard – Appearance – Theme File Editor ? click on the right side the “Theme Functions” functions.php and see what is the content on line 32 and following.
May be you post that block you have entered there.
July 23, 2025 at 11:51 am #1487154Hi,
Thanks for that. The Appearance->Theme File Editor option is turned off on your installation, so we cannot access the child theme files. Please post FTP login details in private as well. If you want to rename the child theme, then you can login via FTP, then navigate to the wp-content/themes folder, then rename the child from there.
Best regards,
RikardJuly 23, 2025 at 9:28 pm #1487162Hi,
That’s strange that I can’t see the theme file editor. I have been able to view it before. I’ve posted the FTP details in the private. If you can help figure this out, I’d appreciate it. Thanks.
July 24, 2025 at 9:57 am #1487181Hi,
Thanks for that. The FTP details are working, but all the folders are empty. If you are unsure about which user/details to use, then please reach out to your hosting provider for help with that.
Best regards,
RikardJuly 25, 2025 at 10:41 pm #1487253Rikard,
Sorry about that. I posted the correct details in the private content area.
July 26, 2025 at 12:48 am #1487254Also, the theme file editor is turned back on. I’ll try to copy and paste the code on line 32.
July 26, 2025 at 11:25 am #1487262Hi,
Thanks for that. The FTP account still lead no where, but I checked via the file editor instead. this is what’s on line 32 in your child theme:
avia_nav_menus(); function avia_nav_menus() { global $avia_config, $wp_customize; $avia_config['nav_menus'] = array( 'avia' => array('html' => __('Main Menu', 'avia_framework')), 'avia2' => array( 'html' => __('Secondary Menu <br/><small>(Will be displayed if you selected a header layout that supports a submenu <a target="_blank" href="'.admin_url('?page=avia#goto_header').'">here</a>)</small>', 'avia_framework'), 'plain'=> __('Secondary Menu - will be displayed if you selected a header layout that supports a submenu', 'avia_framework')), 'avia3' => array( 'html' => __('Footer Menu <br/><small>(no dropdowns)</small>', 'avia_framework'), 'plain'=> __('Footer Menu (no dropdowns)', 'avia_framework')), 'avia_responsive' => array( 'html' => __('Responsive Menu <br /><small>(If set will replace your main menu on mobiles)</small>')) ); add_theme_support('nav_menus'); foreach($avia_config['nav_menus'] as $key => $value) { $name = (!empty($value['plain']) && !empty($wp_customize)) ? $value['plain'] : $value['html']; register_nav_menu($key, THEMENAME.' '.$name); } } add_action( 'ava_after_main_menu', 'enfold_customization_add_responsive_menu' ); function enfold_customization_add_responsive_menu() { echo "<nav style = 'display:none;' class='main_menu_responsive' data-selectname='".__('Select a page','avia_framework')."' ".avia_markup_helper(array('context' => 'nav', 'echo' => false)).">"; $avia_theme_location = 'avia_responsive'; $avia_menu_class = $avia_theme_location . '-menu'; $args = array( 'theme_location' => $avia_theme_location, 'menu_id' => $avia_menu_class, 'menu_class' => 'menu av-main-nav', 'container_class' => $avia_menu_class.' av-main-nav-wrap'.$icon_beside, 'fallback_cb' => false, 'walker' => new avia_responsive_mega_menu() ); wp_nav_menu($args); echo '</nav>'; }
What exactly is the purpose of that?
Best regards,
RikardJuly 28, 2025 at 7:05 pm #1487298Hi Rikard,
Hmmm. Not sure what’s going on with the FTP. I’m able to gain access. But glad you could read the file editor. I’m not sure what the purpose of that it. Something with a navigation menu? Your guess is as good as mine:) Should I try to delete it? I’ll do a back up first in case it breaks the site.
July 28, 2025 at 9:58 pm #1487311Hi,
I recommend removing this entire line or place this “//” at the beginning to disable it, if your site crashes you can log in to your FTP and remove the “//”, but I don’t think that it will.
But I don’t want to try without FTP access.Best regards,
MikeJuly 30, 2025 at 12:59 am #1487361Mike,
I was able to disable that line of code with your suggestion. Thanks!
Also, I tried upgrading to PHP 8.3 and it worked!!! Thanks all for your help!
July 30, 2025 at 10:59 am #1487381Hi,
Thanks for the update, we’ll close this thread for now then. Please open a new thread if you should have any further questions or problems.
Best regards,
Rikard -
AuthorPosts
- The topic ‘Site crashed when upgrading to PHP 8.3’ is closed to new replies.