Since version 1.7.4, network admins managing their applications with ServerPilot.io no longer need to manually add mapped domains to app’s domains panel. This tutorial will go over the necessary steps to configure this integration on your WP Ultimo network install.
You’ll need to get your API Key and Client ID as well as find the APP ID for your WordPress application running on ServerPilot.
Step 1: Getting the API Key and the Client ID
On your ServerPilot admin panel, first go to the Account Settings page.
Next, on the API menu item, copy the Client ID and API Key values (if the API Key field is empty, click the New API Key button). Paste those values somewhere as we’ll need them in a later step.
Step 2: Getting the App ID
Next, we’ll need to get the App ID for your WordPress site. To find that ID, navigate to your app’s manage page and take look at the URL at the top of your browser. The APP ID is the portion between the app/ and the /settings segments of the URL.
Step 3: Adding the config to your wp-config.php file
You’ll need to edit your wp-config.php file to include the custom configuration constants WP Ultimo needs to correctly connect to the ServerPilot.io API.
Add the following lines to your wp-config.php file, right above the /* That’s all, stop editing! Happy blogging. */ line. Replace the contents with the information obtained in the prior steps:
/* WP Ultimo: Adding automatically domain syncing to ServerPilot */
define('WU_SERVER_PILOT', true); // Tells WP Ultimo ot whould sync domains with RunCloud, leave true
define('WU_SERVER_PILOT_CLIENT_ID', 'CLIENT_ID_HERE'); // Enter your Client ID, obtained in Step 1
define('WU_SERVER_PILOT_API_KEY', 'API_KEY_HERE'); // Enter your API Key, obtained in Step 1
define('WU_SERVER_PILOT_APP_ID', 'APP_ID_HERE'); // Enter the APP ID, obtained in Step 2
/* end WP Ultimo */
After replacing the values, you should have something like this:
You’re all set!
Now, every time a new domain is mapped in the network and when a new subdomain site is added (via the Aliases tab by the network admin or via the custom domain meta-box on the user’s Account page) they will be sent to ServerPilot’s domain panel automatically, with support to autoSSL.
The same is true for domain removals. Every time a domain is deleted from the network, that change will be communicated to your ServerPilot account instantly!
If for any reason the domains are not being automatically added to your ServerPilot app after this setup, head to WP Ultimo > System Info > Logs and search for the server-pilot.log file. Errors like wrong credentials, access denied get saved to that file when they happen.