Can I run a multisite application on Cloud IDE?
Cloud IDE has one preview URL, which means you can only serve one site at a time. When running the acli pull
command, you can select any arbitrary database or files directory to pull from. You can switch sites at any point in time by using the acli pull
command again and pulling a different database and files directory.
Cloud IDE only recognizes the sites/default
directory by default. To serve other sites in other directories, we recommend you to use path-based multisite.
To configure path-based multisite for an example site located under sites/foo
:
- Pull your application in Cloud IDE. Ensure that you pull the database and files directory that correspond to the
foo
site. - Add a
foo
symlink in the docroot
directory, for example, cd /home/ide/project/docroot && ln -s . foo
, so that Drupal does not try to serve the foo
path. - Modify
/home/ide/project/docroot/sites/sites.php
to add $sites = ['cloud.foo' => 'foo'];
. The first foo
must match the symlink / path to access the multisite, and the second foo
must match the name of the site directory on the disk. These are generally same but not always.
Did not find what you were looking for?
If this content did not answer your questions, try searching or contacting our support team for further assistance.