Answer the question
In order to leave comments, you need to log in
How to restrict site access (Wordpress)?
It is necessary to make limited access to the site. After the first entry to the site, the visitor is given 48 hours of full access. After the end of this period, the visitor must register, otherwise he will not have access to the site.
A site on wordpress, you need to make a restriction by ip, for example, or maybe something else.
Can you at least tell me in which direction to dig and look for information?
Answer the question
In order to leave comments, you need to log in
On the first visit, save the value with the time in the cookie, then compare if more than 48 hours, load the stub
And who will need such a site?) It's easier to find another one without such restrictions.
It is quite difficult to restrict a user without registration.
You can set a cookie as Sasha Ulych said , but by logging in from another browser, or by clearing cookies in the browser, the user will again receive 48m hours.
IP doesn’t help much either, because for most it’s dynamic.
Cookie will work for dummies with one computer, and the smarter ones will understand that you can clear cookies :)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question