Batch Replace URLs in WordPress Database

No because you’re running the command on the posts table, and only on the content column, but ACF fields aka post meta are stored in the post meta table, not the content column of the posts table so no search replacing is occurring. You can tell WP CLI to perform the search replace with PHP … Read more

Firebase with WordPress instead of SQL?

No you can’t use Firebase as your WordPress database out of the box, and the chances there is a plugin to implement this are astronomically low. Your best hope is that you can find a plugin that lets you embed Firebase data or interact with Firebase, but that would still need to use MySQL/MariaDB for … Read more

Query a meta key using an array of values where the database value is a string

You could use multiple meta clauses in your WP_User_Query, along with a LIKE comparison. Something like $args = array( ‘role’ => ‘member’, ‘meta_query’ => array( ‘relation’ => ‘OR’, array( ‘key’ => ‘specializations’, ‘value’ => ‘doctor’, ‘compare’ => ‘LIKE’, ), array( ‘key’ => ‘specializations’, ‘value’ => ‘researcher’, ‘compare’ => ‘LIKE’, ), ), ); $found_users = new … Read more

How to find source of these strange SQL queries?

They’re from WordPress. They come from the wp_old_slug_redirect() function which is run whenever there is a 404. The purpose is to check if the requested URL was the old URL for a post so that it can redirect to the new URL. If you’re seeing a lot of these then it means you’re getting a … Read more

Weird WP -Cli Error Connection Refused

For anyone else who comes across this post… the above issue was caused by the w3-total-cache plugin being migrated between Test and Staging servers. To fix the issue, I deactivate and exclude w3-total-cache tables from the Test server’s db export, then I do the upload and import to Staging server, which has its own “local” … Read more