WordPress nginx config

server {
listen 80;
listen [::]:80;
root "/var/www/vHOST";
server_name vHOST;
index index.html index.php;
client_max_body_size 2G;

rewrite ^/wp-json/.*$ index.php$uri last;

location ~ ^/.*/$ {
try_files $uri $uri/ /index.php?$uri;
# pass the PHP scripts to FastCGI server listening on
location ~ \.php(/|$) {
include fastcgi.conf;
fastcgi_param SCRIPT_FILENAME "/var/www/vHOST/$fastcgi_script_name";
# With php7.0-cgi alone:
# fastcgi_pass;
# With php7.0-fpm:
fastcgi_pass unix:/run/php/php7.0-fpm.sock;

5 thoughts on “WordPress nginx config”

  1. I just like the helpful information you provide for your articles.

    I’ll bookmark your weblog and check again here frequently.
    I’m somewhat certain I’ll be informed plenty of new stuff proper here!
    Best of luck for the next!

  2. You have made some good points there. I looked on the internet for additional information about the issue and found
    most individuals will go along with your views on this

  3. Great post, I believe website owners should learn a lot from
    this web blog its really user genial. So much wonderful
    information on here :D.

  4. It’s actually a great and useful piece of information.
    I am satisfied that you simply shared this helpful info with us.
    Please keep us up to date like this. Thanks
    for sharing.

  5. Heya i’m for the first time here. I found this board and I
    find It really useful & it helped me out much. I hope to give something
    back and help others like you aided me.

Leave a Reply

Your email address will not be published. Required fields are marked *