I have renamed wp-admin and now need to make changes

I have renamed wp-admin and now need to make changes to whmcs_multisite.php so that WHMCS can login to my Wordpress Multisite.
Where in whmcs_multisite.php should i make the changes?
Thanks

  • Predrag Dubajic
    • Support

    Hey @Nico,

    Hope you're doing well today :slight_smile:

    There are three mentions in the WHMCS for the wp-admin folder so let's try changing that and see if will work after that.
    Here are the files and lines of code where it's located:
    1. \whmcs-multisite-provisioning \dash-notice\wpmudev-dash-notification.php on line 53
    2. \whmcs-multisite-provisioning\whmcs-mrp.php on line 134
    3. \whmcs-multisite-provisioning\whmcs\modules\servers\whmcs_multisite\whmcs_multisite.php on line 514

    Let us know if this worked for you.

    Best regards,
    Predrag

  • Nico
    • Flash Drive

    Ok i had a trailing / in WHMCS host name, that is sorted, but it still gives errors.
    Could the target="wpadmin"> be the problem? See below.
    $code = '<form action="http://'.$params["serverhostname"].'/wp-login.php" method="post" target="wpadmin">

  • Predrag Dubajic
    • Support

    Hi Nico,

    Thanks for the additional info.

    Since you are using iThemes security and your login page goes to /not_found I think this is because the Hide Login Area is enabled in your iThemes security settings.

    See the screenshot attached from my installation, you can follow this to find your new login page path.

    Hope this helps.

    Best regards,
    Predrag

  • Nico
    • Flash Drive

    Hi Predrag
    You are correct. I did enable it and named it something else. Then i changed all the lines you gave me right on top of this page but it does not redirect to the new name i have given it. When you look at the code in WHMCS, see attached image, the redirect path is correct in WHMCS. it has the new name i have entered in iThemes security but when i click Login to Wordpress in WHMCS Server setup, i get the not found page because it goes to wp-login.php see second image.
    I am doing something wrong somewhere...
    Sorry about the trouble.
    Regards
    Nico

  • Adam Czajczyk
    • Support Gorilla

    Hey Nico,

    I hope you're well today!

    I have checked the plugin's code and it seem there are two more locations there to be taken care of.

    Inside this file

    whmcs-multisite-provisioning\whmcs\modules\servers\whmcs_multisite\whmcs_multisite.php

    About line 511:

    $code = '<form action="http://'.$params["serverhostname"].'/wp-login.php" method="post" target="wpadmin">

    About line 536:

    <a href="http://<?php echo $params["serverhostname"]; ?>/wp-login.php?log=<?php echo $params["serverusername"] .'&pwd=' . $params['serverpassword']; ?>" target="wpadmin" style="color:#cc0000">Login to Wordpress</a>

    As you can see, there's a reference to "wp-login.php" in both this line. That said, replace please the "wp-login.php" part with the new name and you should be good to go.

    Let me know please if it helped!

    Cheers,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.