The issue:
Cannot change Permalink structure to any one except Plain. Otherwise, the post will return 404.
Update any post will fail with message: “Updating Failed. The Response is Not a Valid JSON Response”
The initial nginx config:
server { server_name example.com; ... root /var/www/wordpress; index index.php index.html; location / { try_files $uri $uri/ $uri.html =404; } ... } Finally I found that the root cause is that nginx cannot redirect subpath to wordpress.
Since the Plain permalink has no subpath but with query string only: https://52.175.32.36/?p=123, the above nginx config works fine. When we change the permalink structure, the above rule cannot handle the subpath routing.
...