Create WordPress Multi-Site on AWS LightSail (part 4)

Install the Domain Mapping Plugin

  • login to the WordPress console
  • MySites -> Network Admin -> Dashboard
  • Plugins -> Add New
  • search: Domain Mapping
  • scroll down to WordPress MU Domain Mapping
  • click Install Now
  • click Activate

Make Multi-site plugin available to all Sites in the Network

  • WordPress console
  • MySites -> Network Admin -> Dashboard
  • Plugins
  • find WordPress MU Domain Mapping
  • click Network Activate

Turn on Sunrise

  • cd opt/bitnami/apps/wordpress/htdocs/wp-content
  • cp plugins/wordpress-mu-domain-mapping/sunrise.php .

Edit wp-config.php

  • open the ssh console
  • cd /opt/bitnami/apps/wordpress/htdocs
  • vi wp-config.php

insert the following line into the file, anywhere amongst the other define entries at the top of the file

  • define(‘SUNRISE’, ‘on’);

Configure the Domain Mapping

  • login to the WordPress console
  • My Sites -> Network Admin -> Dashboard
  • Settings -> Domain Mapping
  • check 1, 2, 3, 4
  • click Save

Add a Site as a Domain

  • login to the WordPress console
  • My Sites -> Network Admin -> Sites
  • Add New Site
  • enter Site Address (URL)
    • if you want your site to be newsite.com then enter newsite
  • enter Site Title
  • select Site Language
  • enter Admin Email
  • click Add Site

Get the Site ID

  • login to the WordPress console
  • My Sites -> Network Admin -> Sites
  • hover over newsite.yourdomain.com
  • a banner appears at the bottom of the browser
    ending with something like site-info.php?id=4
  • make a note of the number following id

Enter the Domain for your New Site

  • login to the WordPress console
  • My Sites -> Network Admin -> Dashboard
  • Settings -> Domains
  • New Domain
    • Side ID: id from above
    • Domain: newsite from above
    • Primary: checked
  • click Save

Add subDomain A Record

  • login to LightSail
  • open DNS record for yourdomain.com
  • add Record
    • A Record
    • enter subdomain as above – newsite
    • click inside the Resolves to box
    • select the WordPress static-ip address
  • click green tick to save changes

You can now access your site through
http://newsite.yourdomain.com

Create newsite DNS Record

  • login to LightSail
  • click the Networking Tab
  • click Create DNS Zone
  • enter newsite.com
  • click Create DNS Zone

Create newsite A Record

  • login to LightSail
  • click the Networking Tab
  • click newsite.com
  • add record
    • A record
    • put @ in the subdomain box
    • click inside the maps to box
    • select the static ip address for WordPress
  • click the green tick to save

You can now access your site using
http://newsite.com
http://newsite.com/wp-admin

Note you may get an error saying that your site is not secure.
We fix this in the next step by configuring SSL

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.