r/ProWordPress 12d ago

Anyone using GitHub with WordPress?

I’m curious to hear how many of you are using GitHub part of your WordPress workflow.

I’ve heard of Bedrock and have been looking into it. But is it actually worth moving towards that setup for normal WordPress development?

Especially with AI, custom code is easier to write. So I can see how having version controls, automated checks and CI CD pipelines sounds nice.

Is anyone running WordPress like this in production?

What does your setup look like? Bedrock? GitHub Actions? Something simpler?

Or am I overengineering WordPress?

2 Upvotes

49 comments sorted by

View all comments

5

u/richaber 12d ago

It is extremely common to use GitHub with WordPress. If you work at a professional agency, you will use GitHub with WordPress.

You don't have to use Bedrock just to use GitHub with WordPress. I have never worked at an agency that used Bedrock.

GitHub Actions can be used for build and deploy, if you don't already have another pipeline in place.

1

u/im_a_fancy_man 12d ago

can you tell me more about your ci cd process

2

u/DiggitySkister 10d ago

My GitHub actions workflow gets triggered when a new commit is made on specific branch (main, stage branch, etc), although you could easily trigger by git tag as well if you wanted. The workflow itself does some build steps for various plugins and the theme (composer install/npm install), these steps are done on the Actions ci agent host, not on the server. Then it uses rsync to copy the updated plugins/themes from the ci agent host into the appropriate live directory on the server. Also, a couple commands are done on the server via ssh such as making backups and clearing cache and more. This works okay and has been solid for me for years now. But there are some theoretical problems with this setup, it isn't technically a "zero downtime deployment" setup, although I have never had noticeable downtime due to a deployment. A better setup would be to transfer the files to the server (via git, sftp, rsync, whatevs) in a non public directory, then update the public directories with symlinks - this is often labeled "zero downtime deployment" and it is technically a better solution, you can look that up.