How to Optimize a VPS for WordPress?

Picking a VPS web hosting option for your WordPress site is an excellent choice. A VPS will offer more privacy, additional security, and dedicated resources. Essentially, you get several of the benefits of a dedicated server, without the added costs.

While a VPS plan will automatically open the door to improved performance, there are still things you can do to optimize your VPS for WordPress. 

This article will take a closer look at what you can do to get the most bang for your buck from a VPS hosting plan for your WordPress site and how to optimize it to work more efficiently.

1. Choose the VPS plan with the right amount of storage

The first thing to know about a VPS hosting plan is you have different options at AvertHost. You can choose between them.

The main difference between each of these plans is the amount of RAM, CPU, and disc space available to you.

The amount of RAM, CPU, and disk space you need will determine which plan you should select and how much you will pay per month for your VPS plan.

Instead of guessing how much you will need, it’s smart to look at how much traffic you get, the size of your files, how much RAM you need to get your website to load quickly, and more.

If your website is relatively small to start out with, the SMV – A2 Plan is a great place to start. It starts at only 430INR a month, includes 2GB RAM, 2 cores CPU, 20 GB of disk space, and has 100GB of bandwidth.

The best news about AvertHost is it’s easy to switch plans. At any time, you can upgrade your plan to support your growing website.

Remember, AvertHost also offers excellent customer service. If you’re not sure if you’re overspending for your plan or need to upgrade, contact us and we’ll help you pick a plan that’s perfect for your website.

2. Update WordPress and your software

Another smart tip to make sure you’re getting the most out of your VPS for WordPress is to update all your software.

WordPress does a good job of telling you when they release updates for WordPress core, theme updates, and plugin updates. When you log in to your WordPress dashboard, you’ll often see an update notification at the top of your dashboard.

Pay attention to these notifications and update them as needed. Remember, if you make any custom changes to your theme, you’ll want to make note of those changes before you update WordPress.

Updating WordPress and your respective theme and plugins aren’t the only updates to track. You’ll also have to check to ensure that your PHP and MySQL instances are running on the most updated versions.

Trying to run your site on old WordPress versions and plugins or outdated PHP and MySQL instances will bog things down and may even cause security issues. Do yourself a favor and schedule regular times to check and update your software.

3. Find a VPS hosting plan with powerful, local servers

As you conduct your VPS research, you’ll notice that not all web hosting companies and packages are created equal. In other words, not all VPS hosting plans provide powerful server combinations for uninterrupted support.

Look for a plan with premium and proper server combinations. Look for the following:

  • Linux
  • SSD
  • MySQL 5.6 or higher
  • PHP 7 or higher

Not only do you want to check for the server type, but you also want to look into the server location. Servers located in the US, UK, and Israel are typically your best bet. AvertHost’s servers are located in India.

4. Expand your memory

Your website runs on processes that take up memory. Sometimes your site activity is slow and there is enough memory to keep things running smoothly. Other times, your site activity is heavy and you’ll need more memory.

If you feel like you need more memory than what you have right now, here is a cool hack to change the memory allocation in WordPress.

Locate and open the wp-config.php file.

Then, find the line that says: /* That’s all, stop editing! Happy blogging. */.

Enter the following line directly above this line (if it doesn’t already exist):

define(‘WP_MEMORY_LIMIT’, ‘[enter the memory limit]’);

In the part where it says “enter the memory limit,” add either 128M, 256M or 512M as needed. (Note: Double-check that you do NOT raise the limit above what memory is available on the server.) For example, if the server has only 2GB of RAM, then setting this to 512 would be detrimental because only 4 website sessions would be possible at a time. It’s better to optimize your plugins to keep from using so much memory.)

This smart hack will boost your memory limit and optimize your VPS for WordPress.

5. Limit bot indexing

Search bots do a great job of indexing your site to return your relevant content in the search results. You don’t want to discourage search bots from crawling your site entirely. 

However, if you start to see that search bots are interfering with how well your server performs, you can control the crawl rate through Google Search Console (for Google) and Bing Webmaster Tools (for Bing).

This little hack should improve your server performance if your site is bogged down by search bot crawlers.

It’s also smart to sign up for a service that provides additional protection from malicious bots. Consider a service like Cloudflare. Cloudflare stops harmful bots by using threat intelligence at scale, blocking bots from stealing sensitive information.

6. Eliminate hotlinking

Hotlinking is when another website owner wants to use an image from your WordPress site on their website. However, instead of saving the image to their desktop or taking a screenshot, the user will display the image on their site via the image URL.

If a site that has a ton of traffic hotlinks your images, then it can cause your server to work in overdrive for the activity that you may not even want.

A good way to prevent this from happening is to disable hotlinking on your WordPress site.

There are several plugins that disable hotlinking.

7. Look into server-targeted caching

The last time your browser started running slowly or loading pages wonky, you probably headed over to your browser settings and cleared your cache. 

Just like you can clear your browser cache, there are server-targeted caching engines. These engines work to clear up your server when things get slow. 

Here are three server-targeted caching engines to check out for your VPS.

1. Memcached

Memcached is a high-performance distributed memory caching system. It works by optimizing how database requests are cached and speeding up web applications.

The service is open-source and free, but you do have to download it and install it on your computer yourself. 

To get Memcached, head over to Github and look at the instructions associated with your respective server. Once you complete the installation and setup process, you’ll see performance improvements.

2. OPcache

If your site runs on PHP, then OPcache is the PHP performance tool for you. This system works by storing precompiled script bytecode in the shared memory, reducing the need for PHP to do the heavy lifting.

As you free up the load placed on PHP by making it so PHP doesn’t have to process the same lines of code over and over, it improves WordPress and VPS performance.

3. Varnish Cache

Varnish Cache is installed in front of HTTP and works as a caching HTTP reverse proxy. In other words, it speeds up the applications on the web by up to 300 to 1000 times, depending on the server.

Since Varnish Cache speeds up how HTTP requests are handled by servers, your site’s overall performance will be better.

While using server-targeted caching is an outstanding way to optimize your VPS for WordPress, don’t forget to also use a caching plugin for your WordPress site.

There are several WordPress caching plugins, including WP Super Cache, W3 Total Cache, and WP-FFPC. These plugins cache your website and compress data to make your website run faster.

8. Optimize your content

Another critical piece to the server performance puzzle is the content it’s delivering. How you present and optimize your content can make a difference in site performance.

Online tools like Google’s PageSpeed or are excellent resources. They are free and will analyze your website and show you what you can do to improve your site content.

Based on the analysis, you’ll learn how you can improve your front-end website configurations and back-end server settings to improve your WordPress site.

9. Pick a reliable VPS hosting package from AvertHost!

While it’s smart to tweak your website and VPS for optimal WordPress and server performance, the best thing you can do for your site is to pick a VPS hosting plan that comes pre-configured and already optimized for WordPress.

When you sign up with Averthost’s VPS hosting plan, you can rest assured you’re getting a plan that is optimized, reliable, scalable, and secure. Check out our VPS web hosting plan options today.