Run Username SQL Query from WordPress Child Theme Functions File

There are many ways you can achieve this… In your instance, as you pointed out $wpdb, here is the possible ways you can achieve this: 1. Use $wpdb::query You can run this query directly using $wpdb’s query method as: add_action(“init”, “username_query”) function username_query(){ global $wpdb; $prefix = $wpdb->prefix; $query = “UPDATE `{$prefix}wp_users` SET `user_login`= ‘new-admin-name-here’ … Read more

Error missing MySQL extension

The solution to this will require server level changes, this isn’t something you can fix by changing PHP files. Your host needs to install the mysqli PHP extension

Match tag names with form titles

I don’t see PHP syntax errors (like unwanted brackets) in your code, but there are two WordPress-specific issues that need to be fixed: Note that wpdb::prepare() needs one or more placeholders (e.g. %s for strings and %d for numbers) and the replacement value for each placeholder. So in your case, the correct $wpdb->prepare() would be: … Read more

WordPress doesn’t save changes some times

You are mentioning the mysqldump, and it might be linked to the problem. If your mysqldump takes long time, and lock tables, it might cause the requests to your server when tryig to save posts, to time out. It could also just be a plugin that is messing something up, server-side settings that have errors … Read more

database optimization and server errors

It probably is a host issue. Assuming that you’re relatively stock WordPress, the queries shouldn’t be so inefficient that they’re causing timeouts. When it says a “remote mysql database”, does that mean a remote database server with the same hosting company, or does it mean you’re using a database server that’s physically located somewhere else? … Read more

WordPress tables and aliases?

‘re’ is the alias you give to EVENT_ESPRESSO_RECURRENCE_TABLE. The error you’re seeing is probably because the EVENT_ESPRESSO_RECURRENCE_TABLE constant isn’t defined. Do a var_dump( $wpdb->last_query ) just below that code to see the final SQL statement.