VPS server optimization

Editor: Anna Belous 1126 5 min Audio

You can find general information about VPS servers in this article. This article is dedicated to VPS setup that allows to improve the performance of one or several websites hosted on it.

Server software optimization

Depending on the software pre-installed on the server by your hosting provider, you might need to install and configure some of it while simply reconfiguring the other.

What should be installed on a VPS?

NGINX

Apache+NGINX bundle is very efficient since these web-servers assist each other in processing the website queries. NGINX handles static files thereby decreasing the server load (those queries won’t reach Apache).

PHP accelerator

While usually your PHP code is compiled and executed at runtime, a PHP accelerator caches the bytecode in advance, hence saves CPU resources at the expense of increased memory usage.

Out of several accelerators offered, we advise Opcache since it’s recommended by the PHP community.

PageSpeed module

Though this module doesn’t drastically decrease the server load and its setup requires some effort, we do advise installing it.

PageSpeed by Google speeds up the process of returning the data to users, hence increases page speed.

Memcache/Memcached

Memcached service caches database queries in the server’s RAM instead of the hard drive, decreasing the server load. You need to check the process statistics to decide what process should be cached: database queries or scripts.

Server service configuration

Your hosting provider might provide you with either a server with minimal OS installed or a ‘ready-to-go’ one with a pre-installed software package. A ready-to-go server might have a list of services launched that you will never use or even know that they’re running.

Check which of the launched ones you really need and turn off the ones you don’t.

This will free server resources that can be used by services you need.

We strongly recommend to first and foremost consult with an experienced developer or server administrator to avoid turning off a service that is needed for the website to run smoothly.

PHP

We advise switching PHP to FastCGI mode or using PHP-FPM bundle. This significantly reduces the server load ensuring its stable operation.

Alternative way to configure a server

This method is suitable for experienced developers only. Instead of using Apache that is resource demanding and slow, it is possible to use NGINX+PHP-FPM bundle.

Please mind that some CMS documentation does not contain instructions on NGINX+PHP-FPM setup.

Since you intend to purchase a VPS, we assume that you have the necessary skills in managing it or hire a developer who will be managing your VPS. Hence, we will not provide step-by-step instructions on this kind of setup in this article.

If you know ways to optimize a VPS that were not described in this article, please leave a comment below and we will gladly add those to the article.

Feel free to ask any related questions in the feedback section below and our experts will reply as soon as possible.

Anna Belous
Did not find an answer to your question?
Ask the experts! Answers are quick and go directly to your email.

Adding confirmation "I'm not a robot" you also agree to receive messages from hostings.info and accept its Privacy Policy, allowing hostings.info to store and process your personal information indicated above to provide requested content.

Ratings of hosting providers by site tasks
Hosting price

We highly recommend not to purchase the cheapest hosting package. Usually, they come with a row of issues: the server is often down, the hardware is outdated, lousy and slow support, registration and payment errors, etc.

For your convenience, we have created a tool that can help you to choose the right hosting package for you just by answering a few simple questions.

CMS

CMS is a content management system. A lot of hosting providers offer so-called CMS optimized packages. However, this is a marketing trick because most CMSs do not have special software or hosting requirements.

Free trial

Trial period is a period of time, usually from 7 to 30 days, during which you can use the hosting services for free to test them.

Moneyback policy allows the customer to receive a refund for his order within a certain period after the purchase.

OS

OS means the operating system is installed on the server. We recommend to choose Linux hosting unless your website requires another OS.

Other

Bulletproof hosting - it’s a type of service that allows to host almost any type of content, even the restricted one (adult content, warez, spam etc). Bulletproof hosting providers do not remove your content in case someone reports an abuse.

Unlimited hosting - refers to companies that provide packages with unlimited disk space, bandwidth, number of domains, databases or email accounts, etc. This is usually a marketing trick but sometimes you can find something worth a try.

Secure hosting - it’s a type of service when the hosting provider is mostly responsible for the security of the user’s account: updates the software installed on their servers, provides an antivirus and malware scanner, firewalls and basic anti-DDoS protection, etc.

DDoS-protected hosting - companies that provide packages that include anti-DDoS protection. These packages are considerably more expensive than regular ones. Nevertheless, they’re totally worth their price because the company will ensure that your website is secured from cyber attacks.

Technologies

Most websites require MySQL and PHP installed on the server to work correctly. Almost all hosting providers support these technologies.

ASP.NET is a Microsoft web application development platform.

Control panel

The more comfortable the control panel is, the easier will it be for you to change the website and hosting account settings.

Most hosting providers that are in TOP20 in our rating offer user-friendly control panels, such as cPanel, Plesk or DirectAdmin. That’s why we recommend to pay attention to other, more important parameters, while choosing a hosting provider.

Disk type