如何修复“致命错误:未捕获错误:调用未定义函数get_header()”

I am trying to put this website back online. The error message is the following :

Fatal error: Uncaught Error: Call to undefined function get_header() in /homepages/25/d584099293/htdocs/clickandbuilds/X3DSYSTEMS/wp-content/themes/x3dprotheme/index.php:4 Stack trace: #0 {main} thrown in /homepages/25/d584099293/htdocs/clickandbuilds/X3DSYSTEMS/wp-content/themes/x3dprotheme/index.php on line 4

The client told me he "accidentaly reseted the domain". First when I went on the website I had an error message about Wordfence and I did what I needed to do to correct it (here what I did : https://docs.wordfence.com/en/After_moving_a_site_or_deleting_some_files%2C_I_see__PHP_Fatal_error__Unknown__Failed_opening_required_/var/www/html/wordfence-waf.html ) I removed the firewall setup manually.

Then I got this new message of error about index.php

In this index.php, here what I found :

<?php get_header(); ?>

<?php get_footer(); ?>

I try to get this website back online. Thanks for your help.

What webhost is this? Maybe if we know, we can ascertain what the "domain reset" involved and backtrack the fix once we know exactly what those steps entailed. When these sorts of things happen to me (I manage about 30 WP sites), first thing I do is disable all plugins, and sometimes if I can't actually log into WP, I remove the plugins via sftp or through cPanel.

You're stuck though if you have no access to the host. It'll extremely difficult to solve this without access to the server or control panel for the hosting environment. Do you at least have sftp access?

This looks like a path to a core theme file. Are you doing your work in a child theme?

If you are using child theme, you should be able to update the parent via the theme settings found in your dashboard, without data loss from style sheets etc. you made in your child theme.

This would work like the backup restore as suggested above, but without the need to get into cpanel or ftp.

The client changed the "target" with his webhost and the site is back online. There was also a problem with revolution slider but anyway, the problem looks solved.

Thanks to all the contributors.