WPCloudDeploy Documentation

_Re-link an existing server

Introduction

If you ever encounter a situation where you have lost the server record but the sites still exist on the server then it is possible to manually re-create the server record.

To do this, you need the following pieces of information about the existing server:

  • Server name
  • IP address
  • Server Size
  • Provider
  • Provider ID for the server

With that information in hand, we can create the new server record.

Expose Hidden Server Record Fields

Before you create a server record, you need to turn on advanced metaboxes which will show hidden fields on the screen for each server.

  • Go to the WPCLOUDDEPLOY -> SETTINGS -> MISC tab
  • Scroll down to the section titled SHOW ADVANCED METABOXES
  • Check the box
  • Scroll to the bottom of the screen and click the SAVE SETTINGS button

Verify That the New Server Record Menu Option Is Available

Under the WPCLOUDDEPLOY menu, there should be an option labeled NEW SERVER RECORD.  If that does not exist, it likely means that your admin user is missing some WPCD capabilities.  Use any ROLES & CAPABILITIES management plugin to view the existing capabilities for your admin roles and verify that the following have been assigned to them:

Create New Server Record

  • Use the WPCLOUDDEPLOY->NEW SERVER RECORD menu option to create a new server record.
  • Scroll down to the SERVER DETAILS metabox area – this is one of the hidden set of fields that were exposed when you turned on the option to SHOW ADVANCED METABOXES above.
  • Fill in the following fields:
    • NAME: The name of the server.
    • POST TITLE: The name of the server.
    • PROVIDER: the WPCD internal provider code for the server.  Eg: digital-ocean, upcloud, vultr, linode etc.  Ask WPCD SUPPORT for these if you don’t them already.  If your server was under  virtual provider, you’ll need to use the virtual provider slug here.
    • REGION: The location code for your server – this will vary by provider but is usually available in the documentation on your providers website.  If you’re using a virtual provider, you can enter the same name as you used in the provider settings screen.
    • SIZE:  The size code for your server – this will vary by provider but is usually available in the documentation on your providers website.  If you’re using a virtual provider, you can enter the same name as you used in the provider settings screen.
    • IPV4 ADDRESS:  The IP of your server.
    • PROVIDER INSTANCE ID:  The ID of your server – getting this will vary by server provider – best to ask their tech folks what it is for the server you’re re-linking. If you’re using a custom server provider, you can enter a random number here.
    • SERVER TYPE: This is a hardcoded value for WordPress servers – wordpress-app.
    • INITIAL APP NAME: This is a hardcoded value for WordPress servers – wordpress-app.
    • INITIAL PLUGIN VERSION: The version of the plugin when the server was created.  If you don’t know this just use the latest or prior version of the plugin (eg: 4.10.0, 4.12.0 etc.)
  • Set the OWNER of the server in the OWNER metabox.
  • Optional: Enable the DELETE PROTECTION flag.
  • In the PUBLISH box in in the upper right of the post, set the visibility option to PRIVATE.
  • Click the PUBLISH button.

You can check to see that the server is properly relinked by doing a simple task on the server such as refreshing the services screen or sending a simple LS command from the SSH CONSOLE tab.

If that works, you should then do the following:

  • Disable and re-enable backups for the server (or for all sites on the server if you do backups by site).  This will let the server know about the new post id for the server.
  • Disable and re-enable callbacks.

If you have other optional services enabled on the server you will need to disable and re-enable them so that WPCD can display the correct state for those services.

Relink Site Records

Now that the server record has been created, you need to connect the site records to the new server records.  The existing site records likely point to a non-existent server record.

  • First, obtain the new server record post id.  When you edit the server record, the post id will be in the URL.
  • Next, navigate to one of the affected sites .
  • Scroll down to the APPLICATION DETAILS metabox – this is one of the hidden set of fields that were exposed when you turned on the option to SHOW ADVANCED METABOXES.
  • Change the PARENT ID field to use the post id of the new server record.
  • Click the UPDATE button in the upper right.

You can check to see that the site is relinked by attempting a simple operation on the site (eg: enable and disable the debug log under the TOOLS tab for the site).

If that works, you should then do the following:

  • Disable and re-enable backups for the site (if backups were enabled for the site)

Clean Up

  • Turn off the ADVANCED METABOXES option.

Share:

Copyright © WPCloudDeploy 2019-2024