Need URGENT help - everything in website is gone!

A website iI built and manage for a client has completely dissapeared!

When I logged in to the Wordpress Admin - NOTHING loaded (Xtheme, plugins etc.)

This happened just now after I activated the Google Analytics plugin.

Can you please look into this ASAP - my client is freaking out.

I have had to do a complete backup restore. Didn’t lose too much because we backup daily.

But I really need to work out why this happened. When we looked at our files through FTP, they were all there - but nothing was loading on the Wordpress Dashboard (all plugins and theme missing). The Posts & Pages were still showing. When you looked at the live website, there was jut a blank page - viewed source and no code at all.

The only change we made to the site today was to add some tracking and conversion code to the Head through the Google Analytics Plugin. The code we pasted was:

Does this give any clues?

Darren.

The Code I paste in here doesn’t show on the previews. Is there a special way to insert the code for viewing?

OK, it seems if I removed these: < script type=“text/javascript” > (spaces before < >) the code shows…

< script type=“text/javascript” >
(function(a,e,c,f,g,h,b,d){var k={ak:“960949349”,cl:"-0QaCKD4ol4Q5dibygM"};a[c]=a[c]||function(){(a[c].q=a[c].q||[]).push(arguments)};a[g]||(a[g]=k.ak);b=e.createElement(h);b.async=1;b.src="//www.gstatic.com/wcm/loader.js";d=e.getElementsByTagName(h)[0];d.parentNode.insertBefore(b,d);a[f]=function(b,d,e){a[c](2,b,k,d,null,new Date,e)};af})(window,document,"_googWcmImpl","_googWcmGet","_googWcmAk",“script”);
< /script >

< script >
document.addEventListener( ‘wpcf7mailsent’, function( event ) {
ga(‘send’, ‘event’, ‘Contact Form’, ‘submit’);
}, false );
< /script >

Hi Darren,

Thanks for writing in. Definitely a strange thing to happen.

As it was a blank page, it was most likely a fatal error, most probably through the addition of the code added. Perhaps a syntax error. Do you have anything logged in your hosts error_log? Check that and let us know.

Thanks!

Hi Jack,

I will check to see if there’s anything in the error log.

The issue didn’t seem to occur until sometime after we added the code. Is that pointing to anything?

I did multiple browser refreshes after adding the code to make sure it wasn’t affecting the site, and the site didn’t go down until hours later. Is it a caching issue?

D.

Hi Jack,

I’ve found an error log It’s fairly large.

