How can I make wordpress suppress mysql errors?
How can I make wordpress suppress mysql errors?
How can I make wordpress suppress mysql errors?
There’s a plugin called Debug Bar which you can find at http://wordpress.org/plugins/debug-bar/ Don’t leave this enabled in production! But it will tattle on slow MySQL queries. You might also wish to try using WP Clean Up. http://wordpress.org/plugins/wp-clean-up/ This flushes out stale entries in your database, and does a little bit of table reorg/optimization.
Slow meta_query with about 4 milion record on wp_postmeta
Old unanswered question, but found this via the googles (1st answer) that appears to have good info / links (might be useful to someone): What is the required format for importing posts into WordPress? Plus this one from the Codex, which has info on importing from all sorts of formats, including RSS and XML. https://codex.wordpress.org/Importing_Content … Read more
This worked fine for me. The postmeta inclusion might be a bit messy. Without it, I got about 150 results. With it, I got over 5000. I never go an empty result. Since postmeta will have anywhere from zero to hundreds of items per post, it is going to make a new row for every … Read more
Speed up a wordpress site is not a MySQL settings issue. One site in order to perform well is to USE MySQL with the best efficient way (limit your queries results, get only what you need) Default wordpress database schema have been already set up (primary keys, indexes e.t.c) to be used by the default … Read more
You can query INFORMATION_SCHEMA and achieve the same: function getEnumValues($table, $field) { global $wpdb; $result = $wpdb->get_row(“SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = ‘” . DB_NAME . “‘ AND TABLE_NAME = ‘” . $table . “‘ AND COLUMN_NAME LIKE ‘” . $field . “‘”); if($result === FALSE) { die($wpdb->last_error); } // this is the column … Read more
You can write a script that installs the wordpress just the way you like it. Roughly could be like this: Install WordPress. Install the themes, plugins and demo content you want. zip the files Export database into a file The script needs to unpackage and copy the files into a folder. Then replace the information … Read more
This is the (updated) code I’m using, which gives results like I’d expect: $args = array( ‘post_type’ => ‘entry’, ‘orderby’ => ‘bayesian_average’, ‘order’ => ‘DESC’, ‘post_status’ => ‘publish’ ); $loop = new WP_Query($args); $number_of_entrants = $loop->post_count; $total_ratings = $total_num_votes = 0; foreach ($loop->posts as $query_post) { $count = $query_post->ratings_count; $average = $query_post->ratings_average; $total_num_votes += $count; … Read more
Performance issues with large website [closed]