Change cookie name's

I have seen other wordpress sites remove the test cookie and change the name for other cookies on that site. I would like to remove the test cookie and rename the other cookies.

How can I do this ?

ps If you want to know why well… it’s because it’s been done by other sites and I would like to adopt that on mine.

Well, are you talking about a cookie or the default cookie name?
To set a cookie, this will work:
$cookie_name = “user”;
$cookie_value = “John Doe”;
setcookie($cookie_name, $cookie_value, time() + (86400 * 30), “/”); // 86400 = 1 day
Therefore you could read the other cookie and just save a new one. But, if you are talking about the “SESSION-Cookie” which is a different thing, then it depends on your version of PHP and also the server type, Windows or Apache… Hope that helps…

This is what is known as the “Bandwagon Fallacy”. So an so does it, Everybody is doing it.

First learn why you would want to do this. Doing it just because so and so does it is a pretty bad reason especially when it comes to wordpress.

Here’s a site that talks about setting cookies thru WP. Maybe it might help you… WP-Cookies

Thank you for your replies I will look into this more thank you both.

ps for some reason I could not log in from my other account like my ip had been blacklisted.

Sponsor our Newsletter | Privacy Policy | Terms of Service