Sean Feeney
Architect of the digital age

Deploying SSL Multisite WordPress with AWS Elastic Beanstalk

25 April 2016

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.

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
<IfModule mod_rewrite.c>
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]
</IfModule>

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' ]);

And if you plan on using Jetpack:

define('JETPACK_SIGNATURE__HTTPS_PORT', 80);

Now zip up your full codebase and re-upload to Elastic Beanstalk (EB).

Posted in AWS, blogging, cloud computing, hosting, tutorials, web development, Website Security

You agree to my disclaimer, regardless of the decision in Nguyen v. B&N.

Social

Causes

Genealogy


I Love Geni