I deleted all cookies on my WordPress website,now I am getting logged out.
-
I wanted to delete all cookies on my wordpress.com website so that one of my popups should continue appearing. This is the code that I wrote in my function.php file:
if (isset($_SERVER['HTTP_COOKIE'])) { $cookies = explode(';', $_SERVER['HTTP_COOKIE']); foreach($cookies as $cookie) { $parts = explode('=', $cookie); $name = trim($parts[0]); setcookie($name, '', 3600000); setcookie($name, '', 3600000, '/'); } }After I saved this I kept on getting logged out of WordPress because I had deleted all my cookies.
I tried removing it from functions.php and saving the file but then I received the following errors:
Something went wrong. Your change may not have been saved. Please try again. There is also a chance that you may need to manually fix and upload the file over FTP.or:
nonce_failureI don’t have any FTP accounts and don’t see how I could make one.
Thank you for your help.
-
Hi there,
We can’t help directly because we don’t host your site on our WordPress.com managed hosting. As a result, we can’t take a closer look at your site.
Instead your host uses the open-source variant of the WordPress platform which functions differently than what we offer here on WordPress.com. Specifically, we do not offer the ability to edit functions.php files on WordPress.com, so we would not be able to advise you on how to do that.
The good news is that help is available here at the open-source WordPress forums: https://wordpress.org/support/forum/how-to-and-troubleshooting/
The folks in that forum are more familiar with these kinds of issues and are in the best position to help. Thanks!
-
- The topic ‘I deleted all cookies on my WordPress website,now I am getting logged out.’ is closed to new replies.