16.08.2024・TechStuff
16.08.2024・TechStuff

Shopware: Plugin install on CLI works, but admin removes it again!?

Fabian Blechschmidt


Today I had a weird behaviour of one of our customers store. We tried to install the Shopware Security Plugin and what happened was:

  1. I install the security plugin via composer
  2. I refresh the plugins via CLI -> plugin is in CLI and database
  3. I activate and install the plugin -> plugin is installed in CLI and database
  4. I update the plugin list on the admin area -> the plugin is deleted from database and gone in CLI

TL;DR: Opcache.

I turned to Shopware’s slack and asked the community. We had this behaviour in the past, but I couldn’t remember what the problem was.

Thankfully I got an answer <3

I think I had this problem once as well. Have you cleared OpCache? If I remember correctly, that did the trick for me

Johannes Przymusinski [die-lobby.de]

Thanks Johannes!

Reset opcache

I know two ways to reset opcache:

  1. Restart PHP-fpm
  2. or using the awesome cachetool by gordalina!