WordPress.org

Ready to get started?Download WordPress

Codex

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

Function Reference/wp logout

Contents

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

<p><?php wp_logout(); ?></p>

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.