WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/wp logout

Description

Log the current user out, by destroying the current user session.

Usage

 <?php wp_logout(); ?> 

Parameters

This function does not accept any parameters.

Return values

None.

Example

<?php wp_logout(); ?>

Change Log

Since: 2.5.0

Source File

wp_logout() is located in wp-includes/pluggable.php.

Related

Login Tags: is_user_logged_in(), wp_login_form(), wp_loginout(), wp_logout(), wp_register()
Login URLs: wp_login_url(), wp_logout_url(), wp_lostpassword_url(), wp_registration_url()

See also index of Function Reference and index of Template Tags.