Community Forums › Forums › Archived Forums › General Discussion › Line of code crashed entire site
- This topic has 5 replies, 4 voices, and was last updated 12 years, 10 months ago by
AnitaC.
-
AuthorPosts
-
January 19, 2013 at 11:52 pm #13230
Grimwolf
MemberI 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 #13241buddy_boy8403
ParticipantYou 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 #13276Grimwolf
MemberThanks.
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 #13282Susan
ModeratorRead Nick's guide to site recovery tips and tricks here:
http://designsbynickthegeek.com/tutorials/site-recovery-tips-and-tricks
January 20, 2013 at 3:55 pm #13338Grimwolf
MemberAwesome, 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 #13339 -
AuthorPosts
- The topic ‘Line of code crashed entire site’ is closed to new replies.