Code in .htaccess

If you are using a cache plugin, then there is a slight possibility that it may interfere with the settings of this plugin in the sense that, sometimes you may get a "duplicate" article (not really duplicates but 2 articles about the same subject). To prevent this you can simply turn off the cache for logged-in users in the settings of your plugin. This ensures that nothing of your entire admin interface will ever be cached and so, there will never be a "duplicate" article. Another possible solution is that your plugin allows you to exclude certain URLs from the cache. In that case you should exclude yourwebsite/wp-admin/.

If your cache plugin doesn't have any of the above options, you should do the following:

First action:

  • Log in to your file manager (or FTP) and navigate to the root of your website which, in most cases, simply is /yourwebsite/ but sometimes it is public_html.
  • If there isn’t already an .htaccess file in that folder, create a new plain-text file named .htaccess.
  • Select and copy below code:

<IfModule LiteSpeed>
CacheDisable public /wp-admin/
</IfModule>

  • Paste the code above into your .htaccess file and save. Place it ideally at the very top, before any # BEGIN WordPress or other rules.

Second action:

  • Now navigate to /wp-admin/.
  • If there isn’t already an .htaccess file in that folder, again create an extra text file also named .htaccess.
  • Select and copy below code:

<IfModule mod_headers.c>
Header always set Cache-Control "no-store, no-cache, must-revalidate, max-age=0"
Header always set Pragma "no-cache"
Header always set Expires "0"
</IfModule>

  • Paste the code above into wp-admin/.htaccess and save.

The mentioned cache settings in your plugin or, alternatively, the 2 code snippets, will make it impossible to create "duplicate" articles.