Slow search queries with a large database
Slow search queries with a large database
Slow search queries with a large database
I think the problem is here {$wpdb->prefix}prflxtrflds_user_field_data It seems your {$wpdb->prefix} value is prflxtrflds So you can directly use : global $wpdb; $results = $wpdb->get_results( “SELECT user_id FROM {$wpdb->prefix}user_field_data WHERE id = 37” );`
Searching on Google for the mentioned query, I believe your assumption that it is coming from WordPress is correct. This ticket can be found at https://core.trac.wordpress.org/ticket/31171. In my opinion, you should check what requests are coming to your website and block bad bots/users who are making multiple requests (based on that ticket, probably you have … Read more
Yes, I would suspect that your current solution may cause performance issues, if the number of comments gets high. To make the calculations a little easier for your site, you could handle them before hand based on the post ID. I.e get the post ID query all of the post’s comments’ IDs (WP_Comment_Query or custom … Read more
Drop this into a file in your plugin directory and you should be able to do this from your WP installation using a query string. /* Plugin Name: Delete Specific Post Description: Rid the post forever! Version: 0.1 Author: WPSE License: GPL2 */ add_filter(‘query_vars’, ‘delete_post_query_var’); function delete_post_query_var($vars){ $vars[] = ‘delete_post’; return $vars; } add_action(‘admin_init’, ‘manually_delete_post’, … Read more
Backup your database. Then Tools, Export from source site. Then switch to target site. Tools, Import. You may have to install the plugin (it will prompt you). Lots of googles/bings/ducks on how to do this.
WordPress install on new server not recognising MariaDB version
Import posts from a different database with the same old id
WP-CLI PHP Deprecated Warning
There is one issue I see in your code. Within ‘meta_query’ you cannot use ‘meta_key’, but it should be ‘key’. For example: array( ‘key’ => ‘_reservation_date_hour’, ‘value’ => $GMT_checkHour,//the value it is grab using ajax form ‘compare’ => ‘>=’, ‘type’ => ‘DATETIME’, ) So with your previous code all ‘meta_key’ lines were ignored. To identify … Read more