After adding SSL - site only reachable with www

Hi again support forum fans,

I have installed SSL on my site using ee site update --letsencrypt. The update was successful, but now the site is only available if I add ‘www’.

So is fine But and redirect to And is unreachable

  • I checked the /etc/nginx/conf.d/ file and it seems fine. Changing the redirect there from “” to “” does not seem to have any effect though.

  • I would point the website to (instead of in wp-config.php, but if I do that I get a redirect loop (see my earlier post)

How to proceed?

Thanks for any help! Warner


somewhere the configuration is having conflicts :slight_smile:
Since the help without accessing the server is limited, I could suggest you to try replacing your configurations with default configuration generated by EasyEngine.

Suggestion: 1 - backup your configurations (MUST incase we need to revert) cp /etc/nginx/sites-available/ /etc/nginx/sites-available/

2 - recommended install (php7) : ee stack install --php7

3 - replace /etc/nginx/sites-available/ with following

server {


access_log /var/log/nginx/ rt_cache;
error_log /var/log/nginx/;

root /var/www/;

index index.php index.html index.htm;

include common/php7.conf;

include common/wpcommon-php7.conf;
include common/locations-php7.conf;
include /var/www/*.conf;


4 - Check nginx configuration passes the test : nginx -t 5 - If above successfull, restart nginx & php7 :slight_smile:


ok, I tried your instructions and something is still wrong with php7:

ee stack install --php7 results in

  • “PHP 7.0 already installed”

and after updating and testing nginx -t I get

  • nginx: [emerg] no port in upstream “php7” in /etc/nginx/common/wpcommon-php7.conf:7

while netstat -ntualp |grep :9070 still gives

  • tcp 0 0* LISTEN 32226/php-fpm.conf)

and service php7.0-fpm status gives

  • ● php7.0-fpm.service - The PHP 7.0 FastCGI Process Manager Loaded: loaded (/lib/systemd/system/php7.0-fpm.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2017-06-13 15:15:34 CEST; 18h ago Docs: man:php-fpm7.0(8) Main PID: 32226 (php-fpm7.0) Status: “Processes active: 0, idle: 2, Requests: 0, slow: 0, Traffic: 0req/sec” CGroup: /system.slice/php7.0-fpm.service ├─32226 php-fpm: master process (/etc/php/7.0/fpm/php-fpm.conf)
    ├─32228 php-fpm: pool www
    └─32229 php-fpm: pool www

check following entries in /etc/nginx/conf.d/upstream.conf

upstream php7 { server; }

and test nginx configuration using nginx -t

Ok, that worked. I successfully re-started nginx and php7.

So, now what to do? Currently I have set to and wp_options siteurl and home values to, and all work now.

But is still unreachable. Should I try to set them back to the original values now?

…changing the values back results in successful re-direction to, but the site is unreachable.

@warner as I specified, stick to one of them only( . and redirect to in and also change use in wp-config.php.

Also once you confirm which domain is you are going to use (www or without www), you can use following wp-cli command to search & replace all unwanted occurances in DB.

As www-data user. wp search-replace --recurse-objects --verbose --dry-run (--dry-run to view what all change will be there, then remove --dry-run and run )