Skip to content
Kaspars Dambis edited this page May 25, 2020 · 8 revisions

Welcome to the VIP Go site documentation!

The readme.md of the VIP Go site template is used for documenting the day-to-day tasks and processes while this wiki covers the actual process of setting up a site the VIP Go platform.

Contribute

Clone this wiki for local editing:

git clone [email protected]:xwp/vip-go-site.wiki.git

Let's keep the documentation in a single file for discoverability.


VIP Go Site Documentation

Site Migration Checklist

This is a step-by-step guide to migrating a website to the VIP Go platform:

TODO.

Site Setup Checklist

WordPress.com VIP Shared Plugins

The WPCOM VIP platform provides a shared plugin repository for plugins that are available globally for all themes, and can be loaded using wpcom_vip_load_plugin().

On the VIP Go platform the plugins inside themes are no longer supported and must be added as project-wide dependencies under /plugins of the site repository.

XWP provides a Composer registry for these shared VIP plugins at https://xwp.github.io/vip-wpcom-plugins/ (with source on GitHub) so that they can be defined as theme or project-level dependencies.

This registry is synchronised with the VIP SVN repository automatically every week.

On VIP WPCOM the dependencies had to be defined at the theme level so the shared plugins can be defined in the composer.json of the theme if the theme is also added as a dependency to the VIP Go site project. Alternatively, the VIP shared plugins can be "required" in the composer.json of the VIP Go site.

  1. Define the custom repository for the VIP Shared plugins in composer.json:

     {
       "repositories": [
         {
           "type": "composer",
           "url": "https://wpackagist.org"
         },
         {
           "type": "composer",
           "url": "https://wpackagist.org"
         },
         {
           "type": "composer",
           "url": "https://xwp.github.io/vip-wpcom-plugins"
         }
       ]
     }
    

    in addition to Packagist and the WordPress Packagist in this example.

  2. Require the necessary plugins:

     composer require xwp-vip-wpcom-plugins/PLUGIN_DIRECTORY_NAME
    

    where PLUGIN_DIRECTORY_NAME is the directory name of the plugin in the shared VIP plugin SVN repository. See the list of the available packages.

    Reference the SVN revision number to load the plugin at a specific revision:

     composer require xwp-vip-wpcom-plugins/PLUGIN_DIRECTORY_NAME@12345
    

    where 12345 is the revision number for that plugin directory.

Plugin and Theme Updates

Using Composer for managing WordPress plugin and theme dependencies allows us to utilize most of the existing GitHub dependency bots for keeping them updated. These bots track dependency updates and open pull requests which trigger CI test runs.

Here are some of the GitHub bots that support Composer:

Dependabot supports private packages and git sources.