How to optimize wp_option table?

If you Google for “wp_options optimize” you’ll find some suggestions how to search for performance problems in wp_options. It makes sense to check which option values are very big, using the following query. Then check if you really need the plugin that wrote this setting (or remove the setting(s), if the plugin already is installed). … Read more

update to a new template without loosing any data

Look in Tools, Export on the Admin screen. You can specify what to export (posts, images, pages), and then Tools, Import to get the posts into the new site. This process is different than ‘cloning’ tools (my favorite is WP Clone). Some cloning plugins will allow you to specify only posts/images/whatever.

Not sure what to do next to optimize

It might be useful to analyze where the bottleneck is in rendering pages. Use the Developer mode of your browser (usually via F12) and then use the Network tab to see the load times of the various parts of the page. Maybe the problem is in images, or ‘off-site’ Javascript code, or any other off-site … Read more

Set SQL_BIG_SELECTS and MAX_JOIN_SIZE on a WP_Query

According to WP_Query hit max joins… How else can I build a search function that uses custom fields? you should use $wpdb->query(‘SET OPTION SQL_BIG_SELECTS = 1’); which makes sense as you set it for the current connection. You create a separate connection through new mysqli and WordPress has another on $wpdb.

Save in my custom admin page and redirect to the saved object

You can call them with $last_item = $wpdb->get_row( “SELECT * FROM $wpdb->wp_puzzle ORDER BY your_table_id DESC LIMIT 1”, ARRAY_A ); and put manualy every item in your inputs at the form public function puzzle_manager(){ global $wpdb; $file = file_get_contents(‘puzzle_manager.php’, FILE_USE_INCLUDE_PATH); if($file == false){ echo ‘file not found’; } else{ echo $file; } $last_item = $wpdb->get_row( … Read more