• Resolved mrimpact

    (@mrimpact)


    Hello how are you?

    I need your help.

    Can you tell me the direct link to PURGE ALL cache?

    I have a custom dashboard for clients, I would like to insert this PURGE ALL into another button.

    Thank you!

Viewing 7 replies - 1 through 7 (of 7 total)
  • stanley@litespeed

    (@stanleylitespeed)

    Hi @mrimpact, may I know are your dashboard is part of WordPress? We suggest you use our API to purge the cache: https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:api#litespeed_cache_apipurge_all

    Thread Starter mrimpact

    (@mrimpact)

    Hi @stanleylitespeed
    Thanks for your quick reply.

    The dashboard is wordpress, but we have created some custom dashboard links that provide better support for our clients.

    I don’t understand that very well …

    Would you help me?
    I need to create a URL for PURGE ALL cache: example

    https://example.com/wp-admin/purge_all

    THANKS AGAIN!

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    The easiest way is that you can create a php file , with code:

    <?php
    header('X-LiteSpeed-Purge: *');
    exit;

    let’s say you name it purge.php

    then every time you access https://your_domain.com/purge.php

    it will purge everything.

    But you better add some authentication and verification to prevent it from public access.

    Best regards,

    Thread Starter mrimpact

    (@mrimpact)

    @qtwrk

    Very good!

    Worked well!
    But this way the client clicks on this LINK, he goes out of the wordpress panel.

    Is there any redirect or something, to get the client back to the wordpress panel?

    Thank you so much again!

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    You can add another header function to redirect , like

    header('Location: https://www.example.com/wp-admin');

    or make the link opens with new browser windows , like

    <a href="https://www.example.com/purge.php" target="_blank">press me to purge all</a>

    the above code will open a new windows to that URI , so user won’t leave current page.

    Best regards,

    Thread Starter mrimpact

    (@mrimpact)

    Everything perfect now.

    Thank you!
    Have a great night!

    • This reply was modified 7 years ago by mrimpact.
    Plugin Support qtwrk

    (@qtwrk)

    My pleasure to help 🙂

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘PURGE ALL LINK’ is closed to new replies.