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.

WordPress $wpdb get posts from category and sort by custom meta

First, you shouldn’t use NOW() in select queries since NOW() returns the current date and time to the split second. In other words: This query will never land in the cache. And you can use the WP_Query with filter of posts_where eg: function filter_event_where( $where=”” ) { $date = date(‘Y-m-d’); $where .= ” AND posts.post_date … Read more

Query posts by custom taxonomy and sort by post_modified

The WP_Query function can be used on custom taxonomies and post types and is probably easier than querying the database directly. The following should do what your looking for: <?php $query_hot = new WP_Query( array( ‘post_type’ => ‘vacancy’, ‘field’ => ’18’, // You can use the ID or slug here ‘orberyby’ => ‘modified’, ‘posts_per_page’ => … Read more

Changing MySQL password via WHM – does this affect WordPress?

If that changes the MySQL password that WordPress is using, and it sounds like it does, then yes you will have a problem, but not a big one. You’d need to edit wp-config.php and change define(‘DB_PASSWORD’,’oldpass’); to define(‘DB_PASSWORD’,’newpass’); Beyond that, the question is a CPanel question and would be off topic here. http://codex.wordpress.org/Editing_wp-config.php#Set_Database_Password

How to stop $wpdb from prepending database name

The behavior I described in my post only happens when you are using $wpdb->update to execute an UPDATE statement. If you want to update a different database using the same connection, use $wpdb->query to send a raw query, WP won’t modify it then.