• Hi everyone,

    since ca. 4-6 weeks I have caching problems in my WP backend.

    – modifications don’t show up (in backend)
    – e.g. I delete users; have to refresh like 5-6 times or switch to anonymous mode (Chrome) to see the change happening in backend
    – or: I switch language in backend (settings > general) backend is still in previous language; after lots of refreshing it then changes
    – etc pp.

    I talked to various Devs and also to my hoster.

    It looks very much as if caching comes from browser caching which is indeed set in htaccess.

    Hoster said its possible to exclude “wp-admin” (WP backend) from caching.

    But I don’t know hot to do that.

    Question: Could anyone please help me out and give me the “code” for excluding “Wp-admin” in browser caching in htaccess file?

    The current code in htaccess is:

    ————-

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    # Deflate Compression by FileType
    <IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE text/xml
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE text/javascript
    AddOutputFilterByType DEFLATE application/xml
    AddOutputFilterByType DEFLATE application/xhtml+xml
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/atom_xml
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE application/x-javascript
    AddOutputFilterByType DEFLATE application/x-shockwave-flash
    </IfModule>

    <ifModule mod_gzip.c>
    mod_gzip_on Yes
    mod_gzip_dechunk Yes
    mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
    mod_gzip_item_include handler ^cgi-script$
    mod_gzip_item_include mime ^text/.*
    mod_gzip_item_include mime ^application/x-javascript.*
    mod_gzip_item_exclude mime ^image/.*
    mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
    </ifModule>

    <IfModule mod_headers.c>

    <filesMatch “.(jpg|jpeg|png|gif|ico)$”>
    Header set Cache-Control “max-age=31536000, public”
    </filesMatch>

    <filesMatch “.(css|js)$”>
    Header set Cache-Control “max-age=604800, public”
    </filesMatch>

    Header set Cache-Control “max-age=86400, public”

    </IfModule>

The topic ‘Disabling WP-Admin Caching in htaccess’ is closed to new replies.