When installing WordPress via WP Toolkit, the below error appears in the log file after the install fails.
2020-12-09 01:12:26.155] DEBUG [Task id: 19] Fatal error: Uncaught
TypeError: Argument 1 passed to
PleskExt\WpToolkit\Model\Cpanel\CpanelMySQLProfile::setHost() must be
of the type string, null given, called in
Cpanel/CpanelMySQLProfile.php on line 39 and defined in
WP Toolkit reads the cPanel MySQL Profile configuration at the time of installing WordPress. If any variables are missing from the default profile, this problem will occur. This issue prevents the WP Toolkit plugin from installing successfully.
Ensure the MySQL profile for localhost contains all the required variables.
- Log in to WHM
- Navigate to Manage MySQL Profiles
- Click to edit the localhost profile
- Ensure the Host, Port, and Username variables are stored ( The default information is localhost, 3306, and root. )
- Click save and validate
Note: The default saved localhost profile should look like the below image.
At this point, WP Toolkit should be able to perform an install successfully.