1. Home
  2. Docs
  3. Getting Started
  4. WP Package Installers
  5. Add & upgrade a repository

Add & upgrade a repository

If you are not using the package installer to deliver a GitHub repository you can skip these steps.

How is a GitHub repository integrated?

The WP Package Installer (WP2E) uses a registered GitHub App to pull the latest version from public / private GitHub repositories.

The WP2E GitHub App allows you to controle precisely which repo is accessible by the WP installer via “read only” permission.

There are 4 conditions for a script to be successfully imported to the library of repositories and later be synchronized as an installer dependency:

  1. The GitHub App must be connected to your WP2E account
  2. The “read-only” access to the repository must be granted to the GitHub App
  3. The script must be a valid WP theme or plugin
  4. The repository must have at least one “release” on GitHub

You can also find more details about the registered app by visiting the Github Marketplace and look for the app named “WP Package Editor (WP2E)”:

Note: The GitHub App MUST be integrated via the WP2E panel in order to synchronize with your account. If you setup the app directly via the GitHub Marketplace the service wont be able to reach it.

Connect a GitHub account

There are 2 ways to integrate a new GitHub App into your WP2E account:

  • Via the “Connected Apps”
  • Via the library of repositories

Connect via Connected Apps

1 – Click the link called “Applications” located in left sidebar of the Dashboard

2 – In the “Versioning” tab click “Connect” under the Github App.

Connect via the library of repositories

1 – Click the link called “Repositories” located in left sidebar of the Dashboard

2 – In the Tab called GitHub click the button “Connect”

Note: In both cases you will be redirected to the app page of GitHub in order to grant “read-only” permission to your repository.

Import a script to your library

Once a GitHub App is connected to your WP2E account and the access to the repository is granted you will be able to import the script repo in the library of Repositories.

1 – Click the link called “Repositories” located in left sidebar of the Dashboard

2 – To import a new Repository click the green button “+ Import” prompting a dialog box.

3 – Select your connected GitHub account and fill in the slug name of the repo, then click “Add” and wait for the response.

Note: If “read-only” access was previously granted for the repository that you are importing you can skip the following steps

Grant Read-Only access to your repository

To grant “read-only” access to a repository when a GitHub App was already previously connected you will need to go back to the settings of GitHub.

1 – In GitHub click “Settings” under your avatar logo located in the top right corner

2 – On the left sidebar of the settings click “Applications”

3 – Click the “Configure” button next to the installed app named “WP Package Editor (WP2E)”

4 – If you have protected your account with 2FA you might be asked to confirm the digits via the mobile app

5 – In the section called “Repository Access” you should see 2 options to grant “read-only” permission. If you have not selected “All repositories” click the button “Select Repositories” and search the new repository that you want to import to the WP2E library.

Note: Once the repository access is granted, go back to the library of repositories in WP2E and repeat the importing steps described above

Attach a repository to a Package Installer

There are 2 ways to start a new WordPress Package Installer:

  • from an open source package via the gallery of templates
  • from a private source repository imported from GitHub

More information about adding a repository to an installer can be fund in the instructions to create a Package Installer.

Upgrade your repository

Assuming that your script repo was previously attached as a dependency in a Package Installer you can now push upgrades to any local installation.

1 – Commit your latest theme/plugin version to GitHub

2 – Release the version directly from your GitHub repository page via the panel called “Releases”.

3 – Once the new version is released the installer package will push the notification of the available upgrade locally the same way open source scripts are usually updated in WordPress.

Note: In order to keep the master or any other branches available for development and testing, the WP Package Installer will only use the latest released tag when deploying the source in production.

How can we help?