Title: Cache Folder path
Last modified: April 3, 2017

---

# Cache Folder path

 *  Resolved [dblinks](https://wordpress.org/support/users/dblinks/)
 * (@dblinks)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/cache-folder-path/)
 * Good evening Frank,
 * At the bottom of the AO settings page it says:
 * Cache folder /srv/12flat/wp-content/cache/autoptimize/
 * Inspecting a page for errors chrome is looking for my CDN path, which is set 
   up correctly based on /wp-content…/ urls for images and such.
 * My cdn is cdn.12flat.com and is in AO as //cdn.12flat.com/
 * The AO files are generated and put in the above mentioned folder:
    [https://12flat.com/wp-content/cache/autoptimize/js/autoptimize_6a5d6184c93627baf50d55092e8d23c2.js](https://12flat.com/wp-content/cache/autoptimize/js/autoptimize_6a5d6184c93627baf50d55092e8d23c2.js)
 * but the error is 404 looking for it in the cdn… [https://cdn.12flat.com/wp-content/cache/autoptimize/js/autoptimize_6a5d6184c93627baf50d55092e8d23c2.js](https://cdn.12flat.com/wp-content/cache/autoptimize/js/autoptimize_6a5d6184c93627baf50d55092e8d23c2.js)
 * Is this the expected behavior?
 * Thanks for any guidance you can provide.
 * Stu

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/cache-folder-path/#post-8989317)
 * all indeed seems to be working as expected Stu, except for the fact that the 
   autoptimized file can’t be found on the CDN-url.
 * your CDN indeed works for your images;
    [https://12flat.com/wp-content/uploads/2017/01/12flat-logo-drop.png](https://12flat.com/wp-content/uploads/2017/01/12flat-logo-drop.png)
   [https://cdn.12flat.com/wp-content/uploads/2017/01/12flat-logo-drop.png](https://cdn.12flat.com/wp-content/uploads/2017/01/12flat-logo-drop.png)
 * but it does not seem to work for the autoptimized JS:
    [https://12flat.com/wp-content/cache/autoptimize/js/autoptimize_6a5d6184c93627baf50d55092e8d23c2.js](https://12flat.com/wp-content/cache/autoptimize/js/autoptimize_6a5d6184c93627baf50d55092e8d23c2.js)
   [https://cdn.12flat.com/wp-content/cache/autoptimize/js/autoptimize_6a5d6184c93627baf50d55092e8d23c2.js](https://cdn.12flat.com/wp-content/cache/autoptimize/js/autoptimize_6a5d6184c93627baf50d55092e8d23c2.js)
 * so how did you set up your CDN?
 * frnak
 *  Thread Starter [dblinks](https://wordpress.org/support/users/dblinks/)
 * (@dblinks)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/cache-folder-path/#post-8991069)
 * Hi and thanks.
 * I pointed an A record for cdn.12flat.com in DNS to the IP of my server and created
   a path to it with my ssl and port. The path to my subdomain folder is /srv/12flat-
   images/ (as opposed to /srv/12flat/ which I have a copy of /wp-content and /wp-
   includes within. I looked in the db to find where AO specifies the path but you
   must be just grabbing that from wp so I cannot override.
 * In DB (for images) working fine.
    upload_path – /srv/12flat-images/wp-content/
   uploads upload_url_path – [https://cdn.12flat.com/wp-content/uploads](https://cdn.12flat.com/wp-content/uploads)
 * Within the plugin (CDN Enabler)
    CDN URL [https://cdn.12flat.com](https://cdn.12flat.com)
   Included Directories wp-content,wp-includes Relative Path (default: enabled).
    -  This reply was modified 9 years, 1 month ago by [dblinks](https://wordpress.org/support/users/dblinks/).
      Reason: for notify
 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/cache-folder-path/#post-8991173)
 * ah, now I understand; AO expects the CDN to mirror the directory structure of
   the origin site (as a typical pull CDN works) and that files cached in the origin
   server are automatically available on the CDN (again; pull CDN).
 * if however you have a subdomain that points to a different place on the filesystem
   which is not in sync with the normal wordpress filesystem (specifically changes
   made in wp-content/cache/autoptimize) then this indeed will not work (as you’re
   not in a pull CDN scenario there).
 * maybe symlinking /srv/12flat/wp-content/cache to /srv/12flat-images/wp-content/
   cache can be a simple workaround?
 *  Thread Starter [dblinks](https://wordpress.org/support/users/dblinks/)
 * (@dblinks)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/cache-folder-path/#post-8991649)
 * I can symlink via cli but would rather hard code it in a nginx server block via
   a custom .conf file as I don’t want any conflicts with other sites on this machine.
 * I’m not exactly sure the syntax yet in that .conf file to pair/symlink them.
 * Thanks for your suggestion Frank.
 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/cache-folder-path/#post-8991693)
 * if you can configure nginx to look at /srv/12flat-images/wp-content/ by default
   for the cdn subdomain, but at /srv/12flat/wp-content/cache/autoptimize for requests
   containing cache/autoptimize, then you’d be out of the woods. don’t know the 
   first thing about nginx though … 🙂
 *  Thread Starter [dblinks](https://wordpress.org/support/users/dblinks/)
 * (@dblinks)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/cache-folder-path/#post-8992024)
 * OK, so this is interesting (based on your last conclusion). In AO I made //12flat.
   com/ the cdn and left [https://cdn.12flat.com](https://cdn.12flat.com) as the
   domain for the CDN Enabler plugin.
 * No error on the AO js file now… all other assets are using the cdn.
 * Your support exceeds expectations and suggestions push me to find ways to improve.
 * 5 stars.
 *  Thread Starter [dblinks](https://wordpress.org/support/users/dblinks/)
 * (@dblinks)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/cache-folder-path/#post-8992125)
 * Probably will work just leaving the cdn blank in your plugin. As you said I’m
   not using “pull” so until I figure that out the site is performing well enough.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Cache Folder path’ is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [dblinks](https://wordpress.org/support/users/dblinks/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/cache-folder-path/#post-8992125)
 * Status: resolved