I am building an automated WordPress deploy using Composer, and am keeping the wp-content folder outside of the main WP install (because I have some custom plugins and themes) which is pulled from github.
After pulling from github and running composer, my folder structure looks like:
-composer.php
-env.php
-public/
|-index.php
|-wp-config.php
|-wp-content/
|-themes/
|-plugins/
|-sunrise.php
|-wp/
|wordpress stuff
My htaccess rules work well when using MAMP, but I am using VVV as my development environment and VVV uses nginx, so my rewrite rules don't work.
VVV uses 2 conf files: one file thats shared by all sites on the VM (common rules) and one file for each site (basically just lists the root dir).
Here is my site specific conf file:
server {
listen 80;
listen 443 ssl;
server_name auto.dev ~^auto\.\d+\.\d+\.\d+\.\d+\.xip\.io$;
root /srv/www/auto/htdocs/wordpress;
# my rules
# tells nginx to prepend "wp" to things
rewrite ^/(wp-.*.php)$ /wp/$1 last;
rewrite ^/(wp-(content|admin|includes).*) /wp/$1 last;
# end WP dir rules
include /etc/nginx/nginx-wp-common.conf;
}
so I added
rewrite ^/(wp-.*.php)$ /wp/$1 last;
rewrite ^/(wp-(content|admin|includes).*) /wp/$1 last;
And that kind of works (I am able to get the the admin area, and the admin area has all of its CSS and JS), but I am facing 3 big problems:
1)The frontend of the site no longer has its CSS. Chrome's console shows an error on the second line of my index.php:
Uncaught SyntaxError: Unexpected token <
note - It looks like SOME of the themes work, a site with the Twenty Fifteen theme looks like it works.
2) I cannot get to the multisite network area, for whatever reason anytime I attempt to goto http://auto.dev/wp-admin/network/
my request is rewritten as: http://http//auto.dev/wp-admin/network/
and thus obviously doesn't work
3) Finally I cannot login to my subsites. Stuff like http://auto.dev/wiki/wp-admin/
gives me a redirect loop
4) I just noticed that when I try to change the theme for a site, the theme previews are broken.