Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nginx with WordPress Gutenberg #116

Closed
PDowney opened this issue Aug 24, 2018 · 1 comment
Closed

Nginx with WordPress Gutenberg #116

PDowney opened this issue Aug 24, 2018 · 1 comment

Comments

@PDowney
Copy link

PDowney commented Aug 24, 2018

Hey George,

Was going over some best practices with Gutenberg and noted that they were recommending an alteration to the try_files directive.

http://v2.wp-api.org/guide/problems/#query-parameters-are-ignored

If you find that you cannot use ?filter[]=, ?page= or any other query parameters, your server may not be properly configured to detect them. If you are using Nginx to serve your website, look for a try_files line in your site configuration. If it looks like this:
try_files $uri $uri/ /index.php$args;
change it to this:
try_files $uri $uri/ /index.php$is_args$args;
Adding $is_args (which will print a ? character if query arguments are found) will allow WordPress to properly receive and interpret the query parameters.

Not sure if this would apply to centminmod since I see you're using a different method than others, but I figured I'd pass it along.

In addition, it looks like adding a cache bypass rule to /wp-json is a good idea as well.

@centminmod
Copy link
Owner

Interesting thanks for heads up. I did try the Gutenberg WP Plugin on Centmin Mod installed Wordpress via centmin.sh menu option 22 and resulted in editor pages being blank. Wonder if it's due to this. Will have to test.

In addition, it looks like adding a cache bypass rule to /wp-json is a good idea as well.

Thanks will have to read up on this

cheers

George

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants