How to Logout WordPress and Redirect to Home Page

We can do like this:

<a href="<?php echo wp_logout_url( home_url() ); ?>">Logout</a>

,