[02-Sep-2017 02:45:27 UTC] PHP Parse error:  syntax error, unexpected ' ' (T_STRING) in /home/explorer1947/public_html/wp-content/themes/x-child/functions.php on line 28
[02-Sep-2017 02:45:28 UTC] PHP Parse error:  syntax error, unexpected ' ' (T_STRING) in /home/explorer1947/public_html/wp-content/themes/x-child/functions.php on line 28
[02-Sep-2017 02:45:29 UTC] PHP Parse error:  syntax error, unexpected ' ' (T_STRING) in /home/explorer1947/public_html/wp-content/themes/x-child/functions.php on line 28
[02-Sep-2017 02:45:30 UTC] PHP Parse error:  syntax error, unexpected ' ' (T_STRING) in /home/explorer1947/public_html/wp-content/themes/x-child/functions.php on line 28
[02-Sep-2017 02:45:31 UTC] PHP Parse error:  syntax error, unexpected ' ' (T_STRING) in /home/explorer1947/public_html/wp-content/themes/x-child/functions.php on line 28
[02-Sep-2017 02:45:32 UTC] PHP Parse error:  syntax error, unexpected ' ' (T_STRING) in /home/explorer1947/public_html/wp-content/themes/x-child/functions.php on line 28
[02-Sep-2017 02:45:54 UTC] PHP Parse error:  syntax error, unexpected ' ' (T_STRING) in /home/explorer1947/public_html/wp-content/themes/x-child/functions.php on line 28
[02-Sep-2017 02:46:25 UTC] PHP Parse error:  syntax error, unexpected ' ' (T_STRING) in /home/explorer1947/public_html/wp-content/themes/x-child/functions.php on line 28
[02-Sep-2017 02:46:37 UTC] PHP Parse error:  syntax error, unexpected ' ' (T_STRING) in /home/explorer1947/public_html/wp-content/themes/x-child/functions.php on line 28
[02-Sep-2017 02:46:39 UTC] PHP Parse error:  syntax error, unexpected ' ' (T_STRING) in /home/explorer1947/public_html/wp-content/themes/x-child/functions.php on line 28
[02-Sep-2017 02:46:43 UTC] PHP Parse error:  syntax error, unexpected ' ' (T_STRING) in /home/explorer1947/public_html/wp-content/themes/x-child/functions.php on line 28
[02-Sep-2017 02:47:12 UTC] PHP Parse error:  syntax error, unexpected ' ' (T_STRING) in /home/explorer1947/public_html/wp-content/themes/x-child/functions.php on line 28
[02-Sep-2017 02:47:16 UTC] PHP Parse error:  syntax error, unexpected ' ' (T_STRING) in /home/explorer1947/public_html/wp-content/themes/x-child/functions.php on line 28
[02-Sep-2017 02:47:18 UTC] PHP Parse error:  syntax error, unexpected ' ' (T_STRING) in /home/explorer1947/public_html/wp-content/themes/x-child/functions.php on line 28
[02-Sep-2017 02:47:20 UTC] PHP Parse error:  syntax error, unexpected ' ' (T_STRING) in /home/explorer1947/public_html/wp-content/themes/x-child/functions.php on line 28
[02-Sep-2017 02:47:36 UTC] PHP Parse error:  syntax error, unexpected ' ' (T_STRING) in /home/explorer1947/public_html/wp-content/themes/x-child/functions.php on line 28
[02-Sep-2017 02:47:38 UTC] PHP Parse error:  syntax error, unexpected ' ' (T_STRING) in /home/explorer1947/public_html/wp-content/themes/x-child/functions.php on line 28
[02-Sep-2017 02:47:40 UTC] PHP Parse error:  syntax error, unexpected ' ' (T_STRING) in /home/explorer1947/public_html/wp-content/themes/x-child/functions.php on line 28
[02-Sep-2017 02:47:42 UTC] PHP Parse error:  syntax error, unexpected ' ' (T_STRING) in /home/explorer1947/public_html/wp-content/themes/x-child/functions.php on line 28
[04-Oct-2017 01:52:47 UTC] PHP Parse error:  syntax error, unexpected ' ' (T_STRING) in /home/explorer1947/public_html/wp-content/themes/x-child/functions.php on line 27
[04-Oct-2017 01:52:54 UTC] PHP Parse error:  syntax error, unexpected ' ' (T_STRING) in /home/explorer1947/public_html/wp-content/themes/x-child/functions.php on line 27
[25-Oct-2017 11:33:04 UTC] PHP Warning:  file_put_contents(/home/explorer1947/public_html/wp-content/deleteme.9e0c848de0494c39aa5a9701af983dea.php): failed to open stream: No such file or directory in /home/explorer1947/public_html/deleteme.9e0c848de0494c39aa5a9701af983dea.php on line 31
[25-Oct-2017 11:35:40 UTC] PHP Warning:  file_put_contents(/home/explorer1947/public_html/wp-content/deleteme.e6d25b24fc9b4a4d92d7fd36acee75b3.php): failed to open stream: No such file or directory in /home/explorer1947/public_html/deleteme.e6d25b24fc9b4a4d92d7fd36acee75b3.php on line 31
[25-Oct-2017 13:47:05 UTC] PHP Warning:  file_put_contents(/home/explorer1947/public_html/wp-content/deleteme.cae1d9242a214005ad9a52329bf56cbf.php): failed to open stream: No such file or directory in /home/explorer1947/public_html/deleteme.cae1d9242a214005ad9a52329bf56cbf.php on line 31
[25-Oct-2017 16:14:29 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function x_get_view() in /home/explorer1947/public_html/wp-content/themes/x/404.php:17
Stack trace:
#0 /home/explorer1947/public_html/wp-includes/template-loader.php(74): include()
#1 /home/explorer1947/public_html/wp-blog-header.php(19): require_once('/home/explorer1...')
#2 /home/explorer1947/public_html/index.php(17): require('/home/explorer1...')
#3 {main}
  thrown in /home/explorer1947/public_html/wp-content/themes/x/404.php on line 17
[25-Oct-2017 16:16:49 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function x_get_view() in /home/explorer1947/public_html/wp-content/themes/x/404.php:17
Stack trace:
#0 /home/explorer1947/public_html/wp-includes/template-loader.php(74): include()
#1 /home/explorer1947/public_html/wp-blog-header.php(19): require_once('/home/explorer1...')
#2 /home/explorer1947/public_html/index.php(17): require('/home/explorer1...')
#3 {main}
  thrown in /home/explorer1947/public_html/wp-content/themes/x/404.php on line 17
[25-Oct-2017 16:18:12 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function x_get_view() in /home/explorer1947/public_html/wp-content/themes/x/template-blank-4.php:17
Stack trace:
#0 /home/explorer1947/public_html/wp-includes/template-loader.php(74): include()
#1 /home/explorer1947/public_html/wp-blog-header.php(19): require_once('/home/explorer1...')
#2 /home/explorer1947/public_html/index.php(17): require('/home/explorer1...')
#3 {main}
  thrown in /home/explorer1947/public_html/wp-content/themes/x/template-blank-4.php on line 17
[25-Oct-2017 16:18:30 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function x_get_view() in /home/explorer1947/public_html/wp-content/themes/x/404.php:17
Stack trace:
#0 /home/explorer1947/public_html/wp-includes/template-loader.php(74): include()
#1 /home/explorer1947/public_html/wp-blog-header.php(19): require_once('/home/explorer1...')
#2 /home/explorer1947/public_html/index.php(17): require('/home/explorer1...')
#3 {main}
  thrown in /home/explorer1947/public_html/wp-content/themes/x/404.php on line 17
[25-Oct-2017 16:18:44 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function x_get_view() in /home/explorer1947/public_html/wp-content/themes/x/template-blank-4.php:17
Stack trace:
#0 /home/explorer1947/public_html/wp-includes/template-loader.php(74): include()
#1 /home/explorer1947/public_html/wp-blog-header.php(19): require_once('/home/explorer1...')
#2 /home/explorer1947/public_html/index.php(17): require('/home/explorer1...')
#3 {main}
  thrown in /home/explorer1947/public_html/wp-content/themes/x/template-blank-4.php on line 17
[25-Oct-2017 16:30:00 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function x_post_thumbnail_width() in /home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/setup.php:35
Stack trace:
#0 /home/explorer1947/public_html/wp-content/themes/x/functions.php(111): require_once()
#1 /home/explorer1947/public_html/wp-content/themes/x/functions.php(117): x_boot()
#2 /home/explorer1947/public_html/wp-settings.php(424): include('/home/explorer1...')
#3 /home/explorer1947/public_html/wp-config.php(103): require_once('/home/explorer1...')
#4 /home/explorer1947/public_html/wp-load.php(37): require_once('/home/explorer1...')
#5 /home/explorer1947/public_html/wp-blog-header.php(13): require_once('/home/explorer1...')
#6 /home/explorer1947/public_html/index.php(17): require('/home/explorer1...')
#7 {main}
  thrown in /home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/setup.php on line 35
[25-Oct-2017 16:30:42 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function x_post_thumbnail_width() in /home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/setup.php:35
Stack trace:
#0 /home/explorer1947/public_html/wp-content/themes/x/functions.php(111): require_once()
#1 /home/explorer1947/public_html/wp-content/themes/x/functions.php(117): x_boot()
#2 /home/explorer1947/public_html/wp-settings.php(424): include('/home/explorer1...')
#3 /home/explorer1947/public_html/wp-config.php(103): require_once('/home/explorer1...')
#4 /home/explorer1947/public_html/wp-load.php(37): require_once('/home/explorer1...')
#5 /home/explorer1947/public_html/wp-blog-header.php(13): require_once('/home/explorer1...')
#6 /home/explorer1947/public_html/index.php(17): require('/home/explorer1...')
#7 {main}
  thrown in /home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/setup.php on line 35
[25-Oct-2017 16:31:05 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function x_post_thumbnail_width() in /home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/setup.php:35
Stack trace:
#0 /home/explorer1947/public_html/wp-content/themes/x/functions.php(111): require_once()
#1 /home/explorer1947/public_html/wp-content/themes/x/functions.php(117): x_boot()
#2 /home/explorer1947/public_html/wp-settings.php(424): include('/home/explorer1...')
#3 /home/explorer1947/public_html/wp-config.php(103): require_once('/home/explorer1...')
#4 /home/explorer1947/public_html/wp-load.php(37): require_once('/home/explorer1...')
#5 /home/explorer1947/public_html/wp-blog-header.php(13): require_once('/home/explorer1...')
#6 /home/explorer1947/public_html/index.php(17): require('/home/explorer1...')
#7 {main}
  thrown in /home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/setup.php on line 35
[25-Oct-2017 16:31:33 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function x_post_thumbnail_width() in /home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/setup.php:35
Stack trace:
#0 /home/explorer1947/public_html/wp-content/themes/x/functions.php(111): require_once()
#1 /home/explorer1947/public_html/wp-content/themes/x/functions.php(117): x_boot()
#2 /home/explorer1947/public_html/wp-settings.php(424): include('/home/explorer1...')
#3 /home/explorer1947/public_html/wp-config.php(103): require_once('/home/explorer1...')
#4 /home/explorer1947/public_html/wp-load.php(37): require_once('/home/explorer1...')
#5 /home/explorer1947/public_html/wp-blog-header.php(13): require_once('/home/explorer1...')
#6 /home/explorer1947/public_html/index.php(17): require('/home/explorer1...')
#7 {main}
  thrown in /home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/setup.php on line 35
[25-Oct-2017 16:33:10 UTC] PHP Warning:  require_once(/home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/customizer/fonts/data.php): failed to open stream: No such file or directory in /home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/customizer/fonts.php on line 26
[25-Oct-2017 16:33:10 UTC] PHP Fatal error:  require_once(): Failed opening required '/home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/customizer/fonts/data.php' (include_path='.:/opt/alt/php71/usr/share/pear') in /home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/customizer/fonts.php on line 26
[25-Oct-2017 16:33:33 UTC] PHP Warning:  require_once(/home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/customizer/fonts/data.php): failed to open stream: No such file or directory in /home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/customizer/fonts.php on line 26
[25-Oct-2017 16:33:33 UTC] PHP Fatal error:  require_once(): Failed opening required '/home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/customizer/fonts/data.php' (include_path='.:/opt/alt/php71/usr/share/pear') in /home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/customizer/fonts.php on line 26
[25-Oct-2017 16:34:38 UTC] PHP Warning:  require_once(/home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/customizer/fonts/data.php): failed to open stream: No such file or directory in /home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/customizer/fonts.php on line 26
[25-Oct-2017 16:34:38 UTC] PHP Fatal error:  require_once(): Failed opening required '/home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/customizer/fonts/data.php' (include_path='.:/opt/alt/php71/usr/share/pear') in /home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/customizer/fonts.php on line 26
[25-Oct-2017 16:36:08 UTC] PHP Warning:  require_once(/home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/customizer/fonts/data.php): failed to open stream: No such file or directory in /home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/customizer/fonts.php on line 26
[25-Oct-2017 16:36:08 UTC] PHP Fatal error:  require_once(): Failed opening required '/home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/customizer/fonts/data.php' (include_path='.:/opt/alt/php71/usr/share/pear') in /home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/customizer/fonts.php on line 26
[25-Oct-2017 16:37:08 UTC] PHP Warning:  require_once(/home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/customizer/fonts/data.php): failed to open stream: No such file or directory in /home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/customizer/fonts.php on line 26
[25-Oct-2017 16:37:08 UTC] PHP Fatal error:  require_once(): Failed opening required '/home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/customizer/fonts/data.php' (include_path='.:/opt/alt/php71/usr/share/pear') in /home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/customizer/fonts.php on line 26
[25-Oct-2017 16:37:50 UTC] PHP Warning:  require_once(/home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/customizer/fonts/data.php): failed to open stream: No such file or directory in /home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/customizer/fonts.php on line 26
[25-Oct-2017 16:37:50 UTC] PHP Fatal error:  require_once(): Failed opening required '/home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/customizer/fonts/data.php' (include_path='.:/opt/alt/php71/usr/share/pear') in /home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/customizer/fonts.php on line 26
[25-Oct-2017 16:38:01 UTC] PHP Warning:  require_once(/home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/addons/demo/legacy/ajax-handler.php): failed to open stream: No such file or directory in /home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/addons/setup.php on line 77
[25-Oct-2017 16:38:01 UTC] PHP Fatal error:  require_once(): Failed opening required '/home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/addons/demo/legacy/ajax-handler.php' (include_path='.:/opt/alt/php71/usr/share/pear') in /home/explorer1947/public_html/wp-content/themes/x/framework/functions/global/admin/addons/setup.php on line 77

Those parse errors would cause the site to crash completely and be inaccessible. It happens when you add PHP code with invalid syntax. Whenever editing a child theme, it’s best to use something like FTP so if it goes down you can still edit the code of your file without needing to restore a site backup.

Something that might help is copying the entire contents of your file into a syntax checker like this one: https://phpcodechecker.com/

That might give a better clue into what’s wrong.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.