Nginx & Wordpress issues

Posted May 23, 2013 11.3k views
Hello! I'm having a hard time with nginx & wordpress. Specifically I installed/configured WP on and all seems to be ok EXCEPT for the fact that in the wp-admin/ I can't see: Media, Posts return an "Invalid post type", there are no Pages (but in fact I have 2: Contact and About). Also, i would like to redirect to but i've got no idea how to make this work without any problems in nginx. Thank you in advance for helping out! Regards, Alex

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
7 answers
Really? Nobody to help out?
I'd just start again dude, if you use the instructions in the articles and tutorials there is a step by step guide which is spot on!
by Etel Sverdlov
Wordpress is a free and open source website and blogging tool that uses php and MySQL. It was created in 2003 and has since then expanded to manage 22% of all the new websites created and has over 20,000 plugins to customize its functionality. This tutorial shows how to install Wordpress on a server with LEMP (with nginx instead of apache). It is written for Ubuntu 12.04.
Oh and once you're done install memcache and the w3 total cache and it freakin' fly's!
The problem is that I need to install Wordpress in a folder /blog not in the root folder.

This is where Nginx gives me issues :)
@alex: I suggest you take a look at, especially the "WordPress Multisite Subdirectory rules" section.
@alex: Actually, try this first: - "Non-root try_files to URL redirect".
If that doesn't fix your problem, see my previous comment.
From what I've read elsewhere, this error "Invalid post type" can be caused by different things.
I found, however, that in my case it was caused by the line that the Nginx devs suggest inserting into your php block from

fastcgi_split_path_info ^(/wordpress)(/.*)$;

Commenting this line out and restarting nginx solved the issue. It also solved a problem that was racking my brain where I would get an error: "You are not authorized to view this page." while accessing certain Admin pages. The Nginx support page might be out of date.

I'm a total noob on regex and nginx blocks so I don;t fully understand what it was supposed to do in the first place.
Hope this helps.