pro site - change /wp-admin url

I change my /wp-admin url to be /minside and then I blocked /wp-admin.....

How do I change this url in pro-site when new users register ?

  • Predrag Dubajic

    Hey Sölvi,

    Hope you're doing well today :slight_smile:

    Pro Sites uses default WP get_admin_url function to return admin URL of subsites and it seems like custom URL doesn't get picked up with that.

    I believe that this kind of change would require changes to plugin files itself, I'll forward this to our Second Level Support dev guys so they can check it out.
    Developer response might be slower than usual staff response, so we appreciate your patience on this.

    If you're in a hurry to get this sorted you may want to seek for help on our Jobs board.
    Please note that, no WPMU official staff members are allowed to work in the job board.

    Best regards,

  • Panos

    Hi there Sölvi ,

    Sincere apologies, this ticket somehow slipped from our attention. So sorry if this caused any troubles.

    One way to do this, is to use the "admin_url" filter, but that is a bit risky, as if it's not used properly it can change the admin url where you don't want it to. In order to use this filter you should check the current page id, so it would change it only on the pro sites page. Here is an example:

    add_filter( 'admin_url', function( $url, $path, $blog_id ){
    	global $post;
    	if( ! isset( $post->ID ) || $post->ID != 186 ){
    		return $url;
    	return '';
    }, 10, 3 );

    You need to replace the page id and the custom admin url, then you can add this snippet in a mu-plugin.

    One other way is to modify file wp-content/plugins/pro-sites/pro-sites-files/lib/ProSites/View/Front/Gateway.php at around line 701 where you can replace
    $content .= '<br />' . esc_html__( 'Admin URL: ', 'psts' ) . '<a href="' . esc_url( $blog_admin_url ) . '">' . esc_html__( $blog_admin_url ) . '</a></p>';
    $content .= '<br />' . esc_html__( 'Admin URL: ', 'psts' ) . '<a href=""></a></p>';

    The drawback here is that it needs to be repeated with each plugin update. Therefor I would recommend the first option, but you need to be careful with the page id


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.