The Code tool within the Pantheon Dashboard on any environment allows you to interact with your site's code and review the commit log.
Pantheon Git Repository
Your site's code repository includes your entire codebase, including core Drupal or WordPress, and any contributed modules, plugins, themes, installation profiles, libraries, etc. It does not include the
files/ directory (e.g.
wp-content/uploads) and should not contain any other static assets that you do not want tracked in version control.
Drupal Code Structure
├── includes ├── index.php ├── misc ├── modules ├── profiles ├── scripts ├── sites └── all ├── modules └── themes └── default └── settings.php └── themes
sites/default/files directory is represented in your code repository as a symbolic link to the Pantheon environment's
WordPress Code Structure
WordPress site code repositories are clones of one our WordPress upstream, and consist of the following files and directories:
├── index.php ├── wp-activate.php ├── wp-config.php ├── wp-comments-post.php ├── wp-blog-header.php ├── wp-admin ├── wp-cron.php ├── wp-load.php ├── wp-links-opml.php ├── wp-includes ├── xmlrpc.php ├── wp-trackback.php ├── wp-signup.php ├── wp-settings.php ├── wp-mail.php ├── wp-login.php ├── wp-content ├── index.php ├── mu-plugins ├── themes ├── plugins
wp-content/uploads directory is represented in your code repository as a symbolic link to the Pantheon environment's
Permissions should be managed in the Dev environment via SFTP exclusively, as Git only pays attention to the executable bit.
Navigate the Code Tool
You can set the site's connection mode to git or SFTP and access connection information from within the Dev environment's Code tool. This is also where all changes to the site's codebase (located in the
/code directory) are committed.
You can also view the diff output for each individual file:
The Dev environment provides one-click updates for your site's upstream. Updates will appear in the Code tool once they are committed to the upstream repository.
The Test and Live environments do not have write access to code outside of the deployment process.
Pantheon provides default
.gitignore files in the base of each site's code repository. It includes the path
sites/default/files for Drupal sites, and
wp-contents/uploads for WordPress sites. You can use this file to exclude directories from version control and backups.
Learn how to use bots and indexing in a way that does not negatively impact performance.
You can also integrate with external Solr search indexes with services like OpenSolr.