Moving wp-admin to a different to a subdomain

I am trying to move just the wp-admin side of things to a different server, in order to not have admin traffic impact end-user activity. Any best practices for handling this. I’ve actually done this already, I just want to see if someone has a better way to do this.

Related posts

Leave a Reply

2 comments

  1. I’m using BitNami WAMPStack, but theoretically it could be used for a Linux installation

    Here is how I did it:

    1) Installed BitNami WAMPStack on secondary server.

    2) Deleted the secondary servers’ htdocs folder and copied the entire htdocs folder from the primary to the secondary server.

    3) open “C:Program FilesBitNami WAMPStackappswordpresshtdocswp-config.php” and edit section for MySQL hostname on the secondary server. Point it to the primary serve hostname/IP.

    4) Enable the secondary box to connect to the primary mysql server.
    -Open MySQL Workbench
    -Open Admin
    -Go to Users and Privileges under Security section on the left pane
    -Add Account
    -Username should be root (or whatever the username is specified in the wp-config.php), and the password, add IP address of the secondary box.
    -Then go to adminstrative roles and click DBA, then click apply.

    5) Edit the login feature so it doesn’t redirect to the primary box
    edit “C:Program FilesBitNami WAMPStackappswordpresshtdocswp-includeslink-template.php”
    add on line 1940 the following block of code
    // For admin site change
    $url = str_replace( ‘://www.’, ‘://admin.www.’, $url );

    6) on primary box, Rename “C:Program FilesBitNami WAMPStackappswordpresshtdocswp-admin” to “C:Program FilesBitNami WAMPStackappswordpresshtdocswp-admin_disabled”

    7) on primary box, Create a new folder “C:Program FilesBitNami WAMPStackappswordpresshtdocswp-admin”
    In that folder create a file called index.php, and paste the code block below into the file and save

    8) wampstackMySQL has been stopped on secondary, since there is no need to have in running.

    9) Need to change the upload path for content for the media library.

    a. On primary, need to share (smb) out “C:Program FilesBitNami WAMPStackappswordpresshtdocswp-contentuploads” folder and give Full Control to Everyone on Sharing and Permissions. (could be more secure, however the wampstackApache service seems to not want use a domain account to run).
    b. Had to disable W3 Total Cache plugin as it was not working well with the changes.
    c. Make the following changes on the newly configured admin portal, go to the new admin portal on http://admin.www.your-domain-name.com/, go to the Settings -> Media and put the SMB Share hostname-primary-serveruploads in the “Store uploads in this folder”

    When installing new plug-ins, it will be necessary to sync files up periodically to ensure both frontend and backend functionality. Testing should always be done before introducing new changes to ensure that both sides continue to work. It’s not perfect, but it works.

  2. Short answer: you can’t.

    But what you can do is add a caching plugin to your site. User content (the front end) will be served from a static page cache. This means admin activity won’t impact front-end use until you actually lock in an update and flush the cache.

    Here are some of the more popular caching systems to get you started.