Question

Definitive "Must Do" For Wordpress LEMP Setup

  • Posted September 16, 2014

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 (https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-14-04) -Created Sever Blocks for various websites -Configured SSH login for wordpress (https://www.digitalocean.com/community/tutorials/how-to-configure-secure-updates-and-installations-in-wordpress-on-ubuntu) -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/anightinburlington.com/public_html/wordpress 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/anightinburlington.com/public_html;
	index index.php index.html index.htm;

	server_name anightinburlington.com www.anightinburlington.com;

	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!

Subscribe
Share

Not directly related to your question, but my 512MB with 512MB Swap can handle following load of mine

Setup -> CentOS 6.5 x86 / zPanel / WordPress (running W3TC) / CopperMine

Usually I serve around 3.5k unique with around 7k to 7.5k page views daily…

Yes, htop and free -m always show really high load stats but since I didnt have a crash yet so I have not yet updated to 1GB Plan…


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

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.

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.