wp-cli core install unknown: fatal: file /etc/postfix/main.cf: parameter mail_owner: user postfix has same user ID as _postfix

Postfix is a free and open-source mail transfer agent that routes and delivers electronic mail, when you get an error like this: unknown: “fatal: file /etc/postfix/main.cf: parameter mail_owner: user postfix has same user ID as _postfix it typically means you need to fix some configuration inside of /etc/postfix/main.cf. If you do not plan on ever … Read more

Give WP-Cli User Home Directory Privileges

Yes, I will accept the “newbie” embarrassment and answer my basic questions . 😉 1.) www-data 2.) For fellow wp-cli newbies, follow this excellent tutorial to get wp-cli working in local dev, and remember NOT to forget the last step. 🙂 3.) One should never put the html directory in /home/ for the reason malicious … Read more

Mocking WP_CLI static methods in unit tests

So I am using PEST as my testing framework, and if I just define my mocks in the helpers, they won’t be called correctly, because the WPCLI will probably be autoloaded after that on each test. So I added beforeEach(function () { $wpCliMock = \Mockery::mock(‘alias:WP_CLI’); $wpCliMock ->shouldReceive(‘success’) ->andReturnArg(0); $wpCliMock ->shouldReceive(‘error’) ->andReturnArg(0); }); Inside my tests, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)