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

Using wp-cli and delete everypost first image

According to the WP-CLI docs for the wp search-replace command (and wp db search, for that matter), you have to pass your search string without delimiters and pass any flags separately. Instead of: wp search-replace ‘/<img[^>]+\>/i’ ” wp_posts –regex –allow-root You would use something more like this: wp search-replace ‘<img[^>]+\>’ ” wp_posts –regex –allow-root –regex-flags=”i” … Read more

Automate WordPress website setup with prefilled data

I’ve had great luck with scripting WP-CLI to install, setup and configure WordPress development, staging, and production sites. With it, you can automate nearly the entire process including the installation of specific plugins, the creation of menus, categories, and just about any WordPress configuration item. Obviously, this approach would require shell access and the installation … 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

PHP if statement with German umlauts [closed]

This is probably because of your database collation. There are numerous questions on StackOverflow about this sort of thing. Your question may get closed or migrated as it’s not on-topic for wordpress.stackexchange.com; Take a look at this question, or perhaps ask there instead. Also, why are you not using the WordPress WP_Query class to return … Read more