Then run composer require yoast/wordpress-seo-premium.
If I do that, I see the Yoast plugin installed, but I am not able to activate it. If I try wp plugin activate wordpress-seo-premium I get the following error:
Fatal error: Uncaught TypeError: Yoast\WP\Lib\Dependency_Injection\Container_Registry::register(): Argument #2 ($container) must be of type YoastSEO_Vendor\Symfony\Component\DependencyInjection\ContainerInterface, null given, called in /nas/content/live/bedrocktestdev/wp-content/plugins/wordpress-seo/lib/abstract-main.php on line 45 and defined in /nas/content/live/bedrocktestdev/wp-content/plugins/wordpress-seo/lib/dependency-injection/container-registry.php:28
Other plugins get different but similar errors. Am I missing something as far as loading the dependencies for these plugins?
Totally get that, but this isn’t specific to this one plugin. I haven’t been able to install any other premium plugins through the same process, so wanted some input on if I’m missing something in the process.
My best guess is that there needs to be an install of the dependencies for the plugin, but running composer install or composer dump-autoload --no-interaction --optimize in the plugin directory doesn’t seem to do it.
If this helps, I am using that plugin with Bedrock and wp plugin activate wordpress-seo-premium works as expected after composer install. Not using Trellis, but have (manually) added an auth.json in the project root directory with the following stucture:
A possibly irrelevant note: I was having trouble getting a clean wordpress-seo-premium install when the free plugin, wordpress-seo, was listed in composer.json. The premium plugin installs that automatically when it is installed.
I do have the auth setup in auth.json. The plugin was installing just fine, just not activating.
Turns out my deploy script was ignoring anything in .gitignore which included the vendors folders. Working now that I’ve included those folders in the deploy- all good, thanks everyone!