How to prepare (compress/zip) a plugin to enable updating instead of adding new instance?

This is the default behaviour for WordPress. But there is a plugin called “Easy theme and plugin upgrades” that handles this for plugin and template updates: https://de.wordpress.org/plugins/easy-theme-and-plugin-upgrades/ After installing the plugin, you can just upload a new zip and it wont’t install another plugin/theme instance. Instead, the plugin generates a backup of the older version … Read more

$wpbd->insert_id is returning null

I have been trying to return a $wpdb->insert_id; but unfortunately, it is returning null; That’s not true, you haven’t been returning $wpdb->insert_id at all. // insert $toevoegen = $wpdb->insert( … ); $lastinsertid = $toevoegen->insert_id; You’ve been returning $toevoegen->insert_id, which is wrong. According to the docs $wpdb->insert will return either false or it will return the … Read more