What user should I use for wp-cli on Ubuntu VPS [closed]

I think the error is very clear. The owner of public_html is www-data, you don’t have any permisson to write to that folder. You can use whatever user you want as long as that user have permission to read, write and execute your DOCUMENT_ROOT folder. But you shouldn’t use root user. So, to solve that … Read more

Add passwords to config.yml to manage multiple sites

If you are using SSH to connect to your sites then you can set up SSH aliases in your SSH config file. There are many advantages to doing this, one of them being that you use your SSH key to login to sites rather than having to type passwords. I do this with WP-CLI and … Read more

One-click WP site generation wih wp-cli on Windows

This is the script I use on Windows under XAMPP. It includes a MySQL command to create the database, and a tweak to improve security by nuking user 1 (and all its content) straight after install, resulting in a clean empty database. @echo off set dbName=”wp_yourdbname” set dbPass=”your_random_db_password” set siteUrl=”sitename.localdev.yourdomain.com” set siteName=”Kluwell” set siteDesc=”” set … Read more

WPCLI doesn’t recognize the site

There is only one function in wp-cli which will return this error and it is wp_not_installed wp_not_installed definition. as you see function is checking if your site is installed by calling function from WordPress core is_blog_installed. is_blog_installed definition. It is hard to tell what is happening exactly with your site but I would try to … Read more

Userless db-only wordpress instalation

It is not possible to install WordPress without creating a user. However, you could immediately remove that user with a second wp-cli command like yes | wp user delete 1 Note: this will also delete any posts and pages associated with that user. You can normally re-assign them to a different user but in this … Read more