register_uninstall_hook() vs uninstall.php – which one is better way to handle plugin uninstallation script?

The benefit of uninstall.php, and the reason that it was introduced, is that it allows you to isolate your uninstallation code from the rest of your plugin’s code. This means that your entire plugin doesn’t have to be loaded when it is uninstalled. That minimizes the chance that your plugin will inadvertently run code during … Read more

Uninstall, Activate, Deactivate a plugin: typical features & how-to

There are three different hooks. They trigger in the following cases: Uninstall Deactivation Activation How-to trigger functions safely during the scenarios The following shows the right ways to safely hook callback functions that get triggered during the mentioned actions. As you could use this code in a plugin that uses plain functions, a class or … Read more

Removing all installed OpenCV libs

By default, when building OpenCV from source, it will place it’s output in /usr/local/lib and /usr/local/bin. Although, judging from your error messages, it looks like it placed the libraries in /usr/lib and the binaries in /usr/bin, so you might also check in there. You can also use the Linux find command. So, to find all … Read more

How can I remove a package from Laravel using PHP Composer?

Composer 1.x and 2.x Running the following command will remove the package from vendor (or wherever you install packages), composer.json and composer.lock. Change vendor/package appropriately. Obviously you’ll need to remove references to that package within your app. I’m currently running the following version of Composer: Documentation Updates 26/10/2020 – Updated answer to assert command works … Read more

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