New Website Setup – Part I

Part II

So first thing is to determine a web hosting provider.

Since I have my own domains, immediately I just need to get a few things here.

  1. web hosting for wordpress blog
  2. email hosting for using my domains

I could find another cheap web hosting again from WHT forum providing both wordpress hosting and email (usually unlimited, bounded by host) but worried that it may just become another downtownhost in future. And with cPanel as well as Softaculous getting greedy it seems VPS web hosting is no longer a popular option.

So I started to search for cloud solution. The 2 popular ones – AWS and Google cloud. Both are decent and flexible – but all I need is just a simple hosting – so in the end I chose AWS Lightsail – which provides a package install for wordpress (built by bitnami), and also it’s cheapest.

I have more than one domains also used to have multiple WP blogs – so the wordpress multisite is a no brainer for me.

Create a wordpress multisite instance is easy, just follow the steps on lightsail website: https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-tutorial-launching-and-configuring-wordpress
Only one thing – I choose multisite version instance instead of normal wordpress.

You will need static IP, DNS setup, update DNS record on your domain registrar (namecheap/namesilo for me). Once setup is done, there is a few other steps to follow:

Enable HTTPS

Not a must – but any good website should have it. Follow the guide on https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-enabling-https-on-wordpress
One thing to note – HTTP to HTTPS redirect is not auto setup by bncert tool – so need to manually change bitnami conf. Follow https://docs.bitnami.com/aws/apps/wordpress/administration/force-https-apache/. Importantly we need to change -vhost.conf file too.

Since we use multisite wordpress – we need to use slightly different config to allow HTTPS redirect for individual domains. This is described in https://community.bitnami.com/t/force-https-for-individual-domains-within-wp-multisite/85658

So in the end, I have updated 2 files (the SSL config file is not needed as it’s already on port 443).

  1. /opt/bitnami/apache2/conf/bitnami/bitnami.conf
  2. /opt/bitnami/apache2/conf/vhosts/wordpress-https-vhost.conf

With changes like below (highlighted are added lines).

<VirtualHost 127.0.0.1:80 _default_:80>
  ServerAlias *
  DocumentRoot /opt/bitnami/wordpress
  RewriteEngine On
  RewriteCond %{HTTPS} !=on
  RewriteCond %{HTTP_HOST} !^(localhost|127.0.0.1)
  RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [R,L]
  ......

Update primary domain

For multisite wordpress, there is one extra step to update its primary domain. Otherwise you will see it changes URL to IP address. This needs to be done from command line too: https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-define-the-primary-domain-for-your-wordpress-multisite

Setup additional blogs for other domains

I haven’t done this step yet – but this can be done by following https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-add-blogs-as-domains-to-your-wordpress-multisite

Leave a Reply

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