Back again with more Lightsail tutorials. This time we will take a look at how to setup a multisite instance using AWS Lightsail solution. As we discussed on previous posts, Lightsail is an out of the box solution that creates and configures almost everything so users can get started creating content.
As with most out of the box solutions, there are always issues when it comes to trying to apply custom configurations. In this case, the set configuration for a Drupal Lightsail instance is design for a single site. So in order to convert it to a multisite we will need to do a bit of tinkering.
- Connect to your current Drupal instance through your AWS console.
- Get your
bitnami
credentialssudo cat /home/bitnami/bitnami_credentials
- Save password
- Load MySQL console by entering
mysql -u root -p
- Enter root password that you saved earlier
- Create new database
create database DN_NAME
- Provide default user access to new database
mysql GRANT ALL PRIVILEGES ON database_name.* TO USER_NAME;
- Create a new directory under the
sites
section - Copy the
settings.php
from thedefault
directory into your new directory. - Edit the
database
under the$databases['default']['default']
setting with the name of the database you created on step 6. - Edit the
sites.php
file by adding the following$sites['example.com'] = 'NEW_DIRECTORY';
- Visit the URL that you enter in the previous step.
- If everthing goes well you should see your new shiny Drupal site.
Well hope this helps you. Until next time.
Comments