Title: Destroy Session
Last modified: August 31, 2016

---

# Destroy Session

 *  [patdundee](https://wordpress.org/support/users/patdundee/)
 * (@patdundee)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/destroy-session/)
 * Hi Guys
 * I am trying to destroy the seeions but it does not seem to work.
 * I have tried both of the following, and neither work. Any advice please 🙂
 *     ```
       $wp_session = WP_Session::get_instance();
       if (isset($wp_session['sessionName'])) {
       unset($wp_session['sessionName'];
       }
       ```
   
 * and
 *     ```
       $wp_session = WP_Session::get_instance();
       if (isset($wp_session['sessionName'])) {
       wp_session_unset['sessionName'];
       }
       ```
   
 * [https://wordpress.org/plugins/wp-session-manager/](https://wordpress.org/plugins/wp-session-manager/)

Viewing 1 replies (of 1 total)

 *  [SunilPrajapati](https://wordpress.org/support/users/sunil25393/)
 * (@sunil25393)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/destroy-session/#post-8154099)
 * You missed to complete bracket. You below code and try again.
 *     ```
       $wp_session = WP_Session::get_instance();
       if (isset($wp_session['sessionName'])) {
       unset($wp_session['sessionName']);
       }
       ```
   
    -  This reply was modified 9 years, 8 months ago by [SunilPrajapati](https://wordpress.org/support/users/sunil25393/).

Viewing 1 replies (of 1 total)

The topic ‘Destroy Session’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-session-manager_272e38.svg)
 * [WP Session Manager](https://wordpress.org/plugins/wp-session-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-session-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-session-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-session-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-session-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-session-manager/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [SunilPrajapati](https://wordpress.org/support/users/sunil25393/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/destroy-session/#post-8154099)
 * Status: not resolved