{"id":2526,"date":"2026-10-20T08:34:13","date_gmt":"2026-10-20T07:34:13","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/autoptimize-can-not-write-to-cache-directory\/"},"modified":"2026-10-20T08:41:01","modified_gmt":"2026-10-20T07:41:01","slug":"autoptimize-can-not-write-to-cache-directory","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/caching\/autoptimize-can-not-write-to-cache-directory\/","title":{"rendered":"Autoptimize can not write to the cache directory: how to fix the permissions"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This Autoptimize error means the web server is not allowed to create files in <code>wp-content\/cache\/<\/code>. It usually shows up after a move to a new host or VPS, when the files were copied by a different system user than the one PHP runs as. It is a server setting, so nothing in GeoDirectory needs to change.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Check that <code>wp-content\/cache\/<\/code> exists. If it does not, create it.<\/li>\n\n\n\n<li>Make sure the <code>wp-content<\/code> and <code>wp-content\/cache<\/code> folders are owned by the user PHP runs as on your server. On a VPS your control panel or host can tell you which user that is.<\/li>\n\n\n\n<li>Set folder permissions to 755 and file permissions to 644, which is the usual setup for WordPress. Avoid 777, which lets anyone on the server write to the folder.<\/li>\n\n\n\n<li>Go back to Settings &gt; Autoptimize and save the settings again. The warning should clear.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">If you cannot change ownership yourself, ask your host to &#8220;make wp-content writable by the web server user&#8221;. They will know what that means for their setup. For anything else about Autoptimize, the Autoptimize support forum on WordPress.org is the right place to ask.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once the cache works, see <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/caching\/geodirectory-and-caching-compatibility\/\">GeoDirectory and Caching Compatibility<\/a> for the settings that keep maps and search working with an optimisation plugin.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This Autoptimize error means the web server is not allowed to create files in wp-content\/cache\/. It usually shows up after a move to a new host or VPS, when the files were copied by a different system user than the one PHP runs as. It is a server setting, so nothing in GeoDirectory needs to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"article\/tags":[],"article\/categories":[211,435],"class_list":["post-2526","gd_place","type-gd_place","status-publish","hentry","gd_placecategory-tips-tricks-more","gd_placecategory-caching"],"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2526","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/types\/gd_place"}],"author":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/comments?post=2526"}],"version-history":[{"count":1,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2526\/revisions"}],"predecessor-version":[{"id":2704,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2526\/revisions\/2704"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=2526"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=2526"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=2526"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}