Page MenuHomePhabricator

Enterprise WP custom plugins deploy pipelining
Open, Needs TriagePublic

Description

Right now the way our plugins are added is via /wp-admin/ direct upload or search & download from WP public repo from within /wp-admin/. Our custom-developed plugins have to be zipped locally and uploaded via the /wp-admin/ along with any premium plugins.
Updates to plugins work as follows:

  • any public plugin updates automagically within /wp-admin/ as it normally would/should - this is fine.
  • any premium plugin we obtain has their own, or similar, updating process - this is fine.
  • our custom-developed plugins are where the issues comes in. In order to update them, we have to zip locally and upload and pray WordPress extracts that and replaces the older plugin files/dir properly. This has caused issues; especially needing to do any rollbacks in versioning or if there's an error it can take down the site and we have no way, aside from contacting S&F, to fix the problem quickly.

Ideally we'd have:

  • public plugins still search and install/activate from WP repo like we have it now
  • premium plugins are still uploaded via wp-admin as they are now and those update via the normal wordpress plugin update in admin
  • custom-developed plugins, we've build and are version controlled in our site repo, would automagically copy/overwrite/write from the repo dir structure to the wp-content/plugins/ directory during build pipeline and any changes we push are simply included in the build process.

Event Timeline

Ideally, we should have all plugins installed manually - or all plugins installed "automagically".
Since we are using containerized approach and installing the plugins manually right now - all the plugins are found on a shared volume, mounted to all the containers. This way all the updates are reflected immediately on all the running instances of Wordpress. If we want our custom plugins to be installed in automated manner - we need an extra step in startup script, which will copy plugins to the plugins directory, which was mounted on startup.
Alternatively WP config could be modified to get the plugins from different directories, so all the public and premium plugins could be in mounted volume ("Directory A"), while all the custom plugins could bundled in docker image, in "Directory B". I'm just not sure Wordpress supports such a config (doubt it, but need to double-check).

AnnaMikla changed the task status from Open to In Progress.Oct 4 2022, 7:06 PM
AnnaMikla moved this task from Estimated /Discussed to In Progress on the Wikimedia Enterprise board.

installing the plugins manually right now

by "manually" you mean from the WP plugin repo via wp-admin and not the WME-repo held custom plugins right?

And I don't believe WordPress needs to be config'd differently at all from how it is now; we just need to make sure the plugin dirs and files are in the right location during any build before WordPress' PHP inits from a nginx request. To me it feels like, during build pipeline, we can copy and overwrite the custom plugin dirs & files with the gitlab-repo dirs & files as they may be updated; hence the deploy. Exactly how that happens is up to you guys but all the non-gitlab-repo plugins are fine and nothing should change with how those are handled; just the custom plugins held in gitlab.

AnnaMikla changed the task status from In Progress to Open.Oct 28 2022, 12:27 PM
AnnaMikla changed the task status from Open to In Progress.
Felixejofre changed the task status from In Progress to Open.Jan 20 2023, 3:39 PM
Protsack.stephan raised the priority of this task from Low to Needs Triage.Mar 1 2023, 8:34 AM