Skip to main content
By default, WordPress redirects users to the standard wp-admin dashboard after login. You can change this to redirect directly to the MainWP Overview page instead.

What You’ll Learn

  • How to redirect login to the MainWP Overview page
  • Two methods to implement the redirect

Prerequisites

  • MainWP Dashboard installed
  • Choose one method below (using both simultaneously can cause issues)

1

Install Custom Dashboard

Install the Custom Dashboard extension (free).
2

Open the extension

Navigate to MainWP > Extensions > Custom Dashboard.
3

Add the PHP code

Go to the PHP tab and add this code:
function admin_default_page() {
    return 'wp-admin/admin.php?page=mainwp_tab';
}

add_filter('login_redirect', 'admin_default_page');
Custom Dashboard extension PHP tab with login redirect code
4

Save changes

Click Save Changes. The next time you log in, you’ll be redirected to the MainWP Overview page.

Method 2: Edit functions.php

Use this method if you prefer not to install an extension.
If you’re not using a child theme, theme updates will overwrite your changes. Consider using a plugin like Code Snippets instead.
1

Open Theme File Editor

Navigate to WP Admin > Tools > Theme File Editor on your Dashboard site.
2

Select functions.php

In the right sidebar, click on Theme Functions (functions.php).
3

Add the code

Add this code at the end of the file:
function admin_default_page() {
    return 'wp-admin/admin.php?page=mainwp_tab';
}

add_filter('login_redirect', 'admin_default_page');
4

Save the file

Click Update File.Click Update File button

Redirect to a Different Page

To redirect to a different MainWP page, change the URL in the code:
PageURL
Overviewadmin.php?page=mainwp_tab
Manage Sitesadmin.php?page=managesites
Updatesadmin.php?page=UpdatesManage
Clientsadmin.php?page=ManageClients

Self-Check Checklist

  • Code added via Custom Dashboard OR functions.php (not both)
  • Changes saved
  • Tested by logging out and back in
  • Redirects to MainWP Overview page