Working with Plugins and Themes

With WP Pusher you can either install a plugin or theme directly, or you can connect an already installed plugin or theme to allow WP Pusher to manage it.

Install a plugin

You find the plugin installation screen in WP admin under "WP Pusher" -> "Install Plugin". While installing the plugin, you have the following options:

  • Repository host: Where the plugin is hosted.
  • Plugin repository: The repository handle, which is "username/repository-name". By clicking the "Pick from GitHub" button, you can copy the handle directly from a list of all your GitHub repositories.
  • Repository branch: (Optional) Specify which branch you want to install your plugin from. Defaults to master if left blank.
  • Repository subdirectory: (Optional) If your plugin lives in a subdirectory of the repository, you can specify the path here. (See "Organization" below for more detailed explanation)
  • Repository is private: Check this option if your plugin is in a private repository. Requires a license and a GitHub, Bitbucket or GitLab token.
  • Push-to-Deploy: Check this option if you want WP Pusher to automatically update the plugin every time you push new code. For GitHub and Bitbucket, this is configured automatically by WP Pusher. If you use GitLab, you need to manually set up the webhook afterwards. Learn more here.
  • Link installed plugin: If the plugin is already installed and you just want to connect it to WP Pusher, check this option. It is very important that the folder name of the plugin on your web server is the same as the repository name.

Install a theme

You find the theme installation screen in WP admin under "WP Pusher" -> "Install Theme". While installing the theme, you have the following options:

  • Repository host: Where the theme is hosted.
  • Theme repository: The repository handle, which is "username/repository-name".
  • Repository branch: (Optional) Specify which branch you want to install your theme from. Defaults to master if left blank.
  • Repository subdirectory: (Optional) If your theme lives in a subdirectory of the repository, you can specify the path here. (See "Organization" below for more detailed explanation)
  • Repository is private: Check this option if your theme is in a private repository. Requires a license and a GitHub, Bitbucket or GitLab token.
  • Push-to-Deploy: Check this option if you want WP Pusher to automatically update the theme every time you push new code. For GitHub and Bitbucket, this is configured automatically by WP Pusher. If you use GitLab, you need to manually set up the webhook afterwards. Learn more here.
  • Link installed plugin: If the theme is already installed and you just want to connect it to WP Pusher, check this option. It is very important that the folder name of the theme on your web server is the same as the repository name.

Connect an existing plugin or theme

Sometimes you want to use WP Pusher to manage a plugin or theme that is already installed. By checking the "Link installed plugin/theme" option on the installation screen, WP Pusher will do a dry run, where nothing is actually installed on your server. WP Pusher just adds the necessary lines to the database to manage updates for the plugin or theme going forward.  It is very important that the folder name of the plugin or theme on your web server is the same as the repository name, otherwise this will not work.

Manage plugins and themes

On the "WP Pusher" -> "Plugins/Themes" screen, you find a list of all the plugins and themes managed by WP Pusher. It is also here that you can grab the Push-to-Deploy URL if you need it. Hitting this URL will trigger an update, which is useful if you have some kind of continuous integration setup.

By clicking the "Update plugin/theme" button you can manually trigger an update. The "Edit plugin/theme" button will take you to the edit plugin/theme screen, where you have a few settings available, such as changing the branch. This is also where you can "Unlink" a plugin or theme, meaning that WP Pusher will be disconnected from it. This will not delete the plugin or theme, it will only disconnect WP Pusher from managing updates.

Organization

The recommended way to structure your projects is to have each plugin and theme in their own Git repository. This makes managing the code simpler and makes it easier to reuse code across projects. If you have a few utility plugins you use for multiple clients, WP Pusher makes it super easy to keep all of those up-to-date in all of the different places they are installed. However, it is not required that you keep everything separate. WP Pusher supports multiple different workflows:

  • Keep every plugin and theme in its own repository (recommended - see above)
  • Keep multiple themes and plugins in one repository
  • Keep all of /wp-content in one repository
  • Keep all of WordPress in one repository (not recommended)

WP Pusher won't get in your way, even though we have a recommended way of organizing your code. With the subdirectory option, you can tell WP Pusher where in the repository a plugin or theme lives.

Let's say you have all of /wp-content in one Git repository and that it contains 2 plugins and 1 theme. You would then install those 3 packages separately, with the following subdirectory settings:

  • plugins/plugin-1
  • plugins/plugin-2
  • themes/theme-1

WP Pusher will then know to grab the plugins and theme from their respective subdirectories when it fetches a new copy of the repository.

Need any help?

If you have any questions about WP Pusher, Git or WordPress, our email is hi@wppusher.com. Don't hesitate shooting us a message! You can also click the little ❤️ in the corner of this page.