Using WordPress with Apache behind an nginx reverse proxy

You’re missing your WordPress rewrite rules. It’s probably confusing because, in Apache, WordPresss automatically generates the rewrite rules in .htaccess. It does not do the same in nginx environments. Pay special attention to the WordPress documentation on nginx and configuration directives referencing HTTP rewrite rules, the “includes” directives for segmenting configuration and the specific WordPress … Read more

WordPress Multisite with NGINX, subfolders, and FROM a subfolder

Actually, I solved it thanks to this reference: https://rtcamp.com/wordpress-nginx/tutorials/multisite/subdirectories/in-a-subdirectory/ With the root directory of the installation being “labs” in my case, the final nginx configuration file looks like: # You may add here your # server { # … # } # statements for each of your virtual hosts to this file ## # You … Read more

Fastest server stack configuration for WordPress?

There’s a post here that’s very good about load optimization and performance: Steps to Optimize WordPress in Regard to Server Load? It might be a good idea to also utilize a CDN for a majority of your page requests. If you want performance you’ll have to minimize requests to your database and setup aggressive caching. … Read more

How to configure nginx to redirect requests to the uploads directory to the production server?

You could try something like this: server { root /srv/www/example/htdocs; index index.php; # Matches any URL containing /wp-content/uploads/ location ~ “^(.*)/wp-content/uploads/(.*)$” { try_files $uri @prod_serv; } # Will redirect requests to your production server location @prod_serv { rewrite “^(.*)/wp-content/uploads/(.*)$” “http://yourdomain.com/m/wp-content/uploads/$2” redirect; } # The rest of your location blocks… location /m { index index.php; try_files … Read more

Nginx – Prevent Access to Debug file [closed]

I’ve frequently seen this used in Apache 2.2: <Files “debug.log”> Order allow,deny Deny from all </Files> but that’s deprecated in Apache 2.4: The Allow, Deny, and Order directives, provided by mod_access_compat, are deprecated and will go away in a future version. You should avoid using them, and avoid outdated tutorials recommending their use. I just … Read more

nginx or cherokee ( +php-fpm ) for WordPress backend?

From what I’ve seen on the market, Nginx and Cherokee are pretty interchangeable for what you’re doing. If you’ve already got things set up on Nginx … there’s no reason to switch to a different system. But if you want some benchmarks … I did a quick Google search and came up with these: http://blog.mudy.info/2009/02/nginx-vs-cherokee/ … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)