Title: Install in subdirectory
Last modified: August 31, 2016

---

# Install in subdirectory

 *  [DavidBiesack](https://wordpress.org/support/users/davidbiesack/)
 * (@davidbiesack)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/install-in-subdirectory/)
 * I installed W3 Total Cache on our site (via Dashboard -> plugins) but it appears
   to break the site. I have WordPress installed in the /content directory, not 
   in the root. My root’s .htaccess looks like
 *     ```
       # BEGIN WordPress
       <IfModule mod_rewrite.c>
       RewriteCond %{HTTP_HOST} ^(www.)?mysitename.org$
       RewriteRule ^(/)?$ content/index.php [L]
       RewriteEngine On
       RewriteBase /
       RewriteRule ^index\.php$ - [L]
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteRule . /index.php [L]
       </IfModule>
       # END WordPress
       ```
   
 * After installing and enabling this plugin, my site no longer works. The main 
   page comes up but all other pages result in my site’s error page.
 *     ```
       # BEGIN W3TC Browser Cache
       <IfModule mod_deflate.c>
           <IfModule mod_headers.c>
               Header append Vary User-Agent env=!dont-vary
           </IfModule>
               AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon application/json
           <IfModule mod_mime.c>
               # DEFLATE by extension
               AddOutputFilter DEFLATE js css htm html xml
           </IfModule>
       </IfModule>
       # END W3TC Browser Cache
       # BEGIN W3TC Page Cache core
       <IfModule mod_rewrite.c>
           RewriteEngine On
           RewriteBase /content/
           RewriteCond %{HTTP:Accept-Encoding} gzip
           RewriteRule .* - [E=W3TC_ENC:_gzip]
           RewriteCond %{HTTP_COOKIE} w3tc_preview [NC]
           RewriteRule .* - [E=W3TC_PREVIEW:_preview]
           RewriteCond %{REQUEST_METHOD} !=POST
           RewriteCond %{QUERY_STRING} =""
           RewriteCond %{REQUEST_URI} \/$
           RewriteCond %{HTTP_COOKIE} !(comment_author|wp-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle) [NC]
           RewriteCond "%{DOCUMENT_ROOT}/content/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}" -f
           RewriteRule .* "/content/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}" [L]
       </IfModule>
       # END W3TC Page Cache core
       ```
   
 * but I don’t know how to resolve this.
 * I see cached files:
    content/cache/pageenhanced/mysitename.org/_index.html content/
   cache/pageenhanced/mysitename.org/_index.html_gzip content/cache/pageenhanced/
   www.mysitename.org/_index.html content/cache/pageenhanced/www.mysitename.org/
   _index.html_gzip but nothing under mysitename.org/content
 * I’ve disabled this so that the site is working again. How to I debug/diagnose
   the failing page content? Is it the rewrite rules in my root?
 * [https://wordpress.org/plugins/w3-total-cache/](https://wordpress.org/plugins/w3-total-cache/)

The topic ‘Install in subdirectory’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [DavidBiesack](https://wordpress.org/support/users/davidbiesack/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/install-in-subdirectory/)
 * Status: not resolved