• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Wordperss nginx Configuration Issues

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Wordperss nginx Configuration Issues

This topic is: not resolved

Tagged: config, nginx, permalinks, server, vps, Wordpress

  • This topic has 1 reply, 1 voice, and was last updated 10 years, 9 months ago by Porter.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • September 11, 2014 at 5:04 pm #124052
    Porter
    Participant

    I've been trying to get this to work for some time now, but I'm still running into issues. Here's my setup:

    -LEMP (nginx instead of Apache)
    -Wordpress installed in it's own directly anightinburlington.com/public_html/wordpress
    -Wordpress settings for the installation to be there, and for the site url to just be anightinburlington.com

    After many changes to my configuration, I finally got the main page, and all sub-pages to show (anightinburlington.com/bars, for example), but now all of my dashboard pages are broken. I can't sign in, I just get blank white pages. In addition, my image links are broken, and I have no CSS. I'm assuming this is because I changed the nginx config without updating WordPress, but I have no idea really.

    anightinburlington.com

    Below is the config code in my sites-available directory.

    server {
    	listen 80 default_server;
    	listen [::]:80 default_server ipv6only=on;
    
    	root /var/www/anightinburlington.com/public_html/wordpress;
    	index index.php index.html index.htm;
    
    	server_name anightinburlington.com www.anightinburlington.com;
    
    	location / {
    			# try_files $uri $uri/ =404;
    			try_files $uri $uri/ /index.php?q=$uri&$args;
    	}
    
    	location ~ \.php$ {
    			try_files $uri =404;
    			fastcgi_split_path_info ^(.+\.php)(/.+)$;
    			fastcgi_pass unix:/var/run/php5-fpm.sock;
    			fastcgi_index index.php;
    			include fastcgi_params;
    	}
    	
    	error_page 404 /404.html;
    
    	# redirect server error pages to the static page /50x.html
    	#
    	error_page 500 502 503 504 /50x.html;
    	location = /50x.html {
    		root /usr/share/nginx/html;
    	}
    
    	# deny access to .htaccess files, if Apache's document root
    	# concurs with nginx's one
    	#
    	#location ~ /\.ht {
    	#	deny all;
    	#}
    }

    Any idea how I can fix the broken site?


    Buy me a beer? | Try DigitalOcean VPS Hosting

    September 11, 2014 at 6:42 pm #124057
    Porter
    Participant

    I ended up making some blind guesses, and everything is working perfect now. Here's my config:

    server {
    	listen 80 default_server;
    	listen [::]:80 default_server ipv6only=on;
    
    	root /var/www/anightinburlington.com/public_html;
    	index index.php index.html index.htm;
    
    	server_name anightinburlington.com www.anightinburlington.com;
    
    	location / {
    			# try_files $uri $uri/ =404;
    			try_files $uri $uri/ /wordpress$uri/ /index.php?q=$uri&$args;
    	}
    
    	location ~ \.php$ {
    			try_files $uri =404;
    			fastcgi_split_path_info ^(.+\.php)(/.+)$;
    			fastcgi_pass unix:/var/run/php5-fpm.sock;
    			fastcgi_index index.php;
    			include fastcgi_params;
    	}
    	
    	error_page 404 /404.html;
    
    	# redirect server error pages to the static page /50x.html
    	#
    	error_page 500 502 503 504 /50x.html;
    	location = /50x.html {
    		root /usr/share/nginx/html;
    	}
    }

    I changed the root back to /var/www/anightinburlington.com/public_html;
    Then added the "wordpress" bit below:

    try_files $uri $uri/ /wordpress$uri/ /index.php?q=$uri&$args;

    Everything appears to work 100%, but if anyone could tell me if there's something wrong, that would be great, as I'm basically shooting in the dark (with slightly educated guesses, emphasis on slightly).


    Buy me a beer? | Try DigitalOcean VPS Hosting

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble