Search
Close this search box.

WP Buffs Blog |

The 110% Guide to Mastering WordPress VPS Optimization

Guide to Mastering WordPress VPS Optimization

So, you’ve chosen VPS hosting for your WordPress website. Good call. You get to avoid the high costs of a dedicated server, but still reap the benefits of running a site from a private server environment.

good call

However, as more bandwidth, storage, and overall server control become available with VPS hosting, you must remain cognizant of performance as a result.

In this post, we’re going to cover ways in which you can use WordPress VPS optimization. We’ll also include ways in which you can optimize at the server level, but the majority of the focus will be on practical optimizations you can apply within WordPress.

Our team at WP Buffs helps website owners, agency partners and freelancer partners optimize VPS options around their WordPress sites. Whether you need us to manage a 1 website or support 1000 client sites, we’ve got your back.

Tips for Mastering WordPress VPS Optimization

The choice of VPS hosting for your WordPress site means you take things like security and performance seriously. But how do you make sure you get the most out of your investment in a virtual private server? You optimize your site’s functionality so you don’t max out on memory or storage, of course.

Here’s what you can do:

1. Choose the Right Bandwidth and Storage

If you haven’t yet purchased your VPS plan, find one with the bandwidth and storage you believe your site will need. If you’re not sure what that is just yet, make sure you work with a hosting company that gives you scalable options.

Here are some of WP Buff’s hosting friends. You’ll find a reliable solution from this pack:

Choose the Right Bandwidth and Storage

💰 Starting at $3.95/mo

SiteGround* is one of our favorite hosting providers as far as shared hosting goes. Web hosting is their craft. The latest speed technologies are their passion. Unique security solutions are their specialty. Amazing technical support is their pride. Nuff said!

Go to SiteGround*

Anchor

💰 Starting at $20/mo

If you’re looking for hassle-free WordPress hosting for freelancers and web professionals, Anchor Hosting is for you. Austin’s white-glove service is for anybody looking to work with a small, intimate team that can take care of all your hosting needs.

Go to Anchor

pressable

💰 Starting at $25/mo

With award winning speed and an expert WordPress support team, Pressable Hosting is a great choice for agencies and developers. The company is owned by Automattic, so you know they do great work. Pressable is suited to website owners, freelancers and WordPress Agencies and every plan supports staging sites for testing.

See Strategic Partnership

Go to Pressable

2. Use Servers Optimized for Performance

Another consideration to keep in mind with a VPS plan is to find one that already implements performance-saving measures on its servers. So, you’ll want to look for:

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

Start with a strong WordPress VPS optimization base, so your WordPress site has the best chance to succeed.

3. Update All Your Software

Typically, WordPress security guides will tell you to maintain regular updates of the core, plugins, and theme. However, if we’re looking at WordPress VPS optimization, you have to look beyond what’s inside WordPress.

In addition to updating WordPress software, make sure your PHP and MySQL instances are running on the latest versions. Then, devise a schedule to ensure you regularly check in on and keep all your software up-to-date.

4. Expand Your Memory Limits

There may come a time when your VPS–no matter how abundantly roomy it may seem in terms of memory–times out. It could be due to unusually high activity on your WordPress site or perhaps you’re trying to upload something that requires the server to work overtime. If any of those preset limits are exceeded, you could find yourself in hot water.

💡Rather than wait for your server to time out on you, it might be a good idea to expand the limits of how it handles memory now. #WordPress Click To Tweet

In your wp-config.php file, locate this line:

/* That's all, stop editing! Happy blogging. */

Directly above it, add this line (if it doesn’t already exist):

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

Where it says “[enter the memory limit]”, you could add 128M, 256M, or 512M. It ultimately depends on how much memory you need to aptly handle the additional workload.

5. Implement Server-Targeted Caching

When it comes to implementing a caching process for WordPress, we have you covered with the 110% Guide to Server and Browser Cache. That said, there are a few other kinds of caching we should talk about in terms of getting a handle on how to go about WordPress VPS optimization.

Memcached

This is a caching system that directly affects the memory your VPS has to work with. To use it, you must manually install it on your server. You can check Github for instructions on how to do this for your respective server. Once configured, Memcached will optimize how database requests are cached, greatly improving your WordPress VPS optimization memory and performance in the process.

Varnish Cache

Varnish caching is a software (not unlike an SSL certificate) which is installed in front of HTTPS. It then works as a caching HTTP reverse proxy, which is known to greatly speed up the way HTTP requests are handled by servers and, as a result, optimizes performance site-wide.

OPcache

This type of caching engine works specifically on websites running on PHP. As the PHP OPcache manual explains:

“OPcache improves PHP performance by storing precompiled script bytecode in shared memory, thereby removing the need for PHP to load and parse scripts on each request.”

This, consequently, will improve WordPress VPS optimization performance as it’s not constantly having to process the same lines of PHP code.

6. Limit Bot Indexing

Your security plugin is already doing a great job blocking serious threats to your WordPress site. However, there are others out there who may crawl your website and maximize your server’s resources, though not for nefarious reasons.

For example, search bots can put a great deal of pressure on your VPS. If you find that these little critters are getting out of control and messing with how well your server performs, then you can use robots.txt to get them in line. (Yes, you can use robots.txt to discourage search engine indexing, too, but you can also use it for limiting how frequently someone hits your server.)

In the robots.txt file at the root (if you don’t have one, create it), add the following code:

