Using Live Development mode to change code on your server
Live Development is a feature that allows you to make changes to code on your Acquia Cloud Dev and Stage environments directly. This eliminates the need to make changes locally, and committing them afterwards using a version control system.
Using Live Development to edit code on your server
First, enable Live Development on a non-production environment. After which, sign in to an environment using SSH and directly edit code. Code can be either uploaded via Secure FTP or rsync. Alternatively, you could also configure an IDE on your local device to upload code directly to your Acquia Cloud server. When you are ready, you can commit changes in your Live Development directory to Git.
Your application's code repository is located on each environment at ~/[env]/livedev
. For your Dev environment, the directory can be found at ~/dev/livedev
. Similarly, on the Staging environment the directory is located at ~/test/livedev
. When enabling Live Development, this directory is initialized to contain the currently deployed branch of your Git repository. Use a code editor of your choice to make changes to your files. Changes are immediately visible in the environment being worked on. Once changes have been completed, remember to commit and push those changes to your Git repository. For information about committing changes, see Live Development workflow and Sending updates to your code repository.
Whenever Live Development is enabled on an environment, the following tasks cannot be completed:
- Deploy code from or push code to that environment using a drag-and-drop operation in the Acquia Cloud interface.
- Install a new Drupal distribution in that environment in the Acquia Cloud interface.
- Import an existing application in that environment in the Acquia Cloud interface.
Disable Live Development to restore the ability to take these actions.
Live Development employs the Acquia Cloud platform file system to ensure that your code is reachable from all web servers. Since a network file system is not well-suited for code execution, the performance of your application may be adversely impacted while using Live Development. For that reason, we recommend disabling Live Development as soon as you have concluded changes.
Enabling Live Development
To enable Live Development:
- Navigate to a non-production environment. From the overview page of that environment, select Live Development at the top right corner.
- A dialog box will appear to confirm your selection to enable live development. Click Enable.
- Allow the task to complete. This can be confirmed via the Task Log.
Live Development can only be enabled on non-production environments, such as Dev
or Stage
. Live Development cannot be enabled on your Prod
environment.
Acquia Cloud Free subscriptions have limited disk storage available. When enabling Live Development, Acquia Cloud creates a copy of your codebase. If your codebase is already using a large portion of your codebase disk quota; enabling Live Development may fail. For more information, see Managing disk storage for Acquia Cloud Free subscriptions.
Disabling Live Development
Live Development can be disabled at any time. When disabling Live Development, Acquia Cloud deploys the branch an environment was set to deploy before Live Development was enabled. As a result, users can either commit and push all changes on a Live Development directory ~/[env]/livedev
, or discard them.
To disable Live Development:
- Navigate to a non-production environment. From the overview page of that environment, select Live Development at the top right corner.
- A dialog box will appear to confirm your selection to disable live development. Should there be uncommitted changes you do not want wish to keep, please check the box for
Discard all uncommitted or unpushed changes in ~/[env]/livedev
. - Click Disable.
- Allow the task to complete. This can be confirmed via the Task Log.