Regular XML-RPC timeouts

I was able to greatly reduce the severity of the problem by installing/activating the PHP extension file-info, which was flagged by WordPress as a configuration issue. While it didn’t eliminate the issue completely, the lockup only happened once more during my post migration and the unavailability was much shorter than previous occurrences. Now that the … Read more

What is this? MySQL array?

WordPress stores meta and option values in a serialized format if they are objects or arrays. So what you have there is an array (a) with an integer (i) key 0 and a string (s) value with 82 characters.

SQL query to change custom field in WordPress database

Recommend a database backup before you do this. ** updated the statement to specify “Y”, empty string, or null ** global $wpdb; $wpdb->query( “update {$wpdb->postmeta} SET meta_value=”X” WHERE meta_key = ‘old_price’ AND ( meta_value=”Y” OR meta_value=”” OR meta_value IS NULL ) );” );

Find locations of all featured images of draft posts via SQL

Alright this worked for me: First run the bellow script to generate the file locations of all files used for draft posts. SELECT voybp_posts.guid FROM voybp_posts WHERE voybp_posts.ID IN (SELECT voybp_postmeta.meta_value FROM voybp_postmeta WHERE voybp_postmeta.post_id IN ( SELECT voybp_posts.ID FROM voybp_posts WHERE voybp_posts.post_status=”draft”) AND voybp_postmeta.meta_key=”_thumbnail_id”) Export this as a CSV file and save it to … Read more

How to search usermeta table

This works: $WhoIsUser = get_users( array( ‘meta_key’ => ‘deviceid’, ‘meta_value’ => ‘45545’ ) ); This returns the whole row for that user from the users table. If you print_r it out like so: echo ‘<pre>’ echo print_r($WhoIsUser, TRUE); echo ‘</pre>’ you get: Array ( [0] => WP_User Object ( [data] => stdClass Object ( [ID] … Read more

edit_user_created_user hook – using to update Groups

The GravityForms folks chimed in. To clarify, I wanted to add a row to a database table on user activation (not on form submit), and I had not found that hook. Here is the completed code… add_action( ‘gform_user_registered’, ‘hl_add_group’, 10, 4 ); function hl_add_group($user_id, $feed, $entry) { $group = $entry[8]; global $wpdb; // add form … Read more