{"id":7,"date":"2014-12-28T08:42:43","date_gmt":"2014-12-28T08:42:43","guid":{"rendered":"http:\/\/bendustries.org\/wp\/?p=7"},"modified":"2015-02-02T07:53:13","modified_gmt":"2015-02-02T07:53:13","slug":"a-bad-theme-broke-wordpress","status":"publish","type":"post","link":"https:\/\/bendustries.org\/wp\/?p=7","title":{"rendered":"A Bad Theme Broke WordPress"},"content":{"rendered":"<p>In getting set up to start using bendustries.org, I found my child theme on bendustries.co was inactive. In trying to fix it, I broke my site entirely, leaving only a blank white page everywhere I went. Here&#8217;s how I fixed it.<br \/>\n<!--more--><br \/>\nBendustries.co was the first site I&#8217;d had for a long, long time. Long enough ago that WordPress wasn&#8217;t around when I was last running any sites. Apparently, I took a very hack approach to customizing the Graphene theme I was using, as the child theme I had created wasn&#8217;t working, and yet the site was displaying exactly as I had set it up.<\/p>\n<p>At any rate, in trying to fix the child theme, I broke my site entirely. The only page I could get to display was the readme.html in the root of the WordPress installation directory. Searching around the web, I found one page that looked like it might be able to help, <a title=\"Velvet Blues - Uh Oh! My WordPress Blog Is Blank!!!\" href=\"http:\/\/www.velvetblues.com\/web-development-blog\/my-wordpress-blog-is-blank\/\" target=\"_blank\">http:\/\/www.velvetblues.com\/web-development-blog\/my-wordpress-blog-is-blank\/<\/a>. A lot of it seemed more involved than I thought should be necessary, but I downloaded all my WordPress files anyway, in case a full reinstall of WP should be needed.<\/p>\n<p>Remembering back to a problem I&#8217;d run into with another WP site I manage, when a bad plugin broke WP, I wondered if rooting around in the MySQL tables where the WP data is stored might help. Using PHPMyAdmin, I navigated into the WP database and found the &#8216;wp-options&#8217; table. In that table, there are &#8216;template&#8217; and &#8216;stylesheet&#8217; fields. In my case, the template was &#8216;graphene&#8217;, while the stylesheet was &#8216;graphene-child&#8217;.<\/p>\n<p>Before I touched anything, I exported this table out of the db. In this case, a Quick export as a .sql file was sufficient. In case anything else went wrong, at least I could easily restore this table as it was before I&#8217;d touched it.<\/p>\n<p>Backup done, I went back into the wp-options table and edited the stylesheet field to also be &#8216;graphene&#8217;. I refreshed the page and I was back in business.<\/p>\n<p>Lesson being, if you break your WP site with a bad theme update, you might have a look in the WP database to see if a stylesheet and\/or template fix might get you back up and running. As long as you&#8217;re careful and back up anything you might break, this might be the easiest way of fixing a bad update.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In getting set up to start using bendustries.org, I found my child theme on bendustries.co was inactive. In trying to fix it, I broke my site entirely, leaving only a blank white page everywhere I went. Here&#8217;s how I fixed it.<\/p><p><a class=\"more-link block-button\" href=\"https:\/\/bendustries.org\/wp\/?p=7\">Continue reading &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[8,7,6,3,4,5],"class_list":["post-7","post","type-post","status-publish","format-standard","hentry","category-wordpress","tag-debugging","tag-disaster-recovery","tag-dr","tag-wordpress","tag-wp","tag-wp-themes"],"_links":{"self":[{"href":"https:\/\/bendustries.org\/wp\/index.php?rest_route=\/wp\/v2\/posts\/7","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bendustries.org\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bendustries.org\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bendustries.org\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bendustries.org\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7"}],"version-history":[{"count":3,"href":"https:\/\/bendustries.org\/wp\/index.php?rest_route=\/wp\/v2\/posts\/7\/revisions"}],"predecessor-version":[{"id":24,"href":"https:\/\/bendustries.org\/wp\/index.php?rest_route=\/wp\/v2\/posts\/7\/revisions\/24"}],"wp:attachment":[{"href":"https:\/\/bendustries.org\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bendustries.org\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bendustries.org\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}