Definitive "Must Do" For Wordpress LEMP Setup

As of about two weeks ago, I’m completely new to VPS, and came from shared hosting. I’ve learned quite a bit over the last few weeks, but I know there’s plenty more to learn. My simple question, what are the “must do” actions for a Wordpress website running on a LEMP setup? Here’s what I HAVE done:

-Installed LEMP -Installed Wordpress (site is up and running now) -Initial Security Setup ( -Created Sever Blocks for various websites -Configured SSH login for wordpress ( -Configure SSH for Filezilla

That’s the gist of what I’ve learned / done thus far. A few things that need mentioning in my case:

My Wordpress installation is at /var/www/ and the site is served at . I tried to get help on the server block php config, but nobody seemed to know how to set it up. I blindly guessed and came up with this, which is the ONLY setup that’s worked thus far, but nobody has confirmed why / if this is right. Notice the root / try files setup:

root /var/www/;
	index index.php index.html index.htm;


	location / {
			# try_files $uri $uri/ =404;
			try_files $uri $uri/ /wordpress$uri/ /index.php?q=$uri&$args;

The other thing, is that when I try to install W3 Total Cache, it says it can’t create directories, etc, etc, and everything I try seems to fail on that front (other plugins work fine, via SSH).

I’ve also looked into Memcache, but I’m not sure if that’s right for me, as I’m on a $5 droplet setup, with only 512MB of RAM. Can anyone let me know if there’s anything else I should do before I’m essentially good to go? Any information on my other questions would be great as well - many thanks!

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hey Porter!

One thing I would recommend is to create a swap partition in your droplet. It can help with performance. This tutorial will get you covered: How To Add Swap on Ubuntu 14.04 .

Now, for Nginx’s configuration, you will find a lot of information here, including how your vhost file should look like: How To Install WordPress with Nginx on Ubuntu 14.04 . Head to “Step 5” and you will find it.

Regarding the permission problems, theres some good information here: Correct permissions for Wordpress on LEMP.

As another suggestion, I always like to install fail2ban in my servers. It helps keeping it safe from brute-force login attempts.