Skip to content

Migrate an existing Craft 2 website to Hyperlane

  1. Create a new project and choose 'Craft 2' as application type. Make sure to add the base install to your Hyperlane Git.

    Note

    Before moving on to step 2, your Hyperlane Gitlab account must have been set up. See how to setup your account right here.

  2. Clone the repository to your local environment.

    1. Open the project in Hyperlane and go to the 'Info' tab of the Development environment.
    2. Copy the Git repository URL to your clipboard.
    3. Clone it somewhere on your local filesystem (e.g. ~/development).
    4. git clone https://git.hyperlane.co/personal/john-doe/awesome-project.git
  3. Copy the files from your current site to the cloned Git directory.

    1. Remove everything from this directory, except the .git directory and the .gitignore file. (update the .gitignore file if necessary)
    2. Add all the files from your existing site, except the .git directory and the .gitignore file.

    Note

    Do not add your assets (images, files, uploads, ...) to the repository! If you want to make full advantage of the Hyperlane development flow, you should make sure your assets do not reside in Git, but are stored in the content volume of your project on Hyperlane. See step 6 of this guide how to achieve this.

  4. Commit and push all changes.

    1. git add .
    2. git commit -m 'Add all files of my awesome site.'
    3. git push origin master
  5. Import the database via PhpMyAdmin.

    1. Create a database dump of your current site. This can be done in the Craft admin panel or any database tool.
    2. Open the project in Hyperlane and go to the 'Info' tab of the Development environment.
    3. Copy the database username and password and open PhpMyAdmin.
    4. Import the database dump created in step 5.a.

    Note

    Before moving on to step 6, your SSH key must be added to your account. See how to get access via SFTP right here.

  6. Upload all the assets via SFTP.

    1. Open the project in Hyperlane and go to the 'Info' tab of the Development environment. Enable SFTP.
      1. Activate your SSH key when SFTP was already enabled and your key was not yet added.
    2. Connect with an SFTP client using the credentials shown in the info tab and your SSH key.
    3. Upload all files to the correct asset paths.
  7. Deploy code via Hyperlane.

  8. Visit your website!