This lesson demonstrates how to develop using the WordPress Dashboard in SFTP mode. We'll install a few plugins and submit each one to version control as individual commits.
Navigate to Code in the Dev tab of your Site Dashboard. Confirm your Connection Mode is set to SFTP.
Now log in to your Dev site by clicking the Site Admin button.
On the left admin menu, select Plugins, then Add New.
Search for the Yoast plugin, then click Install Now:
If you encounter a prompt for FTP credentials, you're either working on the wrong environment or you're using the wrong connection mode. Don't try to authenticate FTP prompts within the WordPress Dashboard, it won't work (by design). Using the WordPress Dashboard to add or modify code is only allowed using the SFTP connection mode on the Dev environment.
Return to the Pantheon Site Dashboard and click the yellow notification to review file changes as a result of our actions in the WordPress Dashboard:
You should see the following files for our recently installed plugin:
Rather than piling a bunch of changes on top of this plugin, get into the habit of saving code in small incremental amounts with meaningful commit messages.
Write a message that summarizes your work to let your team (and your future self) know what these changes do and which feature(s) they pertain to. For example, Add Yoast plugin Version: 5.7 is much better than New plugin or asdfasdf.
Click Commit to submit work from the WordPress Dashboard to Git in the Site Dashboard:
For practice, add these plugins next, each with their own commit message. These plugins allow your site to take advantage of some of Pantheon's performance optimizations:
Pantheon Advanced Page Cache
WordPress Native PHP Sessions
The commit log within the Pantheon Site Dashboard should look something like this:
Learn more about these plugins
Automatically clear related pages from Pantheon's Global CDN when you update content. Without this plugin, pages expire from cache after 10 minutes (600 seconds) by default. This plugin allows fresh content to be immediately served to anonymous visitors.
This plugin provides a more scalable way to handle sessions than PHP's default session manager. Some plugins will require this to run on Pantheon's distributed infrastructure. For more details, see WordPress and PHP Sessions.
Provides situational awareness within the WordPress Dashboard when working on the Pantheon platform. It's helpful to have a reminder of which environment you're in, as well as quick access to links to get back to Pantheon's Dashboard, or to interface with your WordPress installation via the command line:
Bam! You just nailed our first demonstration of using version control with WordPress on Pantheon sites. Follow this same approach to update plugins and for any other development tasks you normally handle in the WordPress Dashboard.