Search code examples
wordpresscachingoverwriteposting

"Add post" sometimes overwriting a previous post Wordpress


I have this issue with my wordpress site, sometimes posting a new post will overwrite a previous post. Specially one of my writers is suffering from this problem very much. I am using litespeed cache. I've also enabled Redis object caching on my website recently but I had the problem before enabling it too.


Solution

  • I resolved this by adding a htaccess file with below content in wp-admin folder.

    <IfModule mod_expires.c>
     ExpiresActive On
     ExpiresByType text/html "access plus 0 seconds"
    </IfModule>
    
    RewriteRule ^(.*)$ $1 [NS,E=no-gzip:1,E=dont-vary:1]