By Matt Porter
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!
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!
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.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.