Deploy Drupal on Upsun Fixed
Back to home
On this page
Drupal is a flexible and extensible PHP-based CMS framework. To deploy Drupal on Upsun Fixed, the recommended way is to use Composer, the PHP package management suite.
This guide assumes you are using the well-supported Composer flavor of Drupal.
To get Drupal running on Upsun Fixed, you have two potential starting places:
-
You already have a Composer-flavored Drupal site you are trying to deploy. Go through this guide to make the recommended changes to your repository to prepare it for Upsun Fixed.
-
You have no code at this point.
If you have no code, you have two choices:
-
Generate a basic Composer-flavored Drupal site. See an example for doing this under initializing a project.
-
Use a ready-made Drupal template.
-
A template is a starting point for building your project. It should help you get a project ready for production.
Before you begin
You need:
- Git. Git is the primary tool to manage everything your app needs to run. Push commits to deploy changes and control configuration through YAML files. These files describe your infrastructure, making it transparent and version-controlled.
- A Upsun Fixed account. If you don’t already have one, register for a trial account. You can sign up with an email address or an existing GitHub, Bitbucket, or Google account. If you choose one of these accounts, you can set a password for your Upsun Fixed account later.
- The Upsun Fixed CLI. This lets you interact with your project from the command line. You can also do most things through the Web Console.
Initialize a project
You can start with a basic code base or push a pre-existing project to Upsun Fixed.
-
Create your first project by running the following command:
platform create --title PROJECT_TITLEThen choose the region you want to deploy to, such as the one closest to your site visitors. You can also select more resources for your project through additional flags, but a Development plan should be enough for you to get started.
Copy the ID of the project you've created.
-
Get your code ready locally.
If your code lives in a remote repository, clone it to your computer.
If your code isn't in a Git repository, initialize it by running
git init.If you don’t have code, create a new Drupal project from scratch. The following commands create a brand new Drupal project using Composer.
composer create-project drupal/core-recommended <PROJECT_NAME> cd <PROJECT_NAME> git init git add . && git commit -m "Init Drupal from upstream." -
Connect your Upsun Fixed project with Git. You can use Upsun Fixed as your Git repository or connect to a third-party provider: GitHub, GitLab, or BitBucket.
Add a Git remote for the Upsun Fixed project you just created by running the following command from your repository:
platform project:set-remote PROJECT_IDThat creates an upstream called
platformfor your Git repository.
Now you have a local Git repository, a Upsun Fixed project, and a way to push code to that project. Next you can configure your project to work with Upsun Fixed.