Keep getting 401 error from WordPress on AWS Lightsail

I’ve found a solution. The WordPress made from AWS Lightsail instance image is bitnami WordPress. And the bitnami WordPress is disabled Basic Authentication as default. So it needs some modification on /opt/bitnami/apps/WordPress/conf/httpd-app.conf to enable Basic Authentication. This modification is adding 3 lines below. RewriteEngine on RewriteCond %{HTTP:Authorization} ^(.*) RewriteRule ^(.*) – [E=HTTP_AUTHORIZATION:%1] The httpd-app.conf ended … Read more

Menu links only using http after enabling https, unable to redirect http links

RewriteCond %{HTTP_HOST} ^example\.me [NC] RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.example.me/$1 [R,L] You’ve not stated where exactly you are adding these rules in your .htaccess file(s). The order is important. These directives need to go at the top of the .htaccess file, before the WordPress front-controller, otherwise they won’t redirect anything other than static resources. This … Read more

.htaccess and WordPress Admin Bar

OK. It appears it was a cookie path problem. I eventually solved it by adding @define( ‘ADMIN_COOKIE_PATH’, “https://wordpress.stackexchange.com/” ); to the start of wp-config.php – as suggested by AppFlak. The vital clue came from monitoring the output of wp_parse_auth_cookie() under various states. Thanks for the ideas, guys! Makes it a lot easier with extra brains … Read more