ob_end_flush error when using wpdb in plugin

You did not provide that information, so I have to guess a little bit: You are using PHP 5.4 and zlib.output_compression is on on your server? Then you just stumbled upon bug #18525. Possible solutions: Disable zlib.output_compression. Apply the patch provided there and report back on that ticket if it works. Disable notices. What you … Read more

WordPress plugin DB upgrade

In short, no. But it’s not particularly complicated. Just add a new version_compare block each time you revise the database: $db_version = get_option( ‘my_plugin_version’ ); if ( version_compare( $db_version, ‘1.1’, ‘<‘ ) ) { // Initial update code added in 1.1 } if ( version_compare( $db_version, ‘1.2’, ‘<‘ ) ) { // Additional update code … Read more

Memory Leak in plugin action

Depending on what exactly you’re trying to achieve, I agree with Tom’s comment, that a WP-CLI command might be better. The advantage is that the command runs from php directly on the server (usually has no max execution time, loads different php.ini, etc.) and you don’t need to involve the webserver. If that is not … Read more

Add post thumbnail from external image with plugin

you should have a look to this blog post : http://www.maverick.it/tech/create-thumbnails-using-wordpress-built-in-functions then, if you can’t use a remote image, just download it as a temporary file on your server, process and delete it. One your image created, you should then insert it as an attachment (http://codex.wordpress.org/Function_Reference/wp_insert_attachment) and set it as the post thumbnail (http://codex.wordpress.org/Function_Reference/set_post_thumbnail) I … Read more

Too many variations in WooCommerce

OK, I think I have found an answer to my own question. It appears that the broken admin pages with too many items were a result of my hosting provider (Dreamhost) having “extra web security” checked in the setup of the site. This apparently stops WordPress from updating when the query is too large. Disabling … Read more