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.
You might like…
1. Choose the plan with the right amount of storage
The first thing to know about a VPS hosting plan is you have three different options at HostGator. You can choose between the Snappy 2000, Snappy 4000, and Snappy 8000 plan.
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 Snappy 2000 plan is a great place to start. It starts at only $19.95 a month, includes 2GB, 2 cores CPU, 120 GB of disk space, and has unmetered bandwidth.
The best news about HostGator is it’s easy to switch plans. At any time, you can upgrade your plan to support your growing website.
Remember, HostGator 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 login 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
- NGINX
- 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. HostGator’s servers are located in Provo, UT and Houston, TX.
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). Specific instructions can be found for Google here and Bing here.
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 activity that you may not even want.
A good way to prevent this from happening is to disable hotlinking on your WordPress site.
HostGator offers free hotlink protection as part of its hosting packages. Here’s how to enable hotlink protection:
- Log in to your HostGator hosting cPanel.
- Go to the 'Security' tab.
- Select the 'Hotlink Protection' option.
- Fill in the respective information.
There are also several WordPress plugins that disable hotlinking. However, using the free hotlinking protection from HostGator will be sufficient.
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 speeds 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 set up 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.
Note: OPcache can cause some memory issues for smaller servers, so we don’t recommend using it with the Snappy 2000 plan.
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 WebPageTest.org 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. Above all, pick a reliable VPS hosting package from HostGator!
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.
HostGator is consistently rated one of the top VPS web hosting providers. When you sign up with a HostGator 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.
Ashley R. Cummings is a professional freelance writer specializing in SaaS, tech, and advertising/marketing. In a previous life, she was a Russian teacher at Brigham Young University, a corporate trainer, and a grad student—all at the same time. When she’s not writing, you can find her traveling the world with her 2 kids and husband, reading poetry or taking a deep dive into the fabulous world of comedy. Connect with her on Twitter at @ashleyrcummings.