WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. easywpquestion
    Member
    Posted 10 months 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?

    http://wordpress.org/plugins/w3-total-cache/

  2. Anthony Somerset
    Member
    Posted 10 months 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
    Member
    Posted 10 months ago #

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

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.