How to generate expiring URL of the page?

I have a Wordpress site with sensitive private data and I email the link of the whole page to a client via email etc.

How can I expire the link after 1 Session, So if a client opened the link to visit the site and closed the page that link wont work anymore and the Wordpress is not accessible, saying the session has expired Please ask for another session.

How can I do that?

Topic site-url user-access urls plugins Wordpress

Category Web


This plugin fits most of the requirements that you need:

https://wordpress.org/plugins/public-post-preview/

It allows you to share a preview of the page to anyone with the link.

You can modify the expiry time with a filter.

add_filter( 'ppp_nonce_life', 'my_nonce_life' );
function my_nonce_life() {
    return 60 * 60 * 24 * 1; // 1 day
}

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.