{"id":334,"date":"2013-09-25T10:18:00","date_gmt":"2013-09-25T10:18:00","guid":{"rendered":"http:\/\/blog.shineservers.com\/?p=334"},"modified":"2013-09-25T10:18:00","modified_gmt":"2013-09-25T10:18:00","slug":"clear-google-mod_pagespeed-cache","status":"publish","type":"post","link":"https:\/\/www.shineservers.com\/2013\/09\/25\/clear-google-mod_pagespeed-cache\/","title":{"rendered":"How to clear Google mod_pagespeed Cache"},"content":{"rendered":"<p>At Shine Servers Hosting all our servers have Google\u2019s mod_pagespeed installed. We have seen good website load time decreases, with server load only increasing noticeably when creating the cache from scratch.<\/p>\n<p>The only\u00a0irritating\u00a0thing for developers is that sometimes mod_pagespeed does not recognise that you have updated an image or other files and keeps\u00a0serving\u00a0up the old version. This is espically true when making small changes.<\/p>\n<p>Luckily deleting the cache is quite simple. You\u00a0<strong>need\u00a0<\/strong>root access for this. First SSH to your server. Then type or paste in the following commands;<\/p>\n<p><code>sudo mv \/var\/mod_pagespeed\/cache \/var\/mod_pagespeed\/cache.del<br \/>\nsudo rm -rf \u00a0\/var\/mod_pagespeed\/cache.del<br \/>\nsudo mkdir \/var\/mod_pagespeed\/cache<br \/>\nsudo\u00a0chown nobody:nobody \/var\/mod_pagespeed\/*<br \/>\n<\/code><\/p>\n<p>The first line moves your cache directory the second deletes the now moved directory. This code assumes that you are using the default cache directory, if you have changed the directory\u00a0remember\u00a0to change the code! The third line recreates the cache directory and the fourth sets the correct permissions on the folder.<\/p>\n<p>This will clear all cache on disk there is also cache stored in memory and the only way to remove this is to restart Apache. You should be able to restart Apache from your servers GUI control panel, such as Cpanel.<\/p>\n<p>I will be posting more blog entries about google mod_pagespeed including how to customise it and fix problems it may cause on your website.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>At Shine Servers Hosting all our servers have Google\u2019s mod_pagespeed installed. We have seen good website load time decreases, with server load only increasing noticeably when creating the cache from scratch. The only\u00a0irritating\u00a0thing for developers is that sometimes mod_pagespeed does not recognise that you have updated an image or other files and keeps\u00a0serving\u00a0up the old [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[58,60],"tags":[],"class_list":["post-334","post","type-post","status-publish","format-standard","hentry","category-cpanel-control-panel","category-linux"],"acf":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/posts\/334","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/comments?post=334"}],"version-history":[{"count":0,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/posts\/334\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/media?parent=334"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/categories?post=334"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/tags?post=334"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}