User-agent: *

Crawl-Delay: [number of seconds]

Replace “[number of seconds]” with how long you want users to wait before they can issue another HTTPS request. A good place to start is at 3600 seconds (or one hour). This will then keep persistent bots at bay.

7. Stop Hotlinking

Image hotlinking is what happens when someone leeches off of your website and server to host their images. It works like this:

  • You have a great-looking image uploaded to your WordPress site.
  • Someone wants to use that image for their own website.
  • Instead of screenshot or save a copy of the image to their machine, they display the image on their site by the URL for that image (that’s still on your server).

image hotlinking

If this were to happen on a website with high enough traffic, it could do serious harm to your server.

There are a number of ways to disable hotlinking. First, start with your web host or CDN. They should include hotlink protection. cPanel, specifically, offers a free hotlinking solution:

hotlink protection

If this isn’t available, there are WordPress plugins you can use instead. For instance, All In One WP Security & Firewall includes hotlink protection, which may be a convenient choice if they’re your security plugin provider already. You could also look for a plugin that solely handles hotlink protection or the disabling of right-clicks for general content scraping security.

Wrapping Up

This is not an exhaustive list, by any means. But that’s because you already know how to boost speed for WordPress VPS optimization.

Since we’re focusing specifically on how to master WordPress VPS optimization, we focused on tips based on the most common ways in which your high-performance server is drained of memory. The tips above will fully round out your performance optimization plan when your site resides on VPS hosting. If you’re interested in pursuing WordPress VPS optimization, don’t be afraid to reach out to us.

Want to give your feedback or join the conversation? Add your comments 🐦 on Twitter.

If you enjoyed this article, then you’ll really enjoy the 24/7 WordPress website management and support services WP Buffs’ has to offer! Partner with the team that offers every aspect of premium WordPress support services.

From speed optimization services, to unlimited website edits, security, 24/7 support, or even white-label site management for agencies and freelancers, our expert engineers have your back. Bring us in as part of your team to make your site Bufftastic! Check out our plans

Curious about what we do?

Honed and proven strategies we've used successfully 500+ times to help you sell your first care plans. Action steps you can implement in minutes.

No thanks, I can already sell as many care plans as I want.
How to Sell Your Very First Care Plans Cover

WP Buffs, LLC is committed to protecting and respecting your privacy, and we’ll only use your personal information to administer your account and to provide the products and services you requested from us. From time to time, we would like to contact you about our products and services, as well as other content that may be of interest to you. If you consent to us contacting you for this purpose, please enter your name and email address above.

 

You can unsubscribe from these communications at any time. For more information on how to unsubscribe, our privacy practices, and how we are committed to protecting and respecting your privacy, please review our Privacy Policy.

By clicking submit above, you consent to allow WP Buffs, LLC to store and process the personal information submitted above to provide you the content requested.

Finally, an email list that helps make WordPress simple and effective for you.

Speed & security optimization tips and detailed how-to guides with advice you can implement today.

No thanks, I already know everything about WordPress.
Speed checklist eBook cover

WP Buffs, LLC is committed to protecting and respecting your privacy, and we’ll only use your personal information to administer your account and to provide the products and services you requested from us. From time to time, we would like to contact you about our products and services, as well as other content that may be of interest to you. If you consent to us contacting you for this purpose, please enter your name and email address above.

 

You can unsubscribe from these communications at any time. For more information on how to unsubscribe, our privacy practices, and how we are committed to protecting and respecting your privacy, please review our Privacy Policy. By clicking submit above, you consent to allow WP Buffs, LLC to store and process the personal information submitted above to provide you the content requested.

Case study eBook cover (Rigorous Digital)
Case study eBook cover (MEP Publishing)
How to Sell Your Very First Care Plans Cover

Finally, get your website 99.9999% secure and loading in under 1 second.

Our free eBooks and easy-to-follow checklists will have your website fully optimized in just a few hours.

No thanks, my website is as fast and secure as I want it.

WP Buffs, LLC is committed to protecting and respecting your privacy, and we’ll only use your personal information to administer your account and to provide the products and services you requested from us. From time to time, we would like to contact you about our products and services, as well as other content that may be of interest to you. If you consent to us contacting you for this purpose, please enter your name and email address above.

You can unsubscribe from these communications at any time. For more information on how to unsubscribe, our privacy practices, and how we are committed to protecting and respecting your privacy, please review our Privacy Policy. By clicking submit above, you consent to allow WP Buffs, LLC to store and process the personal information submitted above to provide you the content requested.

How to Sell Your Very First Care Plans Cover

Read about how we increased Rigorous Digital's profit margin by 23% and helped remove all website issues for MEP Publishers and their 3 complex websites.

Case study eBook cover (MEP Publishing)
No thanks, I don't need more profit and I can tackle all my WordPress issues myself.
Case study eBook cover (Rigorous Digital)

WP Buffs, LLC is committed to protecting and respecting your privacy, and we’ll only use your personal information to administer your account and to provide the products and services you requested from us. From time to time, we would like to contact you about our products and services, as well as other content that may be of interest to you. If you consent to us contacting you for this purpose, please enter your name and email address above.

 

You can unsubscribe from these communications at any time. For more information on how to unsubscribe, our privacy practices, and how we are committed to protecting and respecting your privacy, please review our Privacy Policy.

By clicking submit above, you consent to allow WP Buffs, LLC to store and process the personal information submitted above to provide you the content requested.