r/devops • u/OhMyTechticlesHurts • 4d ago
Discussion DevOps for Wordpress
I have a WordPress team still building and maintaining sites without a DevOps workflow. What's the best way to bottstrap them into a more modern method of development. I'm assuming GitHub and GitHub actions. But what else, composer which we don't really use even tho we have PHP devs, wp-cli which I use but I'm suppose to be a sysadmin and cloud engineer to wp devs who don't do any of this. They don't even use local git which I even use. Trying to express WordPress engineering and un/structured data and all these modern concepts that just go over their heads bc what's worked still works but when it comes to larger clients who expect more from us/them, they're basically fish out of water.
14
5
u/MissiveFinding6111 4d ago
Mostly baffled, but trying to bring this around...
I don't think you need DevOps, I think you just need basic systems engineering.
I'd start with "Backups".
Do they have any? When is the last time they were tested?
Sane DR > DevOps
2
u/OhMyTechticlesHurts 4d ago
We have routine backups and server snapshots. But their issue is scaling. They have ecom sites and other traffic heavy sites but don't do any type of systems engineering. Trying to get them to understand the need for separate servers to run separate services is a hard concept for them to take in. The usual answer is why, if someone even takes the time to ask that.
2
u/21shadesofsavage 4d ago
the answer to why is high availability and cost. why scale a whole system when you can scale the specific service to meet traffic demands. business will always want to hear about how to lower cost while improving uptime on their moneymakers. if they don't, can't fix dumb
what is the current method of scaling? your problem is more on buy in than technical implementation. gotta communicate to people what they'll gain from whatever your scaling solution ends up being. what issues are they running into rn. do they care about developer time being saved through automation and allocated elsewhere?
1
u/OhMyTechticlesHurts 1d ago
Currently I'm the scaler. Im a cloud engineer and I'm trying to get the dev side to understand the reasons WordPress is designed for an old way of developing and what needs to be done to make it scalable. Testing with one client I at least got them to split out a db. Trying to drag them into using a cloud storage solutions for media uploads. Then once I have code isolated (or simultaneously) I can get devs into git, using composer to compile a WP install with plugins, and using containers. It’s a lot of stepping stones.
2
u/Revolutionary_Click2 4d ago
I kid you not, I created a whole custom WordPress plugin for the purposes of managing configuration and content via GitOps (ArgoCD on k8s). I was surprised to find nothing much existed that fit what I needed, so I made one. WordPress is a bit of a dinosaur in this respect, it was designed in an earlier era to run as a persistent server instance, not be managed in code. And no, sorry, not sharing that plugin publicly at this time… someday I might open source it, but it needs further review first. It’s been working for us though, I use it to manage a few customer websites we host.
2
u/g3t0nmyl3v3l 4d ago
I lead a DevOps team that helps a platform host and maintain thousands of WP sites.
There’s a wide range of solutions to the problems you’re alluding to, I could get into the technicals if I had more specifics. The problem is finding real business value in modernizing the process, getting buy-in from your leadership, and finally you need great IC leaders who both understand your goals and can guide your developers/engineers.
You will get pushback, because the efficiencies will mean that your people can move so fast that they’re jobs will likely be at risk unless your leadership has a plan for what else they can work on. Not having that buy-in from internal staff will cause logistical failures and will make your life hell.
1
u/ArieHein 4d ago
Replace them all with ai
1
u/OhMyTechticlesHurts 4d ago
Most of them probably could be. We have a lead full stack developer that doesn't know you're not supposed to put custom code in a WP plugin. Lead developer breaking his own site with debug code blaming it on the new database until I have to double-check his code. I'm just twiddling thumbs till I find something else but I like resolving tech issues so I'm trying to find the solution for myself if noone else.
2
u/ArieHein 3d ago
Oh boy.. Its like seeing already their linkedin posts..
What you can do is abstractions and a bit of politics. Find someone who shows intrest or brain to team up.
I had python devs that didnt want to touch their pipelines, and i agreed with them, as it was in jenkins and therefore heavily using variation of groovy. Instead i created a few python scripts and bundled them as a shared library so all pipelines did is call a bunch of python functions. This made it 'brain dead' easy for them to use and even contribute to the python code while i created the PR for new versions of those scripts.
The commit to branch/main triggers everything including deploying first to a test site, allowing some integration tests, some visual inspection and then deploy to prod.
These devs have managers that have managers. If you are able to show metric and graphs (managers love graphs with numbers), you will be able to convince them to start using this method.
1
u/21shadesofsavage 3d ago
curious, why are you not supposed to use custom code in a wordpress plugin? i never used wordpress. isn't the point of a plugin to extend capability, with your own code
1
u/OhMyTechticlesHurts 1d ago
Yeah when it’s a 3rd party plugin from the WP repo it’s bound to be overwritten when there’s an update. Ideally if you made a custom plugin you would have a separate directory that’s not recognized in WPs Repo unless you submit it. Some larger plugins will also have theme code that you’re suppose to copy into your own theme as a template but in this case they just wrote over the template. Listed in the website as their Lead Full Stack Developer.
Here how bad it is. When they couldn’t determine what happened, they had me spin up a vm of the night before snapshot just to retrieve the code. No git. No local version. The way they do staging is in one big php user vhost account in the hundreds of gbs so can’t just do a basic backup and pull from it. Only once I stood up the vm did we all come to the conclusion of why it went missing. Common WP knowledge for a professional WP developer/even most novice. That’s the BS I’m dealing with.
1
1
u/arandomuserinweb 4d ago
The biggest barrier isn't technical, it's cultural. If you try to force Docker, CI/CD, and Composer on them all at once, you'll hit a wall of resistance. The trick is to introduce modern practices in phases:
Isolate the Code: Start by requiring Git strictly for custom themes and custom plugins. No more live FTP editing, and no committing WordPress core or uploads to the repo.
Simple Local Environments: Give them tools like LocalWP or Lando that abstract away container complexity so they stop testing directly on live servers.
Automate Deployments (GitHub Actions): Trigger automated SFTP/SSH deployments when code is merged into main. Once they see they no longer have to manually upload files, they'll instantly get the value of version control.
Dependency Management (Composer): Introduce WPackagist to manage plugins and themes as packages, eliminating manually uploaded ZIP files.
Clarify the Golden Rule: Code flows down (Local -> Staging -> Production) and the database flows upwards (Production -> Local with WP-CLI for testing).
0
32
u/moader 4d ago
"WordPress" "DevOps" ... 😂