Changing plugin slug with update

If you just wanted to just change the filename you would have both myPlugin.php and myplugin.php in the plugin and then update the option active_plugins in the database to the new name. Once all of the users have updated you can remove myPlugin.php. But you want to rename both the folder and filename. I would … Read more

wp core update not working anymore

What is inside your version.php file? File: /wp-includes/version.php 1: <?php 2: /** 3: * The WordPress version string 4: * 5: * @global string $wp_version 6: */ 7: $wp_version = ‘4.7.1’; You can play with that number and test. You can try to install the latest version of WP Cli and test. You may update … Read more

WordPress with composer, how to handle updates?

Basically in “common” WordPress setup you have two things inside the folder that aren’t part of the core itself: content folder and wp-config.php configuration file. So you are on completely right path: You configure content folder to be elsewhere, outside of core folder You place wp-config.php one directory level above the core folder (WP will … Read more

How do I update a custom theme

Here is a full documentation for how to do this: Github updater – Documentation Upload in wordpress Download the latest tagged archive (choose the “zip” option). Unzip the archive, rename the folder correctly to github-updater, then re-zip the file. Go to the Plugins -> Add New screen and click the Upload tab. Upload the zipped … Read more

“You have the latest version of WordPress. Future security updates will be applied automatically.”

Since version 3.7 WordPress has automatic background updates. By default, only minor releases – such as for maintenance and security purposes – and translation file updates are enabled on most sites. In special cases, plugins and themes may be updated. Of course, as with many things in WP, you can modify that behavior with config … Read more

Check if any users are logged in before running update

Because of the stateless nature of webpages, you can’t do this without a high margin of error. You can install a plugin to log last visits for logged in users, but that will not tell you if they’re editing posts or if they loaded a page then went to lunch or shut down their computer. … Read more

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

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.

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