SOLVED WordPress Toolkit error Could not create new 'wp-config.php' file.

tpartzard

Member
Oct 15, 2021
8
0
1
Thailand
cPanel Access Level
Root Administrator
I can't install wordpress via wordpress toolkit

Here are some errors I found in the wordpress toolkit logs.

[2022-08-01 06:08:26.504] DEBUG Rollback WordPress installation of instance #1913: remove from WPT database
[2022-08-01 06:08:26.518] DEBUG Execute shell command: 'rm -rf /usr/local/cpanel/3rdparty/wp-toolkit/var/logs/action-logs/0989f26c-276f-4e54-b60f-0ba3f67d6de7'
[2022-08-01 06:08:26.527] DEBUG Exit code: '0'
Command output: ''
[2022-08-01 06:08:26.536] ERROR Error: Could not create new 'wp-config.php' file.[2022-08-01 06:08:26.536] DEBUG PleskExt\WpToolkit\Exception\WpCliExecutionException: Error: Could not create new 'wp-config.php' file.
in /usr/local/cpanel/3rdparty/wp-toolkit/plib/library/Capability/WpCli/WpCliUtils.php:42
Stack trace:
#0 /usr/local/cpanel/3rdparty/wp-toolkit/plib/library/Capability/WpCli/LocalCpanel.php(145): PleskExt\WpToolkit\Capability\WpCli\WpCliUtils::throwWpCliExecError('Error: Could no...', 'Unix', '')
#1 /usr/local/cpanel/3rdparty/wp-toolkit/plib/library/Capability/WpCli/WpCli.php(140): PleskExt\WpToolkit\Capability\WpCli\LocalCpanel->call(Array, '{"WORDPRESS_PRO...', Array, false, NULL)
 

Attachments

Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
12,499
1,971
363
cPanel Access Level
Root Administrator
Hey there! Is it possible there is already a WordPress site or a wp-config.php file on the account? Although no sites are linked to WordPress Toolkit yet according to your screenshot, a manual installation that hasn't been linked is still possible, and that would cause this error.

As a test, you could try installing WordPress in a different directory to see if that works well. If that does work, the problem is with something specific to the original installation directory.
 

tpartzard

Member
Oct 15, 2021
8
0
1
Thailand
cPanel Access Level
Root Administrator
Hey there! Is it possible there is already a WordPress site or a wp-config.php file on the account? Although no sites are linked to WordPress Toolkit yet according to your screenshot, a manual installation that hasn't been linked is still possible, and that would cause this error.

As a test, you could try installing WordPress in a different directory to see if that works well. If that does work, the problem is with something specific to the original installation directory.
I have installed it in a new directory and tested it on a new account, but still the same issue.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
12,499
1,971
363
cPanel Access Level
Root Administrator
I did reach out to the WordPress Toolkit team, and they were also not familiar with this error. Our support team would be able to provide you with a list of IP addresses for server access, so you wouldn't have to open up SSH or WHM globally, if that would ease some concerns about submitting a ticket, but it seems we may be in uncharted territory here.
 

tpartzard

Member
Oct 15, 2021
8
0
1
Thailand
cPanel Access Level
Root Administrator
I did reach out to the WordPress Toolkit team, and they were also not familiar with this error. Our support team would be able to provide you with a list of IP addresses for server access, so you wouldn't have to open up SSH or WHM globally, if that would ease some concerns about submitting a ticket, but it seems we may be in uncharted territory here.
I've already opened a ticket to your support team. The issue caused by imunify360 generated a rule preventing /usr/local/cpanel/3rdparty/wp-toolkit/plib/vendor/wp-cli/vendor/wp-cli/config-command/src/Config_Command.php

Thank you very much for support.