Continuous integration for your WordPress development

At some point in your WordPress theme or plugin development you will come to a point where you would like to use Continuous Integration tools (CI) to distribute your releases to your clients.

Perhaps you have a custom WordPress plugin which you are using in a lot of WordPress installations and you have found a bug. At this moment it can be really frustrating to update every WordPress installation manually.

For these use cases a continuous integration workflow is a good solution, because you are able to automate your entire WordPress development.

In this tutorial we are using GitHub Actions, but you can use any CI-tool (for example from GitLab, CircleCI …) of your choice.

Development workflow

Historically a lot of WordPress developers are using the following workflow for the theme or plugin development:

  1. Coding
  2. Testing
  3. [Push to git]
  4. Transfer your source code to a WordPress installation, either:
    • With (S)FTP or SSH client
    • Or you upload a zip archive within WordPress

A more modern Continuous integration workflow for WordPress should look like this:

  1. Coding
  2. Local testing
  3. Push to git
  4. Use CI for
    • Testing in the cloud
    • Releasing
    • [Distributing]

CI with GitHub Actions

Our main objective to use GitHub Actions as a CI-tool in the WordPress development, is to automate the release process, so that we can distribute the source code securely and automatically to our clients.

Whenever someone pushes new code to the master branch of the plugin or theme, the source code will be packaged into a distributable zip archive and will be published to the private WordPress theme/plugin directory on Wordup.

You only have to create a new yaml file in .github/workflows/wordup.yml of your Wordup project. You can see an working example under https://github.com/wordup-dev/wordup-example-project/blob/master/.github/workflows/wordup.yml

Example project

The wordup.yml file belongs to an example WordPress project for Wordup, which you can use as a starting point for CI with WordPress: https://github.com/wordup-dev/wordup-example-project

Distribution

After publishing your WordPress theme or plugin to Wordup, the release is ready for distribution.

In order to use the default update function within WordPress, you can use the wordup-connect plugin. After installing this plugin, your theme or plugin will check for new versions on Wordup and new releases will be accessible for all your clients immediately.

Login  Sign Up