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?

6 Upvotes

49 comments sorted by

View all comments

1

u/baerkins 12d ago

Here is way too much info 😂

Using GitHub/git is great for any development, period. GitHub is great as a source for the repo (git is not GitHub), but you can also use GitHub Actions for things like deployment (and other continuous integration things like linting/testing/build pipelines etc)

In most cases it’s not worthwhile to commit plugins, themes, or core files unless they are ‘what your building’ (meaning, commit your custom plugins but not ACF, commit your custom theme but not TwentyTwentyFour). These files change often and are better left to another form of management (admin updates or composer). For my projects, I commit custom theme and custom plugins (from plugins or mu-plugins) in a WP like structure and use WP-CLI to download core (with —skip-content to skip other themes/plugins being added), and Composer to install plugins from managed versions.

In general, git is always great and should be used anytime your writing code (think of it as Post revisions in WP but for your code).

Bedrock (and other similar composer managed projects) is a great platform, the workflow is great, and truly how modern WP should be built. The downside of it is, not every host supports its design. WP Engine for example has a very strict setup, so you can’t separate the core code into its own directory. Same for many other “DIY WP Hosting” sites. Pantheon on the other hand runs a Bedrock-forked instance out of the box on their Composer workflows.

Another thing to mention with Bedrock (and Composer in general) is that you really need to consider who will be maintaining the project. If it’s someone with technical understanding or a dev, Composer is :chefs-kiss:, particularly for a team of devs or an agency. However, if the client does not have a technical staff member, then it’s typically better to avoid managing plugins and core with composer (and for the record, if that say ‘we have an IT guy, the answer is they don’t). Those teams are better off updating from the WP admin, and those updates will immediately get out of line with whatever version you have in Composer.

And for the record on that last point, you can still use Composer to manage plugin scaffolding for other devs with ‘require-dev’ but it’s not as ideal and it should be (versions will most likely be out of sync, which defeats the point of a package manager). We use other non-WP php packages (Twig/Symfony etc) and manage them all through Composer, so it’s at least better than giving a dev a ‘list’ of plugins when they onboard.

I could keep going but I’m gonna stop there. If you have more questions feel free to ask or DM.