Relaunch 4.2 utf8mb4 database upgrade

I think the answer to your question right now is “No”. There is no easy way to trigger maybe_convert_table_to_utf8mb4 on sites once they were already upgraded beyond WP 4.3 on a server that didn’t meet the requirements laid out in this post: https://make.wordpress.org/core/2015/04/02/the-utf8mb4-upgrade/ Note that, based on looking at WP source code, it seems they … Read more

Performance of my permalink structure?

You can check by looking at the size of the rewrite_rules option in the database. If it’s small (which I believe it should with this structure), you’re not using verbose rules. By contrast, if you see several lines per static page, you’re using verbose rules and it’s not good.

$wpdb won’t insert NULL into table column

Update: Since WordPress 4.4. this is now supported by the insert, update, replace and delete methods of wpdb and the ticket #15158 has been closed as fixed. Thanks to @dmsnell for commenting about that update. On the other hand, the null support in wpdb::prepare() is currently closed as wontfix in ticket #12819. Previous answer: NULL … Read more

Ignoring initial articles (like ‘a’, ‘an’ or ‘the’) when sorting queries?

The Problem I think there’s a typo in there: The name of the filter is posts_fields not post_fields. That could explain why the title2 field is unknown, because it’s definition isn’t added to the generated SQL string. Alternative – Single filter We can rewrite it to use only a single filter: add_filter( ‘posts_orderby’, function( $orderby, … Read more

Update Option Stored in Multi-Dimensional Array

As far WordPress is concerned – your multi-dimensional array is one option. To update just part of the multi-dimensional array its necessary to retrieve the entire array, alter it accordingly and then update the entire array. Suppose your multi-dimensional array is as follows: my_options = array( ‘option_a’=>’value_a’, ‘option_b’=>’value_b’, ‘inner_array’=>array( ‘foo’ => ‘bar’, ‘hello’ => ‘world’, … Read more