Notice: Uninitialized string offset: 0 in social sharing mu-plugin

Your custom get_the_post_thumbnail_src() function returns a string and not an array, hence in the following code, $sb_thumb is not an array: $sb_thumb = get_the_post_thumbnail_src(get_the_post_thumbnail()); So the PHP notice in question occurred because you used $sb_thumb[0] in the following code, which appears twice in your wpvkp_social_buttons() function: $pinterestURL = ‘https://pinterest.com/pin/create/button/?url=”.$sb_url.”&media=”.$sb_thumb[0].”&description=’.$sb_title; And to get rid of the … Read more

Are these WordPress tables safe to add indexes to?

These tables aren’t indexed These tables are indexed For example, the post meta table has these indexes: https://codex.wordpress.org/Database_Description#Indexes_5 You’re more likely to cause issues or reduce performance through bad indexing by adding new indexes. WP already specifies indexes for tables “dbmain” “wp_mf_post_meta” “post_id” “Not indexed” “dbmain” “wp_mf_custom_fields” “custom_group_id” “Not indexed” Those are not WordPress tables, … Read more

WordPress(wpdb class) and mysql stored procedures

wpdb detects the type of query and returns the result if it starts with select, else the affected rows. Since yours starts by call, it’s probably mistaking it for an insert, update, delete, etc. statement. Try this (might trick wpdb into thinking it’s a select statement: /* select */ call …; Or this (not sure … Read more

Speeding SQL queries for a large database?

Your log shows that MySQL is performing a linear scan of all table records to get the necessary row – this is because there is no index for guid Assuming wp_rb_posts is just the normal posts table with a slightly modified prefix, then you can just add an index for that field, and you’ll see … Read more