---
title: WP Config Setup
description: "If the credentials entered at the general settings page are not successfully written to the **[wp-config.php](https://developer.wordpress.org/apis/wp-config-php/)** file, you have to enter the following constants manually, depending on your server management system or email server: ## aaPanel Panel Replace 'domain.com', 'port'…"
url: "https://wpemailmanager.com/docs/wp-config-setup/"
updated: "2024-05-28"
category: Installation
---

# WP Config Setup

If the credentials entered at the general settings page are not successfully written to the **[wp-config.php](https://developer.wordpress.org/apis/wp-config-php/)** file, you have to enter the following constants manually, depending on your server management system or email server:

## aaPanel Panel

Replace 'domain.com', 'port' and 'apikey' with the appropriate values. Learn more about aaPanel requirements [here](https://wpemailmanager.com/documentation/aapanel/aapanel-requirements/) and how to get your aaPanel api key [here](https://wpemailmanager.com/documentation/aapanel/how-to-obtain-your-aapanel-api-key/).

```
define( 'WP_EM_HOSTNAME', 'domain.com' );
define( 'WP_EM_HOST_PORT', 'port' ); //Default value is 7800
define( 'WP_EM_HOST_API_KEY', 'apikey' );
define( 'WP_EM_HOST_PROVIDER', 'aapanel');
```

## ApisCP

Replace 'domain.com', 'port' and 'apikey' with the appropriate values. Learn more about ApisCP requirements [here](https://wpemailmanager.com/documentation/apiscp/apiscp-requirements/) and how to get your ApisCP api key [here](https://wpemailmanager.com/documentation/apiscp/how-to-obtain-your-apiscp-api-key/).

```
define( 'WP_EM_HOSTNAME', 'domain.com' );
define( 'WP_EM_HOST_USERNAME', 'username' );
define( 'WP_EM_HOST_PORT', 'port' ); //Default value is 2083
define( 'WP_EM_HOST_API_KEY', 'apikey' );
define( 'WP_EM_HOST_PROVIDER', 'apiscp');
```

## Cloudron

Replace 'api_key', 'username', and 'domain.com' with the appropriate values. Learn how to get your API key [here](https://wpemailmanager.com/documentation/cloudron/how-to-obtain-a-cloudron-api-token/).

```
define( 'WP_EM_HOST_API_KEY', 'api_key' );
define( 'WP_EM_HOST_USERNAME', 'username' );
define( 'WP_EM_HOSTNAME', 'domain.com' );
define( 'WP_EM_HOST_PROVIDER', 'cloudron');
```

## Control Web Panel (CWP)

Replace 'username', 'apikey' and 'domain.com' with the appropriate values. Learn more about CentOS Web Panel requirements [here](https://wpemailmanager.com/docs/control-web-panel-requirements/).

```
define( 'WP_EM_HOST_API_KEY', 'apikey' );
define( 'WP_EM_HOST_USERNAME', 'username' );
define( 'WP_EM_HOSTNAME', 'domain.com' );
define( 'WP_EM_HOST_PROVIDER', 'cwp');
```

## cPanel

Replace 'password', 'username', 'port', and 'domain.com' with the appropriate values.

```
define( 'WP_EM_HOST_PASSWORD', 'password' );
define( 'WP_EM_HOST_USERNAME', 'username' );
define( 'WP_EM_HOST_PORT', 'port' ); //Default value is 2083
define( 'WP_EM_HOSTNAME', 'domain.com' );
define( 'WP_EM_HOST_PROVIDER', 'cpanel' );
```

## Cyber Panel

Replace 'password', 'username', 'port', and 'domain.com' with the appropriate values.

```
define( 'WP_EM_HOST_PASSWORD', 'password' );
define( 'WP_EM_HOST_USERNAME', 'username' );
define( 'WP_EM_HOST_PORT', 'port' ); //Default value is 8090
define( 'WP_EM_HOSTNAME', 'domain.com' );
define( 'WP_EM_HOST_PROVIDER', 'cyberpanel' );
```

## DirectAdmin / MXRoute

Replace 'password', 'username', 'port', and 'domain.com' with the appropriate values.

```
define( 'WP_EM_HOST_PASSWORD', 'password' );
define( 'WP_EM_HOST_USERNAME', 'username' );
define( 'WP_EM_HOST_PORT', 'port' ); //Default value is 2222
define( 'WP_EM_HOSTNAME', 'domain.com' );
define( 'WP_EM_HOST_PROVIDER', 'directadmin');
```

## Enhance

Replace 'api_token', 'organization_id', and 'domain.com' with the appropriate values. Learn how to get your API token and organization ID [here](https://wpemailmanager.com/documentation/enhance/how-to-obtain-your-enhance-panel-api-token-organization-id/).

```
define( 'WP_EM_HOST_API_KEY', 'api_token' );
define( 'WP_EM_HOST_USERNAME', 'organization_id' );
define( 'WP_EM_HOSTNAME', 'domain.com' );
define( 'WP_EM_HOST_PROVIDER', 'enhance');
```

## FASTPANEL

Replace 'password', 'username', 'port', and 'domain.com' with the appropriate values.

```
define( 'WP_EM_HOST_PASSWORD', 'password' );
define( 'WP_EM_HOST_USERNAME', 'username' );
define( 'WP_EM_HOST_PORT', 'port' ); //Default value is 8888
define( 'WP_EM_HOSTNAME', 'domain.com' );
define( 'WP_EM_HOST_PROVIDER', 'fastpanel');
```

## Froxlor

Replace 'domain.com', 'username', 'api_key' and 'api_secret' with the appropriate values. The username is the account that will host your email accounts and domains, not the server admin account. Learn how to create an API key [here](https://wpemailmanager.com/documentation/froxlor/how-to-obtain-your-froxlor-api-key/). If WP Email Manager is unable to connect to the server, please refer to [this art](https://wpemailmanager.com/documentation/troubleshooting/i-am-unable-to-connect-to-my-froxlor-server/)[i](https://wpemailmanager.com/documentation/troubleshooting/i-am-unable-to-connect-to-my-froxlor-server/)[cle](https://wpemailmanager.com/documentation/troubleshooting/i-am-unable-to-connect-to-my-froxlor-server/).

```
define( 'WP_EM_HOSTNAME', 'domain.com' );
define( 'WP_EM_HOST_USERNAME', 'username' );
define( 'WP_EM_HOST_API_KEY', 'api_key' );
define( 'WP_EM_HOST_API_SECRET', 'api_secret' );
define( 'WP_EM_HOST_PROVIDER', 'froxlor');
```

## InterWorx

Replace 'password', 'username', 'port', and 'domain.com' with the appropriate values.

```
define( 'WP_EM_HOST_PASSWORD', 'password' );
define( 'WP_EM_HOST_USERNAME', 'username' );
define( 'WP_EM_HOST_PORT', 'port' ); //Default value is 2443
define( 'WP_EM_HOSTNAME', 'domain.com' );
define( 'WP_EM_HOST_PROVIDER', 'interworx');
```

## ISPConfig

Replace 'password', 'username', 'port', and 'domain.com' with the appropriate values. The username and password values are for the remote user, not admin or client user. Learn how to create a remote user [here](https://wpemailmanager.com/documentation/ispconfig/how-to-setup-a-remote-user-in-ispconfig/).

```
define( 'WP_EM_HOST_PASSWORD', 'password' );
define( 'WP_EM_HOST_USERNAME', 'username' );
define( 'WP_EM_HOST_PORT', 'port' ); //Default value is 8080
define( 'WP_EM_HOSTNAME', 'domain.com' );
define( 'WP_EM_HOST_PROVIDER', 'ispconfig');
```

## ISPmanager

Replace 'password', 'username', 'port', and 'domain.com' with the appropriate values.

```
define( 'WP_EM_HOST_PASSWORD', 'password' );
define( 'WP_EM_HOST_USERNAME', 'username' );
define( 'WP_EM_HOST_PORT', 'port' ); //Default value is 1500
define( 'WP_EM_HOSTNAME', 'domain.com' );
define( 'WP_EM_HOST_PROVIDER', 'ispmanager');
```

## KeyHelp

Replace 'api_key', 'username', and 'domain.com' with the appropriate values. Learn how to get your API key [here](https://wpemailmanager.com/documentation/keyhelp/how-to-obtain-your-keyhelp-api-key/). The username is the account that will host your email accounts and domains, not the server admin account (The accounts can be found at KeyHelp Admin Panel > General > User Administration).

```
define( 'WP_EM_HOST_API_KEY', 'api_key' );
define( 'WP_EM_HOST_USERNAME', 'username' );
define( 'WP_EM_HOSTNAME', 'domain.com' );
define( 'WP_EM_HOST_PROVIDER', 'keyhelp');
```

## Mailbox

Replace 'username', 'password', and 'domain.com' with the appropriate values. The typical value for the domain is *api.mailbox.org*.

```
define( 'WP_EM_HOSTNAME', 'domain.com' );
define( 'WP_EM_HOST_USERNAME', 'username' );
define( 'WP_EM_HOST_PASSWORD', 'password' );
define( 'WP_EM_HOST_PROVIDER', 'mailbox');
```

## Mailcheap

Replace 'password', 'username', and 'domain.com' with the appropriate values. The domain value is typically the url to where you manage accounts.

```
define( 'WP_EM_HOST_PASSWORD', 'password' );
define( 'WP_EM_HOST_USERNAME', 'username' );
define( 'WP_EM_HOSTNAME', 'domain.com' );
define( 'WP_EM_HOST_PROVIDER', 'mailcheap');
```

## Mailcow

Replace 'api_key' and 'domain.com' with the appropriate values. Learn how to create an API key [here](https://wpemailmanager.com/documentation/mailcow/how-to-get-a-mailcow-api-key/).

```
define( 'WP_EM_HOST_API_KEY', 'api_key' );
define( 'WP_EM_HOSTNAME', 'domain.com' );
define( 'WP_EM_HOST_PROVIDER', 'mailcow');
```

## Mail-in-a-Box

Replace 'username', 'password', and 'domain.com' with the appropriate values.

```
define( 'WP_EM_HOSTNAME', 'domain.com' );
define( 'WP_EM_HOST_USERNAME', 'username' );
define( 'WP_EM_HOST_PASSWORD', 'password' );
define( 'WP_EM_HOST_PROVIDER', 'mailinabox');
```

## Mailu

Replace 'api_token' and 'domain.com' with the appropriate values. Learn how to enable Mailu's API [here](https://wpemailmanager.com/documentation/mailu/how-to-enable-mailu-api/).

```
define( 'WP_EM_HOST_API_KEY', 'api_token' );
define( 'WP_EM_HOSTNAME', 'domain.com' );
define( 'WP_EM_HOST_PROVIDER', 'mailu');
```

## Modoboa

Replace 'api_key' and 'domain.com' with the appropriate values. Learn how to create an API key [here](https://wpemailmanager.com/documentation/modoboa/how-to-get-a-modoboa-api-key/).

```
define( 'WP_EM_HOST_API_KEY', 'api_key' );
define( 'WP_EM_HOSTNAME', 'domain.com' );
define( 'WP_EM_HOST_PROVIDER', 'modoboa');
```

## Plesk

Replace 'password', 'username', 'port', and 'domain.com' with the appropriate values

```
define( 'WP_EM_HOST_PASSWORD', 'password' );
define( 'WP_EM_HOST_USERNAME', 'username' );
define( 'WP_EM_HOST_PORT', 'port' ); //Default value is 8443
define( 'WP_EM_HOSTNAME', 'domain.com' );
define( 'WP_EM_HOST_PROVIDER', 'plesk');
```

## Poste Email Server

Replace 'username', 'password', and 'domain.com' with the appropriate values.

```
define( 'WP_EM_HOSTNAME', 'domain.com' );
define( 'WP_EM_HOST_USERNAME', 'username' );
define( 'WP_EM_HOST_PASSWORD', 'password' );
define( 'WP_EM_HOST_PROVIDER', 'poste');
```

## SPanel

Replace 'api_key', 'username', and 'domain.com' with the appropriate values. Learn how to get your API key [here](https://wpemailmanager.com/documentation/spanel/how-to-obtain-your-spanel-api-token/). The username is the account that will host your email accounts and domains, not the server admin account. If WP Email Manager is unable to connect to the server, please refer to [this article](https://wpemailmanager.com/documentation/troubleshooting/i-am-unable-to-connect-to-my-spanel-server/).

```
define( 'WP_EM_HOST_API_KEY', 'api_key' );
define( 'WP_EM_HOST_USERNAME', 'username' );
define( 'WP_EM_HOSTNAME', 'domain.com' );
define( 'WP_EM_HOST_PROVIDER', 'spanel');
```

## TinyCP

Replace 'password', 'username', 'port', and 'domain.com' with the appropriate values.

```
define( 'WP_EM_HOST_PASSWORD', 'password' );
define( 'WP_EM_HOST_USERNAME', 'username' );
define( 'WP_EM_HOST_PORT', 'port' );
define( 'WP_EM_HOSTNAME', 'domain.com' );
define( 'WP_EM_HOST_PROVIDER', 'tinycp' );
```

## 20i / StackCP

Replace 'api_key', ['package_id](https://wpemailmanager.com/documentation/20i-stackcp/how-do-i-determine-my-package-id/)', and 'domain.com' with the appropriate values. Learn how to generate an access token [here](https://my.20i.com/reseller/api) and the account requirements [here](https://wpemailmanager.com/documentation/20i-stackcp/20i-stackcp-requirements/).

```
define( 'WP_EM_HOST_API_KEY', 'api_key' ); // General API key
define( 'WP_EM_HOST_USERNAME', 'package_id' );
define( 'WP_EM_HOSTNAME', 'domain.com' );
define( 'WP_EM_HOST_PROVIDER', 'twentyi');
```

## VestaCP / HestiaCP / myVesta

Replace 'password', 'username', 'port', and 'domain.com' with the appropriate values. Learn more about VestaCP requirements [here](https://wpemailmanager.com/documentation/vestacp/vestacp-requirements/), HestiaCP requirements [here](https://wpemailmanager.com/documentation/hestiacp/hestiacp-requirements/) and myVesta requirements [here](https://wpemailmanager.com/documentation/myvesta/myvesta-requirements/).

```
define( 'WP_EM_HOST_PASSWORD', 'password' );
define( 'WP_EM_HOST_USERNAME', 'username' );
define( 'WP_EM_HOST_PORT', 'port' ); //Default value is 8083
define( 'WP_EM_HOSTNAME', 'domain.com' );
define( 'WP_EM_HOST_PROVIDER', 'vestacp');
```

## Virtualmin

Replace 'password', 'username', 'port', 'lamp' and 'domain.com' with the appropriate values. Learn more about Virtualmin requirements [here](https://wpemailmanager.com/documentation/virtualmin/virtualmin-requirements/).

```
define( 'WP_EM_HOST_PASSWORD', 'password' );
define( 'WP_EM_HOST_USERNAME', 'username' );
define( 'WP_EM_HOST_PORT', 'port' ); //Default value is 10000
define( 'WP_EM_HOSTNAME', 'domain.com' );
define( 'WP_EM_HOST_PROVIDER', 'virtualmin');
define( 'WP_EM_HOST_SERVER_STACK', 'lamp' ); // 'lamp' or 'lemp'
```

## Webuzo

Replace 'password', 'username', 'port', and 'domain.com' with the appropriate values.

```
define( 'WP_EM_HOST_PASSWORD', 'password' );
define( 'WP_EM_HOST_USERNAME', 'username' );
define( 'WP_EM_HOST_PORT', 'port' ); //Default value is 2003
define( 'WP_EM_HOSTNAME', 'domain.com' );
define( 'WP_EM_HOST_PROVIDER', 'webuzo');
```

## WildDuck / Ploi

Replace 'api_key' and 'domain.com' with the appropriate values. Learn how to obtain WildDuck's access token [here](https://wpemailmanager.com/documentation/wildduck/how-to-obtain-your-wildduck-access-token/) and Ploi's access token [here](https://wpemailmanager.com/documentation/ploi/how-to-obtain-your-ploi-access-token/).

```
define( 'WP_EM_HOST_API_KEY', 'access_token' );
define( 'WP_EM_HOSTNAME', 'domain.com' );
define( 'WP_EM_HOST_PROVIDER', 'wildduck');
```
