Disk usage best practices

Overview

There are many ways to prevent excess disk usage on your hosting plan and ensure your server and website continue to function fast and efficiently. This article describes why block storage and third-party options may be a more cost-effective and stable solution than storing backups on a web server.

Website backup solutions

When creating and storing backups, the goal is always to ensure they remain redundant. If they're stored locally (on the same server as your live site), it makes them ineffective for a few reasons:

  • DreamHost does its best to prevent data loss on all servers. However, in the unlikely event that something happened to your server, the backups stored in the same place as your live site would be impacted.
  • If your website is ever compromised, backups stored locally could also be exposed to security exploits that the live site is affected by.

The following are examples of backup solutions you could use.

WordPress backups

The UpdraftPlus WordPress plugin includes options to copy your backup data to a third-party server, ensuring your backups are not stored locally. The following article walks you through how to configure UpdraftPlus to store your backups on DreamObjects:

Manual website backups

The following articles walk you through creating and downloading backups:

Third-party media storage alternatives

Alternatives to block storage include providers who are already using similar mass storage technologies. Websites such as YouTube, Vimeo, and SoundCloud are designed around the specific need to host video and audio files, providing a variety of ways to embed or link to the content you've uploaded to those platforms.

Website image optimization and cleanup

An optimized website is fast while keeping your disk usage low. Here are a few tips to help optimize your site:

  • Remove duplicate images from your site (if you need to use the same image more than once, re-use the same image instead of using multiple copies).
  • Use an image-optimizer tool to optimize images for your website before uploading them to the server.
  • If you're using WordPress, plugins such as the EWWW Image Optimizer can optimize your images on the fly.

Log file optimization

DreamHost maintains your website logs on set schedules. However, applications you've installed on your site may not be configured in a way that ensures they're kept to a usable size. The easiest way to do this is via a cron job. 

Use the following syntax when creating your cron job.

Make sure to change username to your website user and /app/log_file to the path of your specific application's log file.

/usr/sbin/logrotate /home/username/app/log_file

View the following article for information about how to create a cron job in the DreamHost panel:

Block storage

Block storage is a cloud-based storage service that is specifically designed for storing large amounts of data. The following are examples of block storage services you could use.

DreamObjects

DreamObjects is DreamHost's cloud storage service that can be used to store anything from static data for your website to website backups. You can access DreamObjects in the DreamHost panel, programmatically via standard S3 APIs, or using any application with S3 connectivity support. View the following article for more information about DreamObjects:

If you're already familiar with DreamObjects, view the following articles for information on how to secure and integrate it with your current disk usage:

Other common block storage alternatives

DreamHost Dedicated Server Hosting

If you need a large amount of local disk space, a DreamHost Dedicated Server may be the best solution. There are various disk and RAM options available to choose from, as well as expandability options in the event that you need to upgrade later. View the following link for more information about Dedicated Servers:

Did this article answer your questions?

Article last updated PST.

Still not finding what you're looking for?