HOWTO: Wordpress on Nginx

Diwaker Gupta
Floating Sun
Published in
1 min readJan 13, 2016

This was done on Ubuntu 15.10, though instructions should easily translate to other Debian/Ubuntu derivatives.

First, install the required packages:

$ apt-get install nginx php-fpm5

Next, setup your server block like so in a new file, say `/etc/nginx/sites-available/wordpress.conf`:

If you have a multi-site Wordpress installation, simply add multiple server blocks in the same file.

Finally, symlink the above file under `/etc/nginx/sites-enabled` and restart nginx for the changes to take effect.

Note that you shouldn’t have to make any changes to the default php-fpm configuration; the above worked for me out of the box. If you need to make any config changes (e.g. change max upload size for POST body), look under `/etc/php5/fpm` for the relevant files.

--

--

Diwaker Gupta
Floating Sun

Geek, open source enthusiast, software architect, virtualization research