WPCloud Deploy Documentation

WP-CONFIG Entries

WPCloudDeploy has a few options that can be added to your WordPress wp-config.php file to activate, remove or modify certain functions.

WPCD_ENCRYPTION_KEY

define( 'WPCD_ENCRYPTION_KEY', 'your very long encryption key goes here' );

Certain passwords and other pieces of sensitive data are encrypted when stored in the database.  This defines the encryption key that is used.  We strongly urge that you add this entry to your wp-config.php file.

Prior to version 4.1.0, we would use a hardcoded key which, frankly, is the same as no key because everyone can view it by looking at the source code of the plugin.

As of version 4.1.0 (and later of course), we generate a key and store it in the database for you.  BUT, this is still not as secure as could be since the key is stored in plaintext, you do not know what it is and even a mild compromise of the database can expose the key.  Further, since you do not know the temporary key we’re storing in the database, you cannot use the backup & restore settings option to move to a new installation since the encrypted credentials cannot be decrypted in the new installation.

So, you really need to create a wp-config.php entry – preferably before you start configuring your cloud providers.  If you create this entry after you configure your cloud providers you will need to re-enter your api keys and other credential information in settings.

Here are some ways you can generate a string for this key:

  • Use a password generation program such as LASTPASS or KEEPASS
  • Use any tool that generates WordPress SALTS
  • Create a new SSH KEYPAIR and use a portion (or all) of the private key (this idea was provided by one of our customers.)

WPCD_HIDE_SSH_CONSOLE

define('WPCD_HIDE_SSH_CONSOLE', true);

Hide the SSH CONSOLE from the server detail screen.

WPCD_DEBUG

define('WPCD_DEBUG', false);

Turn on some debugging options that will write additional debugging data to the WordPress debug.log file.

WPCD_LOAD_VPN_APP

define('WPCD_LOAD_VPN_APP', true);

Activates the VPN module

The VPN Module provides the capability to sell a VPN server subscription via WooCommerce.  It requires the WooCommerce, WooCommerce Subscriptions and WooCommerce Memberships plugins to work.

There is no further documentation available for this module and no technical support is available if you activate it.

WPCD_LOAD_BASIC_SERVER_APP

define('WPCD_LOAD_BASIC_SERVER_APP', true);

Activates a basic server app module.

The Basic Server Module provides the capability to sell a Basic Server subscription via WooCommerce.  It requires the WooCommerce, WooCommerce Subscriptions and WooCommerce Memberships plugins to work.

There is no further documentation available for this module and no technical support is available if you activate it.

WPCD_LOAD_BACKUP_DO_PROVIDER

define('WPCD_LOAD_BACKUP_DO_PROVIDER', true);

We provide two digital ocean providers so that you can use two different accounts if you like.  But by default we don’t load the second one.  Turn on the second one (‘backup’) using this wp-config entry.

WPCD_SKIP_SERVER_SIZES_SETTING

define('WPCD_SKIP_SERVER_SIZES_SETTING', true);

The server sizes that are shown in the settings screen under each provider is currently only used by the VPN and BASIC SERVER apps and the WORDPRESS app WOOCOMMERCE add-ons.  This option allows those sizes to be hidden which can be useful if the none of these apps or add-ons are enabled.

WPCD_SHOW_PERMISSION_LIST

define('WPCD_SHOW_PERMISSION_LIST', true);

The permission list is an internal post type that we use for setting up permissions for teams.  In most cases it’s not necessary to show this list on the screen.

WPCD_DISABLE_DATA_SYNC

define('WPCD_DISABLE_DATA_SYNC', true);

Data syncing allows server and site metadata to be pushed to a destination WPCD site as a form of semi-real-time backup.  Use this flag to disable the option entirely.

WPCD_ALLOW_DUPLICATE_DOMAINS

define('WPCD_ALLOW_DUPLICATE_DOMAINS', true);

Under normal circumstances you do not want duplicate domains in your system.  But, when testing you might need this ability as you test creating sites on multiple servers and so on. Use this flag to enable duplicate domains.


Multisite / SAAS Related Entries


WPCD_SKIP_WELCOME_MESSAGE

define( 'WPCD_SKIP_WELCOME_MESSAGE' , false);

When enabled, will not add the WPCD welcome message to the top of the settings screen on the general tab.  However, app specific welcome messages will still be shown.  A better way to handle replacing the welcome message might be to use the wpcd_settings_welcome_text_initial filter which allows you to completely replace the text or append to it.

WPCD_SKIP_SSH_TIMEOUT_SETTINGS

define( 'WPCD_SKIP_SSH_TIMEOUT_SETTINGS',  false );

When enabled, you will not see the SSH timeout options on the settings screen.

WPCD_AUTO_TRIM_LOG_LIMIT

define( 'WPCD_AUTO_TRIM_LOG_LIMIT' , 100);

Overrides the auto trim log limit set in the settings screen (under the logs tab).

WPCD_MENU_NAME

define( 'WPCD_MENU_NAME' , 'Servers and Sites');

Overrides the name for the main menu item.

WPCD_APP_MENU_NAME

define( 'WPCD_APP_MENU_NAME' , 'All Sites');

Overrides the name for the applications menu item.

WPCD_WPAPP_MENU_NAME

define( 'WPCD_WPAPP_MENU_NAME' , 'WP Sites');

Overrides the name for the WordPress sites menu item.

Available in WPCD V 4.2.5 or later.

WPCD_HIDE_HELP_TAB

define( 'WPCD_HIDE_HELP_TAB' , true);

In versions prior to 4.2.5, this option hides the help tab in the settings screen.  In version 4.2.5 and later, the help area moved to the main menu but this option still allows you to hide it.

WPCD_HIDE_PROVIDER_HELP_LINKS

define( 'WPCD_HIDE_PROVIDER_HELP_LINKS' , true);

Hides the help links in the provider screen that point back to the WPCD help pages.

WPCD_SERVER_HIDE_TABS_WHEN_AUTHOR

define( 'WPCD_SERVER_HIDE_TABS_WHEN_AUTHOR' , 'server-ssh-keys,server-users,ssh_console,server_upgrade,fail2ban');

Remove certain server tabs from the server screen even when the user is an Author with full rights to the server. This helps in SaaS situations where the post author is the buyer but you still don’t want them to access those tabs.

You specify the list of tabs to be disabled when the user is an author as a comma-delimited string with no spaces between each entry.  There are currently only 5 tabs that can be disabled this way.

  • server-ssh-keys
  • server-users
  • ssh_console
  • server_upgrade
  • fail2ban

APP Specific Entries: WPAPP


WPCD_WPAPP_SKIP_POPUP_HEADER

define('WPCD_WPAPP_SKIP_POPUP_HEADER', true);

This entry applies specifically to the WordPress app.  When provisioning a server or app the popup has a large header with the “WPCloud Deploy” name on it.  Set this entry to avoid showing that.

WPCD_WPAPP_HIDE_INSTALLWP_HOVER_LINK

define('WPCD_WPAPP_HIDE_INSTALLWP_HOVER_LINK', true);

This entry applies specifically to the WordPress app.  The servers list will usually show an INSTALL WORDPRESS link under the title column when the user/admin hovers over a title.  However, there’s a lot of links there and sometimes you might just want to remove this particular link since you have a separate column with a specific button for installing WordPress.  This wp-config option gives you the ability to do so – setting it to TRUE will remove the link.


Notes

When adding any of the options to your wp-config.php file, please make sure that they are placed above the line that says  “/* That’s all, stop editing! */” in wp-config.php.  Do not add them to the bottom of the file!

Share: