See: Deploying WordPress with AWS Elastic Beanstalk
Notes:
#10: WordPress offers their secret-key service to generate the keys and salts but it uses special characters that are not $_SERVER[] friendly. Avoid characters like ; | ` and space.
Related Articles
In wp-config.php, add
define(‘WP_ALLOW_MULTISITE’, true);
after
define(‘WP_DEBUG’, false);
to enable multisite.
#26: Here is where you should stop and configure your multisite Network. Doing so will generate some code you need to add to wp-config.php and .htaccess. I selected subdomains so I can easily route using Route 53. The wp-config will be specific, but it looks like htaccess is not so here it is:
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ -- [L]# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ -- [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*.php)$ $1 [L]
RewriteRule . index.php [L]
If you want to use multiple top-level domains, you’ll also want to add the following line to wp-config.php before the last require_once command:
define(‘COOKIE_DOMAIN’, $_SERVER[ ‘HTTP_HOST’ ]);
Now zip up your full codebase and re-upload to Elastic Beanstalk (EB).