Since version 1.7.0, network admins managing their applications with RunCloud.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 Secret, as well as find the Server ID and APP ID for your WordPress application.
Step 1: Getting the API Key and Secret
On your RunCloud admin panel, click the cog icon at the top-right corner to go to the settings page.
On the new page, click in the API Key menu item on the left.
Copy the API Key and Secret values, we will need them in the next steps. YOU ALSO NEED TO CHANGE THE ENABLE API ACCESS TO “ENABLE”, otherwise RunCloud won’t accept WP Ultimo API calls.
Step 2: Getting the Server and App IDs
To find what are the server and app ids for your application, go to navigate to its manage page inside the RunCloud panel. Once you are there, you’ll be able to extract the values from the URL.
Save the Server and APP id values as they will be necessary in the next step.
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 RunCloud.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 RunCloud.io */
define('WU_RUNCLOUD', true); // Tells WP Ultimo ot whould sync domains with RunCloud, leave true
define('WU_RUNCLOUD_API_KEY', 'apikey'); // Enter the API key obtained in step 1
define('WU_RUNCLOUD_API_SECRET', 'apisecret'); // Enter the API secret obtained in step 1
define('WU_RUNCLOUD_SERVER_ID', 'serverid'); // Enter the server id value obtained in step 2
define('WU_RUNCLOUD_APP_ID', 'appid'); // Enter the app id value 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 (via the Aliases tab by the network admin or via the custom domain meta-box on the user’s Account page) it will be added to the RunCloud’s Domains page automatically.
The same is true for domain removals. Every time a domain is deleted from the network, that change will be communicated to your RunCloud account instantly!
If for any reason the domains are not being automatically added to your RunCloud app after this setup, head to WP Ultimo > System Info > Logs and search for the runcloud.log file. Errors like wrong credentials or access denied get saved to that file when they happen.