What type of VPS should I get?

March 2, 2015 1.6k views


I am building a ecommerce site on wordpress that has around 40 plugins.
Realising that that amount of plugins will require a much powerfull machine to handle the requests, I would like to know what is the best option available ...something that can provide data for around 1000 visitors a month.

Either backp up a vps with a cdn or something else, you guys are the experts so please share your knowledge.

Thanks for reading

4 Answers

You will need more than just a powerful droplet, you need optimization. so...

Create a 1gb droplet. Install Nginx/PHP-FPM, Mysql (or Percona if possible), and make sure to use w3 total cache. Make sure you have APC cache enable in php.ini and installed on server. Create a sencond $5 droplet and install varnish4, configure varnish4 to use your first droplet as backend and make some optimizations too (plenty of guides around). Then open a free account aat cloudflare and protect/cache your domain name redirecting it to your varnish4 droplet.

it dhoould looks like: Cloudflare -> Varnish4 -> Nginx.

Also you can add a second Varnish4 droplet and use them as load balancing, remember to create a image from your droplets so if anything fails you have a backup, and if traffic goes up you can always launch an extra instance for load balancing.

If all that becomes difficult for you, try serverpilot.io

Check some guides on php-fpm/nginx optimization too, and make sure to use w3 total cache to use APC as cache for sql queries, also take use of the CDN options and create a CDN using your nginx (virtual host with static files rules), cached by your Varnish and Cloudflare.

As you will be using cache, you have to learn how to create some rules to avoid caching in some parts of your website, specially the transnational pages where you should not cache content.

It could be difficult at first but is a great option to reduce costs and increase performance. Also you will need to test if your site is compatible with caching, ie uses unique url/params for each user/session or so.

Also cloudflare is offering fre SSL for free accounts, so you can have SSL for free on your commerce site which is great. For this you need to create a xinetd.d/httpsd file to allow SSL traffict to redirect from varnish4 droplet to your webserver (as SSL can't/should not be cached). here the code:

Install xinetd if not installed.

# description: sends ssl packets from 443 to production server 443 port bypassing varnish.
service httpsd
 type = UNLISTED
 flags = REUSE
 socket_type = stream
 wait = no
 user = root
 redirect = 443
 port = 443

Restart xinetd

Of course this is just a suggestion, fell free to consult guides here at DO or Google for some, there are plenty and very good ones, so one should adapt to your needs.

40 WP plugins? You are going to need whiskey or Valium. ;)

Digital Ocean is a great place for learning. You might want to question your architectural decisions. First: PHP. It’s an ok language and I know it and use it. But, PHP is like a cancer that has grown ever since Rasmus Lerdorf released a few C routines to run on his personal home page. The language is much more evolved than designed. There is a classical rant, which is worth your read http://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/

Facebook, was started with PHP, but by the time they got money they realized they were screwed so they just completely rewrote the language for in-house use.

Next, WordPress. This started as a nice little project for a blog. I really don’t think a bog needs a database, but if you are gong to have multiple users and comments, well, ok. The people at WordPress never knew when to STOP. It’s a classic example of a software project that keeps going because the programmers need it to keep going. Then it moved from blog to CMS. I haven’t read the latest WordPress manifesto, but I’m sure it’s crazy nonsense. So, WordPress allows plugins and themes from third parties. So we have 80K lines of crack head PHP and on top we have an entire cottage industry of junior programmers trying to solve all the problems in the world.

In the long run you will end up doing way more work that just starting something from scratch with a language like Python or just buying a lean ecommerce script.

And don’t get me started on security.

  • Thanks for your input, I mean that.

    Coming from the dark side of web, I can reinforce your statement that every single site has security issues and it doesn't matter if it was built on php, python, ruby or whatever, ALL of them have security flaws that can be exploited if a person really wants to.

    From bad coding to backdoors including database code injections, you name it, the list is tremendous and new flaws are discovered every day. This fact alone is not something exclusive to websites programming, its even on your linux or windows installation, apps...you know what I mean.

    The issue with this particular project is that other platforms are not as flexible, and believe me that I have looked into other platforms like prestashop, opencart and such and I think that these two also use a database, go figure.

    Cost wise, I dare not to claim that WP is cheaper than the platforms mentioned above but it´s more flexible and cost effective. Finally, I don´t want to use a platform where I have to go through 10 steps just to achieve a simple goal like creating a product variation

Have another answer? Share your knowledge.