I'm trying to move example.com
from a multisite WordPress installation into its separate WordPress installation folder. I've already setup a separate database and created a new file wp-config.php
for the new WordPress installation with the information needed to start the new installation. The problem is that when I switch the parameter root
in the Nginx configuration file from the old multisite installation folder to the new one, the old website is still loaded by Nginx.
/etc/nginx/sites-available/example.com.conf
server {
listen 80;
listen [::]:80;
server_name example.com;
root /var/www/wordpress_exanoke/; # <-- this was changed to point to
# the new single site installation
# the old multisite installation
# folder is /var/www/wordpress
if ($scheme = "http") {
rewrite ^ https://$server_name$request_uri? permanent;
}
location / {
try_files $uri @index_php;
}
location @index_php {
proxy_pass http://127.0.0.1:8090;
proxy_set_header Host $host;
}
location /wp-admin {
index index.php;
}
location ~* .php$ {
try_files $uri =404;
proxy_pass http://127.0.0.1:8091;
proxy_set_header Host $host;
}
listen 443 ssl; # managed by Certbot
listen [::]:443 ssl; #ipv6only=on; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/example.com/chained.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/example.com/domain.key; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
ssl_client_certificate /etc/nginx/certs/cloudflare.crt;
ssl_verify_client on;
}