How to Redirect WordPress Admin Pages to Any Location You Want

x theme
(Last Updated On: July 10, 2014)

If you are facing a situation to redirect WordPress admin pages to some location. The following code will allow you redirect any admin page you want to any location according to the user “capability or role“.

Paste the code inside functions.php.

function wpulti_admin_pages_redirect() {
global $pagenow;
$admin_pages = array(
if(in_array($pagenow, $admin_pages)){
wp_redirect( admin_url('/') ); exit;
add_action('admin_init', 'wpulti_admin_pages_redirect');

About the author


Leave a Reply

Your email address will not be published. Required fields are marked *