How to provide a plugin which requires CMB2 (plugin dependencies)?

On your plugin activation hook method you can check if CMB plugin is installed and/or activated. You can check this using the following methods: is_plugin_active(): only available from within the admin pages function_exists() or class_exists(): available anywhere once they are PHP core methods If CMB is not installed, you can throw an error message in … Read more

Deploying WordPress with Composer

You can do whatever suits your needs, such as still using composer but configuring your implementation to place the directories back into the root along with core, however the primary purpose in having core stand-alone from other directories is for separation of concerns that are not dependant upon one another sharing the same path. The … Read more

Use composer to load custom classes [closed]

Without more context from you, I can only assume and show you what I have done that works for me using PSR4 Autoloading. Example: Assuming that all my custom class directories and files is in ./inc folder In your composer.json, add this “autoload”: { “psr-4”: { “Inc\\”: “./inc” } } Inc is the vendor name … 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

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