WordPress Multisite, NGINX and WordPress Subdirectory Install

I’m attempting to set up WordPress skeleton (https://github.com/markjaquith/WordPress-Skeleton/) in a multisite configuration. WordPress skeleton already places WordPress in a subdirectory (wp by default). I’ve taken the following steps: git clone WordPress-Skeleton Update Submodules and checkout 3.6.1 tag Setup local-config.php to point to my local DB Install WordPress, set site settings to example.com (site), example.com/wp (WordPress … Read more

How do I add a server-independent external rewrite rule?

External rewrite rules are awesome. They let you define rewrites that don’t necessarily pass through WordPress’ index.php. This means you can map arbitrary rules to arbitrary files like: $wp_rewrite->add_external_rule( ‘^somethingrandom/?$’, ‘wp-content/wp-uploads/hiddendirectory/somefile.php’ ); Then, any request to http://site.url/somethingrandom/ will actually be served a static PHP file from a different directory. This is amazing, and it lets … Read more

Setting 404 page in Nginx

I am using this page (http://wiki.nginx.org/WordPress) to setup my WordPress on a nginx/php-fpm server. Everything is okay, except the 404 page When I request www.example.com/foo, it send me the default nginx 404 not found page I have already set the following, but no luck.. Config: fastcgi_intercept_errors on; error_page 404 /index.php?error=404; I have tried to add … Read more

Prompted for FTP details even with FS_DIRECT set to true

I am running WordPress 4.1 Multisite on CentOS with NGINX. I have set define(‘FS_METHOD’,’direct’); in wp-config.php but am still getting prompted for FTP credentials when trying to install a plugin. I have tried chmod’ing the wp-content directories recursively with both nginx and www-data users and neither works 2 Because I had cut and pasted define(’FS_METHOD’,’direct’); … Read more

From inside of a Docker container, how do I connect to the localhost of the machine?

So I have a Nginx running inside a docker container, I have a mysql running on localhost, I want to connect to the MySql from within my Nginx. The MySql is running on localhost and not exposing a port to the outside world, so its bound on localhost, not bound on the ip address of … Read more