It’s so annoying and so weird. Don’t know if it has ever happened to you, whereas you log in and you are working on an article, then perhaps you try to view it, and WordPress logs you out. The end result is that every time you leave the backend to do something on the front end, WordPress logs you out. Not only is it frustrating but such a waste of time. We have been reading up on this issue as working with technology is always a learning process. This is what we found
The “WordPress keeps logging me out” issue could originate from your browser. The page may be cached in your browser and could be trying to authenticate the session through an expired cookie. Clearing your browser’s cache will fix the issue if this is the case.
Someone else said to check on the address. Apparently, if your WordPress URL and Site Address are different, WordPress will be unable to authenticate your credentials and you will be logged out of the site. To resolve the issue, head to Settings > General in the WordPress admin sidebar and check that your WordPress Address URL and Site Address URL are the same.
Yet another person said to a different person who asked same questions on a forum:
Perhaps you have an overly-aggressive cache on your site or server, which is caching items behind wp-admin (this is rare but it could be possible).
I see you have Cloudflare nameservers on the domain and the service appears to be active. I recommend pausing Cloudflare (which does its own caching) as well as deactivating any server-side caches and caching plugins to see if this helps. If it doesn’t, try deactivating all plugins (it appears you have at least one plugin that modifies login behavior by adding a captcha, so all plugins in addition to caches should be deactivated during research). If you have trouble deactivating all plugins from the WP Admin because of your login issue, you can use the options listed at the link below to deactivate them:
We have tried all the above and are still being logged out. The only good thing about this is that it is only happening to one website among several websites hosted on one server so we can isolate this issue to the one website. If you do have any other suggestions on how to treat this issue, do let us know in the comments below.