Using wp-cli to Update WP Networks / Multisite from 3.5.1 to 3.8

For regular users, the preferred update method is pressing the “Update” button in wp-admin. For sysadmins, wp core update + wp core update-db will probably be a lot faster. Note that for multisite instances, you’ll have to update the DB for each site in the network. See https://github.com/wp-cli/wp-cli/issues/683 NB: I might be biased, since I’m … Read more

How get list of updates of wp site?

When on the admin view you can use the following functions to get update data. get_plugin_updates() get_theme_updates() get_core_updates() If you want to build your own functions, then you can get update related data from site transients update_themes, update_plugins, and update_core. Then you can compare the plugin and theme transients with the theme and plugin arrays … Read more

register_activation_hook and updating

register_activation_hook() is only called when the user activates the plugin. It is not called after a plugin upgrade. The preferred method of handling upgrades is using register_activation_hook() to store the current version in the wp_options table and then checking it on each admin page load.

Remove update messages for deactivated plugins

Yep Its possible if you hook a function to site_transient_update_plugins filter hook and check if plugin is activated using is_plugin_active like this: add_filter(‘site_transient_update_plugins’, ‘remove_update_nag_for_deactivated’); function remove_update_nag_for_deactivated($value) { foreach($value->response as $key => $val){ if (!is_plugin_active($val)) unset($value->response[ $key]); } return $value; }

Filter Hook on plugin update

Maybe upgrader_process_complete() action hook. Fires when the bulk upgrader process is complete. On line 761 of wp-admin/includes/class-wp-upgrader.php From source: /** * Fires when the upgrader process is complete. * * See also {@see ‘upgrader_package_options’}. * * @since 3.6.0 * @since 3.7.0 Added to WP_Upgrader::run(). * @since 4.6.0 `$translations` was added as a possible argument to … Read more

Multisite database upgrade SSL error

If possible, you should try and fix the cause of this error – invalid SSL certificates. But there are some instances where this is not possible or desirable. One obvious one being development sites using a self-signed SSL certs. One way around this is to set $ssl_verify to false before line 1161 of wp-includes/class-http.php: curl_setopt( … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)