WordPress Varnish
XMLRPC calls don't trigger purge (4 posts)

  1. johnyma22
    Posted 5 years ago #

    XMLRPC calls don't purge the cache so any API delivered posts don't clear the cache.

    Any idea?


  2. hprinssen
    Posted 5 years ago #

    I have a similar issue.
    To understand what the problem is I put an echo of the errno and errstr in the wp-varnish.php code..
    it gives me a 13 permission denied.

    I can telnet to the port on the server itself, but somehow from within wordpress it doesn't work.

    It might be the same issue you're having

  3. hprinssen
    Posted 5 years ago #

    Some progress

    I did 2 things
    1. modifies the wp-varnish.php a little to look like this
    if (!$varnish_sock) {
    error_log("wp-varnish error: $errstr ($errno)");
    echo $errstr;
    } else {
    $out = "url.purge $wpv_url \r\n";
    #$out .= "Host: $wpv_host\r\n";
    #$out .= "Connection: Close\r\n\r\n";
    $out .= "quit";
    echo $out;
    fwrite($varnish_sock, $out);

    echoes are not necessary but helped me find the issue.
    It seems the PURGE is not accepted as all is lowercase and the call is different.
    Also the Host and Connection Close are not needed.

    2. This seemed to be the biggest issue on my Centos installation
    run 'setsebool -P httpd_can_network_connect 1'

  4. johnyma22
    Posted 5 years ago #

    Could you contact me so we can talk some more about this? Ta :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress Varnish
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic