Community Forums › Forums › General Discussion › Line of code crashed entire site
This topic contains 5 replies, has 4 voices, and was last updated by anitac 4 months ago.
-
AuthorPosts
-
January 19, 2013 at 11:52 pm #13230
I was working on trying to add Google Analytics to my site. I followed some instructions I found here; http://www.wpbeginner.com/beginners-guide/how-to-install-google-analytics-in-wordpress/
I was following the part where it says to add this code;(won’t let me paste the code for some reason, it’s found in the section titled Functions.php Method on that page)
To Functions.php.
To accomplish this I went into Appearance > Editor > Theme Functions, and posted the code into the very end, immediately after;genesis_register_sidebar( array(
‘id’ => ‘custom-footer’,
‘name’ => __( ‘Custom Footer’, ‘minimum’ ),
‘description’ => __( ‘This is the custom footer section.’, ‘minimum’ ),
) );I then went into my Google Analytics account and posted the code that gave me over the “// Paste your Google Analytics code from Step 6 here” line.
I hit Update File, it starts loading, and boom; the whole site crashes. Nothing will load.
I was able to get back into that section by hitting Back, and I removed the code I had added and hit Update File again, but it is still crashed. I assume it wasn’t able to actually TRY updating the file again since the whole site is already crashed, including the Dashboard.
Does anyone know how I can fix this, and what the proper way would be to add Google Analytics code to the site?January 20, 2013 at 12:32 am #13241You don’t need to modify the functions.php file to include google analytics code. Instead, go to wp-admin > Genesis > Scroll to the very bottom and paste your analytics code into the second box from the bottom to have it output in the wp_head() section.
That’s all – your analytics will be set up.
January 20, 2013 at 9:16 am #13276Thanks.
With that out of the way, does anyone know then how to un-crash my site? The Dashboard is crashed too, so I can’t just undo the code change I made. I’m curious how something that simple could have even caused such a massive issue. It’s not like I messed with any of the existing code.January 20, 2013 at 10:48 am #13282Read Nick’s guide to site recovery tips and tricks here:
http://designsbynickthegeek.com/tutorials/site-recovery-tips-and-tricks
Susan @ Graphically Designing I’d love to customize your website! I tweet!
I’ve taken up the challenge! – help me answer some of the unanswered postsJanuary 20, 2013 at 3:55 pm #13338Awesome, thank you. Following that guide I was able to open the file in FTP and remove the changes I made there, upload it to the site and it was fixed.
January 20, 2013 at 3:56 pm #13339If it was your functions.php file that you were modifying, just copy the functions.php file from your original zip file over to the theme file via FTP and the site should come back.
Twitter Handles: @thecre8tivediva | Website: Cre8tiveDiva.com | LinkedIn Group: http://goo.gl/nNe1m
Why Not Take The Challenge! – Help us answer some of the unanswered posts -
AuthorPosts
The topic ‘Line of code crashed entire site’ is closed to new replies.