The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

W3 Total Cache
Clear Page Cache with Chron Job (3 posts)

  1. easywpquestion
    Posted 3 years ago #

    After posting, I have to clear the page cache manually to update the pages accessed by category. Is there a way to set up a cron job to clear the page cache a couple of times a day?


  2. Anthony Somerset
    Posted 3 years ago #

    install wp-cli and then use the wp-cli commands provided by the plugin to clear the cache via the command line, and then you can set the command as a cron job

    the command may look like this: wp --path=<path to wp doc root> w3-total-cache flush

    you need to specify the path so that it knows which path to operate on as wp expects by default to work on the install found directly in the path you are in, which may not be the same as the home directory for the user that runs the cron task

    also try making sure you have enabled category page purging as well in the page cache config

  3. easywpquestion
    Posted 3 years ago #

    Is there not just an existing php file I could run?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • W3 Total Cache
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.