VPS optimization overview

Overview

This article gives you a few suggestions on how to identify memory issues and optimize your DreamHost VPS. This will help it use less memory, saving you money while speeding up your websites.

Blocking abusive bots

A common problem for websites is caused by search engine indexing bots repeatedly hitting the website.

Create a robots.txt file

To minimize the issue of abusive bots, you should set up a robots.txt file. This file helps to control what bots are allowed to search and how often.

View your access.log file

Finding abusive bots can often be more of an art than a science, but you can get some data on this by analyzing the access.log file for your websites. View the following article for detailed information on how to check your access.log file and see where the most traffic is coming from:

Preventing image hotlinking

Hotlinking is when another website uses an image from your website. They do this by using your website's full image URL on their own site. This can cause massive problems for your site, as even a relatively low-traffic site can cause poor server performance.

View the Prevent image hotlinking article for more information on how to prevent this from happening.

Caching your site

Caching helps to store website files, making them faster to access by your visitors. Ensure your website's software uses some caching functionality to prevent memory issues and improve overall performance.

PHP processes

PHP processes can take up a significant amount of memory. If your site is getting a lot of traffic, enabling caching will help reduce the number of PHP processes spawned.

Caching renders a PHP script and then "caches" that HTML output as a file. The next time that page is accessed, the server outputs the static HTML page rather than processing the PHP script again.

Cloudflare

You can also enable a third-party service like Cloudflare, which provides additional caching options for your websites if you expect a large volume of visitors.

Use OPcache for PHP sites

OPcache is a caching engine built into PHP that, when enabled, dramatically increases the performance of PHP-based websites. View the following article for details on this feature:

WordPress-specific optimizations

If you're running multiple instances of the WordPress software on your VPS, review the WordPress Optimization category for detailed articles.

Make sure to do the following with each installation:

  • Always run the most recent version of WordPress.
  • Install only essential plugins.
  • Keep your plugins up-to-date.
  • Remove/delete unused plugins as opposed to just deactivating them.
  • Confirm your active theme isn't generating any errors in your error.log file (located in the same directory as the access.log).
  • View Optimizing Page Load Time and make sure you have a popular WordPress caching plugin installed and configured. For example, W3TC or WP Super Cache.
  • Finally, compressing your image files improves loading time and reduces overall memory usage.

Configuring IP Tables

It is not possible to customize IP tables on a DreamHost VPS. This is because VPSs run on a single host machine where IP tables are configured, but there is no access to this machine.

If you need to run your own custom IP tables, the only option would be to upgrade to a Dedicated Server or DreamCompute and manually install this software.

See also

Did this article answer your questions?

Article last updated PST.

Still not finding what you're looking for?