WordPress is great, but it also has limitations that can quickly become annoying. There are ways to overcome these limitations, which I'm going to explain here.
Nginx Configuration
For WordPress configuration under Nginx, here's an example:
server{includelisten_port.conf;listen443ssl;ssl_certificate/etc/nginx/ssl/deimos.fr/server-unified.crt;ssl_certificate_key/etc/nginx/ssl/deimos.fr/server.key;ssl_session_timeout5m;server_nameblog.deimos.fr;root/usr/share/nginx/www/deimos.fr/blog;indexindex.php;access_log/var/log/nginx/blog.deimos.fr_access.log;error_log/var/log/nginx/blog.deimos.fr_error.log;location/{try_files$uri$uri//index.php?$args;}location~\.php${fastcgi_cachemycache;fastcgi_cache_key$request_method$host$request_uri;fastcgi_cache_validany1h;includefastcgi_params;fastcgi_passunix:/var/run/php5-fpm.sock;fastcgi_intercept_errorson;}# Drop configincludedrop.conf;# BEGIN W3TC Browser Cachegzipon;gzip_typestext/cssapplication/x-javascripttext/x-componenttext/richtextimage/svg+xmltext/plaintext/xsdtext/xsltext/xmlimage/x-icon;location~\.(css|js|htc)${expires31536000s;add_headerPragma"public";add_headerCache-Control"public,must-revalidate,proxy-revalidate";add_headerX-Powered-By"W3TotalCache/0.9.2.4";}location~\.(html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml)${expires3600s;add_headerPragma"public";add_headerCache-Control"public,must-revalidate,proxy-revalidate";add_headerX-Powered-By"W3TotalCache/0.9.2.4";}location~\.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)${expires31536000s;add_headerPragma"public";add_headerCache-Control"public,must-revalidate,proxy-revalidate";add_headerX-Powered-By"W3TotalCache/0.9.2.4";}# END W3TC Browser Cache# BEGIN W3TC Minify corerewrite^/wp-content/w3tc/min/w3tc_rewrite_test$/wp-content/w3tc/min/index.php?w3tc_rewrite_test=1last;rewrite^/wp-content/w3tc/min/(.+\.(css|js))$/wp-content/w3tc/min/index.php?file=$1last;# END W3TC Minify core}}
Using JavaScript in a Post
I want to use JavaScript here to prevent my email address from being captured by spam robots. We first need to insert this in a post:
Check the size of /tmp on your server (for example, my vservers are by default set to 16M, which was problematic since it's the temporary location where WordPress stores its files)