Maintainers of Custom Upstreams bear the responsibility of pulling in core updates from Pantheon. Regardless of update type, always test changes before you distribute them to your sites. We recommend using the workflow example below to test and update core.
Failure to run the most up-to-date version of core based on upstreams maintained by Pantheon (WordPress and Drupal 7 may cause incompatibilities with the platform (for example, the clear cache button, launch checks, cron, and more).
Create content on your test site and use the standard Pantheon workflow to push up to your Test and Live environments, and fully test core updates. Checkout our guide for an example of generating content from the command line.
We suggest picking a few sample sites with varying functionality and design to test updates on a Multidev environment or agencies that manage large portfolios. Release the update when things look good on these sites.
Follow the procedure to create a custom upstream and confirm that you have:
A repository for your Custom Upstream hosted with your preferred provider (GitLab, Bitbucket, etc.)
A local clone of that repository, which tracks Pantheon's upstream as a remote
Pantheon's core code merged into your Custom Upstream repository
Your Custom Upstream repository connected to Pantheon
This test site will be used later for evaluating Custom Upstream changes.
Navigate to your User Dashboard > click Create New Site.
Name your site.
Select your organization from the dropdown menu.
Click Create Site.
Select the desired repository from the Custom Upstream options.
Click Visit your Pantheon Dashboard.
Click Visit Development Site and complete the installation process for the selected framework.
Custom Upstreams cannot contain the tags
pantheon_live_n. Pantheon site level repositories use these tags to deploy code to Test and Live environments.
Navigate to the local clone of your Custom Upstream repository > add Pantheon's Upstream as a remote if you haven't done so already:
git remote add pantheon-wordpress https://github.com/pantheon-systems/WordPress.git
git remote add pantheon-drops-7 https://github.com/pantheon-systems/drops-7.git
Add the test site you created above as a remote to your Custom Upstream by grabbing the test site's repository URL on Pantheon using Terminus. Replace
<site>with your site name:
terminus connection:info <site>.dev --field=git_url
<git_url>in the following command to add your new test site as a remote:
git remote add pantheon-test <git_url>
Checkout a new branch:
git checkout -b "core-update"
It's important to use feature branches when applying and testing updates. Updates applied on the master branch and pushed to the remote repository on GitHub or Bitbucket become available to individual sites downstream. Using a feature branch gives you a chance to reveal issues before distributing updates.
Pull down Pantheon's core updates from the appropriate upstream:
git fetch pantheon-wordpress git merge pantheon-wordpress/master
git fetch pantheon-drops-7 git merge pantheon-drops-7/master
Push to your new test site on Pantheon:
git push pantheon-test core-update
Return to the Site Dashboard for your test site > navigate to the Multidev overview tab > click Git Branches.
Click the Create Environment button next to the
Use the new Multidev environment to evaluate your
core-updatebranch > merge the branch into master > push to your remote repository on GitHub or Bitbucket when you're ready to release:
git checkout master git merge --no-ff core-update git push origin master
The example command above assumes you are using the default remote destination (
origin) for your Custom Upstream repository that's hosted with your preferred provider.
Updates will become available to sites downstream as one-click updates within an hour of being pushed to the remote repository on sites running the Custom Upstream within your Organization. You can apply the updates on each site individually within the Site Dashboard, or you can apply updates in bulk using Terminus and the Mass Update plugin. Review the WordPress and Drupal Core Updates documentation for more details.