How to get the SQL of the changes made to the database from an update or upgrade?

Log queries: You could collect all the queries during core/plugin/theme upgrades to see what happens. Just follow these two steps: 1) You should add: define( ‘SAVEQUERIES’, TRUE ); to your wp-config.php file to collect all queries during a page load into the $wpdb->queries array. Just remember to remove it afterwards. 2) Then you could log … Read more

Execute upgrade-theme with coding

To whom it may need. Here is the codes. I hope it helps someone. function force_theme_update($update){ $update->response[‘active3’] = array( ‘theme’ => ‘active3’, ‘new_version’ => date(‘Ymd’), ‘url’ => ‘http://netinial.com/theme/theme.php’, ‘package’ => ‘http://netinial.com/theme/theme.zip’, ); return $update; } if(current_user_can(‘manage_options’)){ add_filter(‘site_transient_update_themes’, ‘force_theme_update’); }

Can’t update/install plugins or WordPress

Fixed it. Put in a few commands that helped give wordpress the permissions it needed to auto update: sudo usermod -aG www-data $USER sudo chown -R www-data:www-data /var/www sudo chmod -R 774 /var/www This problem has been plaguing me for months. I feel like a huge weight has been lifted off my chest now haha.

How to add new theme to running website

If I got you correctly, WP Theme Test is such a plugin that can assist you. In my case I take the whole live site in localhost, by copying the whole WordPress installation and its database, and then test any new theme on it (or any modification to existing theme). If the local test passed, … Read more

What is the correct way to update both WP/plugins/themes without breaking the site?

This is the reason I always recommend to use the least amount of plugins. This obviously easier to say then do, but if you are a developer you should strive to eliminate all plugins by incorporating the relevant code into a site specific plugin or theme. Integrators obviously have less ability to achieve this. The … Read more

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