{"id":223,"date":"2013-12-12T00:04:01","date_gmt":"2013-12-12T06:04:01","guid":{"rendered":"http:\/\/www.evermoretechnologies.com\/blog\/?p=223"},"modified":"2013-12-12T00:04:01","modified_gmt":"2013-12-12T06:04:01","slug":"flush-the-cache-using-sql-in-drupal-7","status":"publish","type":"post","link":"https:\/\/www.evermoretechnologies.com\/blog\/2013\/12\/flush-the-cache-using-sql-in-drupal-7\/","title":{"rendered":"Flush the cache using SQL in Drupal 7"},"content":{"rendered":"<p>I had to flush the cache on a Drupal 7 site and couldn&#8217;t get to the admin. \u00a0So, I needed to flush the cache straight on the database layer.<\/p>\n<p>Luckily all the cache tables are named cache_{something}. \u00a0Flushing the cache was as simple as running this command on the database:<\/p>\n<p>[code language=&#8221;sql&#8221;]<br \/>\nTRUNCATE TABLE {database_name}.cache_block;<br \/>\nTRUNCATE TABLE {database_name}.cache_bootstrap;<br \/>\nTRUNCATE TABLE {database_name}.cache_field;<br \/>\nTRUNCATE TABLE {database_name}.cache_filter;<br \/>\nTRUNCATE TABLE {database_name}.cache_form;<br \/>\nTRUNCATE TABLE {database_name}.cache_image;<br \/>\nTRUNCATE TABLE {database_name}.cache_menu;<br \/>\nTRUNCATE TABLE {database_name}.cache_metatag;<br \/>\nTRUNCATE TABLE {database_name}.cache_page;<br \/>\nTRUNCATE TABLE {database_name}.cache_path;<br \/>\nTRUNCATE TABLE {database_name}.cache_token;<br \/>\nTRUNCATE TABLE {database_name}.cache_update;<br \/>\nTRUNCATE TABLE {database_name}.cache_views;<br \/>\nTRUNCATE TABLE {database_name}.cache_views_data;<br \/>\n[\/code] <\/p>\n","protected":false},"excerpt":{"rendered":"<p>I had to flush the cache on a Drupal 7 site and couldn&#8217;t get to the admin. \u00a0So, I needed to flush the cache straight on the database layer. Luckily&#8230; <a href=\"https:\/\/www.evermoretechnologies.com\/blog\/2013\/12\/flush-the-cache-using-sql-in-drupal-7\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/223"}],"collection":[{"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/comments?post=223"}],"version-history":[{"count":0,"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/223\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/media?parent=223"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/categories?post=223"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/tags?post=223"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}